+/*!
+ * This method returns an unstructured mesh that represents the reference cell.
+ */
+MCAuto<MEDCouplingUMesh> MEDCouplingGaussLocalization::buildRefCell() const
+{
+ MCAuto<DataArrayDouble> coo(DataArrayDouble::New());
+ const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(getType()));
+ if(getDimension()!=ToIdType(cm.getDimension()))
+ throw INTERP_KERNEL::Exception("BuildRefCell : dimension mistmatch !");
+ coo->alloc(cm.getNumberOfNodes(),getDimension());
+ std::copy(_ref_coord.begin(),_ref_coord.end(),coo->getPointer());
+ MCAuto<MEDCoupling1SGTUMesh> ret(MEDCoupling1SGTUMesh::New("",getType()));
+ ret->setCoords(coo);
+ MCAuto<DataArrayIdType> conn(DataArrayIdType::New());
+ conn->alloc(cm.getNumberOfNodes(),1);
+ conn->iota();
+ ret->setNodalConnectivity(conn);
+ return MCAuto<MEDCouplingUMesh>(ret->buildUnstructured());
+}
+