throw INTERP_KERNEL::Exception("MEDFileMeshStruct::getLevelOfGeoType : The specified geometric type is not present in the mesh structure !");
}
+/*!
+ * \sa MEDFileMeshStruct::doesManageGeoType
+ */
int MEDFileMeshStruct::getNumberOfElemsOfGeoType(INTERP_KERNEL::NormalizedCellType t) const
{
for(std::vector< std::vector<int> >::const_iterator it1=_geo_types_distrib.begin();it1!=_geo_types_distrib.end();it1++)
throw INTERP_KERNEL::Exception("The specified geometric type is not present in the mesh structure !");
}
+/*!
+ * \sa MEDFileMeshStruct::getNumberOfElemsOfGeoType
+ */
+bool MEDFileMeshStruct::doesManageGeoType(INTERP_KERNEL::NormalizedCellType t) const
+{
+ for(std::vector< std::vector<int> >::const_iterator it1=_geo_types_distrib.begin();it1!=_geo_types_distrib.end();it1++)
+ {
+ std::size_t sz=(*it1).size();
+ if(sz%3!=0)
+ throw INTERP_KERNEL::Exception("MEDFileMeshStruct::doesManageGeoType : internal error in code !");
+ std::size_t nbGeo=sz/3;
+ for(std::size_t i=0;i<nbGeo;i++)
+ if((*it1)[3*i]==(int)t)
+ return true;
+ }
+ return false;
+}
+
+void MEDFileMeshStruct::appendIfImplicitType(INTERP_KERNEL::NormalizedCellType t)
+{
+ if(!_mesh->hasImplicitPart())
+ throw INTERP_KERNEL::Exception("MEDFileMeshStruct::appendIfImplicitType : by default no implicit geo type can be appended !");
+ static const char MSG[]="MEDFileMeshStruct::appendIfImplicitType : the distribution does not looks like structured standard !";
+ if(_geo_types_distrib.size()!=1)
+ throw INTERP_KERNEL::Exception(MSG);
+ std::size_t sz(_geo_types_distrib[0].size());
+ if(sz%3!=0)
+ throw INTERP_KERNEL::Exception("MEDFileMeshStruct::appendIfImplicitType : internal error in code !");
+ std::size_t nbGeo(sz/3);
+ if(nbGeo!=1)
+ throw INTERP_KERNEL::Exception(MSG);
+ std::vector<int> arr(3); arr[0]=(int)t; arr[1]=_mesh->buildImplicitPartIfAny(t); arr[2]=-1;
+ _geo_types_distrib.push_back(arr);
+}
+
+
int MEDFileMeshStruct::getNumberOfLevs() const
{
return (int)_geo_types_distrib.size();
}
}
-MEDMeshMultiLev::MEDMeshMultiLev():_nb_nodes(0),_cell_fam_ids_nocpy(false)
+MEDMeshMultiLev::MEDMeshMultiLev(const MEDFileMesh *mesh):_mesh(mesh),_nb_nodes(0),_cell_fam_ids_nocpy(false)
{
}
-MEDMeshMultiLev::MEDMeshMultiLev(int nbNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities):_geo_types(gts),_nb_entities(nbEntities),_nb_nodes(nbNodes),_cell_fam_ids_nocpy(false),_cell_num_ids_nocpy(false),_node_fam_ids_nocpy(false),_node_num_ids_nocpy(false)
+MEDMeshMultiLev::MEDMeshMultiLev(const MEDFileMesh *mesh, int nbNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities):_mesh(mesh),_geo_types(gts),_nb_entities(nbEntities),_nb_nodes(nbNodes),_cell_fam_ids_nocpy(false),_cell_num_ids_nocpy(false),_node_fam_ids_nocpy(false),_node_num_ids_nocpy(false)
{
std::size_t sz(_geo_types.size());
if(sz!=pfls.size() || sz!=nbEntities.size())
}
}
-MEDMeshMultiLev::MEDMeshMultiLev(const MEDMeshMultiLev& other):RefCountObject(other),_pfls(other._pfls),_geo_types(other._geo_types),_nb_entities(other._nb_entities),_node_reduction(other._node_reduction),_nb_nodes(other._nb_nodes),_cell_fam_ids(other._cell_fam_ids),_cell_fam_ids_nocpy(other._cell_fam_ids_nocpy),_cell_num_ids(other._cell_num_ids),_cell_num_ids_nocpy(other._cell_num_ids_nocpy),_node_fam_ids(other._node_fam_ids),_node_fam_ids_nocpy(other._node_fam_ids_nocpy),_node_num_ids(other._node_num_ids),_node_num_ids_nocpy(other._node_num_ids_nocpy)
+MEDMeshMultiLev::MEDMeshMultiLev(const MEDMeshMultiLev& other):RefCountObject(other),_mesh(other._mesh),_pfls(other._pfls),_geo_types(other._geo_types),_nb_entities(other._nb_entities),_node_reduction(other._node_reduction),_nb_nodes(other._nb_nodes),_cell_fam_ids(other._cell_fam_ids),_cell_fam_ids_nocpy(other._cell_fam_ids_nocpy),_cell_num_ids(other._cell_num_ids),_cell_num_ids_nocpy(other._cell_num_ids_nocpy),_node_fam_ids(other._node_fam_ids),_node_fam_ids_nocpy(other._node_fam_ids_nocpy),_node_num_ids(other._node_num_ids),_node_num_ids_nocpy(other._node_num_ids_nocpy)
{
}
return new MEDUMeshMultiLev(m,levs);
}
-MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<int>& levs)
+MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<int>& levs):MEDMeshMultiLev(m)
{
if(!m)
throw INTERP_KERNEL::Exception("MEDUMeshMultiLev constructor : null input pointer !");
return new MEDUMeshMultiLev(m,gts,pfls,nbEntities);
}
-MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities):MEDMeshMultiLev(m->getNumberOfNodes(),gts,pfls,nbEntities)
+MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities):MEDMeshMultiLev(m,m->getNumberOfNodes(),gts,pfls,nbEntities)
{
std::size_t sz(gts.size());
if(sz<1)
//=
-MEDStructuredMeshMultiLev::MEDStructuredMeshMultiLev():_is_internal(true)
+MEDStructuredMeshMultiLev::MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m):MEDMeshMultiLev(m),_is_internal(true)
{
}
-MEDStructuredMeshMultiLev::MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m, const std::vector<int>& lev):_is_internal(true)
+MEDStructuredMeshMultiLev::MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m, const std::vector<int>& lev):MEDMeshMultiLev(m),_is_internal(true)
{
// ids fields management
_cell_fam_ids_nocpy=true; _cell_num_ids_nocpy=true;
}
}
-MEDStructuredMeshMultiLev::MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m, int nbOfNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities):MEDMeshMultiLev(nbOfNodes,gts,pfls,nbEntities),_is_internal(true)
+MEDStructuredMeshMultiLev::MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m, int nbOfNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities):MEDMeshMultiLev(m,nbOfNodes,gts,pfls,nbEntities),_is_internal(true)
{
// ids fields management
_cell_fam_ids_nocpy=true; _cell_num_ids_nocpy=true;
{
}
+bool MEDStructuredMeshMultiLev::prepareForImplicitUnstructuredMeshCase(MEDMeshMultiLev *&ret) const
+{
+ ret=0;
+ MEDCoupling1GTUMesh *facesIfPresent((static_cast<const MEDFileStructuredMesh *>(_mesh))->getImplicitFaceMesh());
+ if(!facesIfPresent)
+ return false;
+ const DataArrayInt *pfl(0),*nr(_node_reduction);
+ if(!_pfls.empty())
+ pfl=_pfls[0];
+ MEDCouplingAutoRefCountObjectPtr<MEDCoupling1GTUMesh> facesIfPresent2(facesIfPresent); facesIfPresent->incrRef();
+ MEDCouplingAutoRefCountObjectPtr<MEDUMeshMultiLev> ret2(new MEDUMeshMultiLev(*this,facesIfPresent2));
+ if(pfl)
+ throw INTERP_KERNEL::Exception("MEDStructuredMeshMultiLev::prepareForImplicitUnstructuredMeshCase : case is not treated yet for profile on implicit unstructured mesh.");
+ if(nr)
+ throw INTERP_KERNEL::Exception("MEDStructuredMeshMultiLev::prepareForImplicitUnstructuredMeshCase : case is not treated yet for node reduction on implicit unstructured mesh.");
+ ret=ret2.retn();
+ return true;
+}
+
+void MEDStructuredMeshMultiLev::dealWithImplicitUnstructuredMesh(const MEDFileMesh *m)
+{
+ _cell_fam_ids_nocpy=true; _cell_num_ids_nocpy=true;
+ const DataArrayInt *tmp(0);
+ tmp=m->getFamilyFieldAtLevel(-1);
+ if(tmp)
+ {
+ tmp->incrRef();
+ _cell_fam_ids=const_cast<DataArrayInt *>(tmp);
+ }
+ tmp=m->getNumberFieldAtLevel(-1);
+ if(tmp)
+ {
+ tmp->incrRef();
+ _cell_num_ids=const_cast<DataArrayInt *>(tmp);
+ }
+}
+
void MEDStructuredMeshMultiLev::selectPartOfNodes(const DataArrayInt *pflNodes)
{
if(!pflNodes || !pflNodes->isAllocated())
throw INTERP_KERNEL::Exception("MEDCMeshMultiLev constructor 2 : lengthes of gts and pfls must be equal to one !");
int mdim(m->getMeshDimension());
INTERP_KERNEL::NormalizedCellType gt(MEDCouplingStructuredMesh::GetGeoTypeGivenMeshDimension(mdim));
- if(gt!=gts[0])
- throw INTERP_KERNEL::Exception("MEDCMeshMultiLev constructor 2 : the unique geo type is invalid regarding meshdim !");
- _coords.resize(mdim);
- for(int i=0;i<mdim;i++)
+ if(gt==gts[0])
{
- DataArrayDouble *elt(const_cast<DataArrayDouble *>(m->getMesh()->getCoordsAt(i)));
- if(!elt)
- throw INTERP_KERNEL::Exception("MEDCMeshMultiLev constructor 2 : presence of null pointer for an vector of double along an axis !");
- _coords[i]=elt; _coords[i]->incrRef();
+ _coords.resize(mdim);
+ for(int i=0;i<mdim;i++)
+ {
+ DataArrayDouble *elt(const_cast<DataArrayDouble *>(m->getMesh()->getCoordsAt(i)));
+ if(!elt)
+ throw INTERP_KERNEL::Exception("MEDCMeshMultiLev constructor 2 : presence of null pointer for an vector of double along an axis !");
+ _coords[i]=elt; _coords[i]->incrRef();
+ }
}
+ else
+ dealWithImplicitUnstructuredMesh(m);
}
MEDCMeshMultiLev::MEDCMeshMultiLev(const MEDCMeshMultiLev& other):MEDStructuredMeshMultiLev(other),_coords(other._coords)
MEDMeshMultiLev *MEDCMeshMultiLev::prepare() const
{
+ MEDMeshMultiLev *retSpecific(0);
+ if(prepareForImplicitUnstructuredMeshCase(retSpecific))
+ return retSpecific;
const DataArrayInt *pfl(0),*nr(_node_reduction);
if(!_pfls.empty())
pfl=_pfls[0];
throw INTERP_KERNEL::Exception("MEDCurveLinearMeshMultiLev constructor 2 : null input pointer !");
if(gts.size()!=1 || pfls.size()!=1)
throw INTERP_KERNEL::Exception("MEDCurveLinearMeshMultiLev constructor 2 : lengthes of gts and pfls must be equal to one !");
- int mdim(MEDCouplingStructuredMesh::GetGeoTypeGivenMeshDimension(m->getMeshDimension()));
- if(mdim!=gts[0])
- throw INTERP_KERNEL::Exception("MEDCurveLinearMeshMultiLev constructor 2 : the unique geo type is invalid regarding meshdim !");
- DataArrayDouble *coords(const_cast<DataArrayDouble *>(m->getMesh()->getCoords()));
- if(!coords)
- throw INTERP_KERNEL::Exception("MEDCurveLinearMeshMultiLev constructor 2 : no coords set !");
- coords->incrRef();
- _coords=coords;
- _structure=m->getMesh()->getNodeGridStructure();
+ INTERP_KERNEL::NormalizedCellType gt(MEDCouplingStructuredMesh::GetGeoTypeGivenMeshDimension(m->getMeshDimension()));
+ if(gt==gts[0])
+ {
+ DataArrayDouble *coords(const_cast<DataArrayDouble *>(m->getMesh()->getCoords()));
+ if(!coords)
+ throw INTERP_KERNEL::Exception("MEDCurveLinearMeshMultiLev constructor 2 : no coords set !");
+ coords->incrRef();
+ _coords=coords;
+ _structure=m->getMesh()->getNodeGridStructure();
+ }
+ else
+ dealWithImplicitUnstructuredMesh(m);
}
MEDCurveLinearMeshMultiLev::MEDCurveLinearMeshMultiLev(const MEDCurveLinearMeshMultiLev& other):MEDStructuredMeshMultiLev(other),_coords(other._coords),_structure(other._structure)
MEDMeshMultiLev *MEDCurveLinearMeshMultiLev::prepare() const
{
+ MEDMeshMultiLev *retSpecific(0);
+ if(prepareForImplicitUnstructuredMeshCase(retSpecific))
+ return retSpecific;
const DataArrayInt *pfl(0),*nr(_node_reduction);
if(!_pfls.empty())
pfl=_pfls[0];
void MEDFileField1TSStructItem2::checkWithMeshStructForCells(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs)
{
+ if(!mst->doesManageGeoType(_geo_type))
+ {
+ MEDFileMeshStruct *mstUnConstCasted(const_cast<MEDFileMeshStruct *>(mst));
+ mstUnConstCasted->appendIfImplicitType(_geo_type);
+ }
int nbOfEnt=mst->getNumberOfElemsOfGeoType(_geo_type);
checkInRange(nbOfEnt,1,globs);
}
std::vector<const BigMemoryObject *> getDirectChildren() const;
const MEDFileMesh *getTheMesh() const { return _mesh; }
int getNumberOfNodes() const { return _nb_nodes; }
+ bool doesManageGeoType(INTERP_KERNEL::NormalizedCellType t) const;
int getNumberOfElemsOfGeoType(INTERP_KERNEL::NormalizedCellType t) const;
int getLevelOfGeoType(INTERP_KERNEL::NormalizedCellType t) const;
int getNumberOfLevs() const;
int getNumberOfGeoTypesInLev(int relativeLev) const;
+ // non const methods
+ void appendIfImplicitType(INTERP_KERNEL::NormalizedCellType t);
private:
MEDFileMeshStruct(const MEDFileMesh *mesh);
private:
DataArray *constructDataArray(const MEDFileField1TSStructItem& fst, const MEDFileFieldGlobsReal *globs, const DataArray *vals) const;
virtual void appendVertices(const DataArrayInt *verticesToAdd, DataArrayInt *nr);
protected:
- MEDMeshMultiLev();
+ MEDMeshMultiLev(const MEDFileMesh *mesh);
MEDMeshMultiLev(const MEDMeshMultiLev& other);
- MEDMeshMultiLev(int nbNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+ MEDMeshMultiLev(const MEDFileMesh *mesh, int nbNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
protected:
+ const MEDFileMesh *_mesh;
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > _pfls;
std::vector< INTERP_KERNEL::NormalizedCellType > _geo_types;
std::vector<int> _nb_entities;
void selectPartOfNodes(const DataArrayInt *pflNodes);
virtual std::vector<int> getNodeGridStructure() const = 0;
protected:
- MEDStructuredMeshMultiLev();
+ MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m);
MEDStructuredMeshMultiLev(const MEDStructuredMeshMultiLev& other);
MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m, const std::vector<int>& lev);
MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m, int nbOfNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+ void dealWithImplicitUnstructuredMesh(const MEDFileMesh *m);
+ protected:
+ bool prepareForImplicitUnstructuredMeshCase(MEDMeshMultiLev *&ret) const;
protected:
bool _is_internal;
};
return coo->getNumberOfTuples();
}
+bool MEDFileUMesh::hasImplicitPart() const
+{
+ return false;
+}
+
+int MEDFileUMesh::buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const
+{
+ throw INTERP_KERNEL::Exception("MEDFileUMesh::buildImplicitPartIfAny : unstructured meshes do not have implicit part !");
+}
+
+void MEDFileUMesh::releaseImplicitPartIfAny() const
+{
+}
+
void MEDFileUMesh::whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector<bool>& nodesFetched) const
{
std::size_t sz(st.getNumberOfItems());
{
if(!m)
throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getGenMeshAtLevel : level -1 requested must be non empty to be able to compute unstructured sub mesh !");
- return m->build1SGTSubLevelMesh();
+ return _faces_if_necessary;
}
default:
throw INTERP_KERNEL::Exception("MEDFileCurveLinearMesh does not support multi level for mesh 0 expected as input !");
return cmesh->getNumberOfNodes();
}
+bool MEDFileStructuredMesh::hasImplicitPart() const
+{
+ return true;
+}
+
+/*!
+ * \sa MEDFileStructuredMesh::getImplicitFaceMesh
+ */
+int MEDFileStructuredMesh::buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const
+{
+ static const char MSG[]="MEDFileStructuredMesh::buildImplicitPartIfAny : the given geo type is not manageable by a structured mesh !";
+ const MEDCoupling1SGTUMesh *zeFaceMesh(_faces_if_necessary);
+ if(!zeFaceMesh)
+ {
+ const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(MEDCouplingStructuredMesh::GetGeoTypeGivenMeshDimension(getMeshDimension())));
+ if(cm.getReverseExtrudedType()!=gt)
+ throw INTERP_KERNEL::Exception(MSG);
+ const MEDCouplingStructuredMesh *mcmesh(getStructuredMesh());
+ _faces_if_necessary=mcmesh->build1SGTSubLevelMesh();
+ return mcmesh->getNumberOfCellsOfSubLevelMesh();
+ }
+ else
+ {
+ if(gt!=zeFaceMesh->getCellModelEnum())
+ throw INTERP_KERNEL::Exception(MSG);
+ return zeFaceMesh->getNumberOfCells();
+ }
+}
+
+void MEDFileStructuredMesh::releaseImplicitPartIfAny() const
+{
+ _faces_if_necessary=0;
+}
+
+/*!
+ * Retrieves the internal pointer (no decrRef requested) of the implicit face mesh if any.
+ * To force to build it you can invoke MEDFileStructuredMesh::buildImplicitPartIfAny method.
+ *
+ * \sa MEDFileStructuredMesh::buildImplicitPartIfAny
+ */
+MEDCoupling1SGTUMesh *MEDFileStructuredMesh::getImplicitFaceMesh() const
+{
+ return _faces_if_necessary;
+}
+
std::vector<INTERP_KERNEL::NormalizedCellType> MEDFileStructuredMesh::getGeoTypesAtLevel(int meshDimRelToMax) const
{
const MEDCouplingStructuredMesh *cmesh(getStructuredMesh());
MEDLOADER_EXPORT std::string getTimeUnit() const { return _dt_unit; }
MEDLOADER_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
MEDLOADER_EXPORT virtual int getNumberOfNodes() const = 0;
+ MEDLOADER_EXPORT virtual bool hasImplicitPart() const = 0;
+ MEDLOADER_EXPORT virtual int buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const = 0;
+ MEDLOADER_EXPORT virtual void releaseImplicitPartIfAny() const = 0;
MEDLOADER_EXPORT virtual std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAtLevel(int meshDimRelToMax) const = 0;
MEDLOADER_EXPORT virtual std::vector<int> getNonEmptyLevels() const = 0;
MEDLOADER_EXPORT virtual std::vector<int> getNonEmptyLevelsExt() const = 0;
MEDLOADER_EXPORT const DataArrayInt *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const;
MEDLOADER_EXPORT const DataArrayAsciiChar *getNameFieldAtLevel(int meshDimRelToMaxExt) const;
MEDLOADER_EXPORT int getNumberOfNodes() const;
+ MEDLOADER_EXPORT bool hasImplicitPart() const;
+ MEDLOADER_EXPORT int buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const;
+ MEDLOADER_EXPORT void releaseImplicitPartIfAny() const;
MEDLOADER_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAtLevel(int meshDimRelToMax) const;
MEDLOADER_EXPORT void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector<bool>& nodesFetched) const;
MEDLOADER_EXPORT std::vector<int> getNonEmptyLevels() const;
MEDCouplingMesh *getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
MEDLOADER_EXPORT int getSizeAtLevel(int meshDimRelToMaxExt) const;
MEDLOADER_EXPORT int getNumberOfNodes() const;
+ MEDLOADER_EXPORT bool hasImplicitPart() const;
+ MEDLOADER_EXPORT int buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const;
+ MEDLOADER_EXPORT void releaseImplicitPartIfAny() const;
+ MEDLOADER_EXPORT MEDCoupling1SGTUMesh *getImplicitFaceMesh() const;
MEDLOADER_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAtLevel(int meshDimRelToMax) const;
MEDLOADER_EXPORT void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector<bool>& nodesFetched) const;
+ MEDLOADER_EXPORT virtual const MEDCouplingStructuredMesh *getStructuredMesh() const = 0;
// tools
MEDLOADER_EXPORT bool unPolyze(std::vector<int>& oldCode, std::vector<int>& newCode, DataArrayInt *& o2nRenumCell);
protected:
void deepCpyAttributes();
void loadStrMeshFromFile(MEDFileStrMeshL2 *strm, med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs);
void writeStructuredLL(med_idt fid, const std::string& maa) const;
- virtual const MEDCouplingStructuredMesh *getStructuredMesh() const = 0;
static med_geometry_type GetGeoTypeFromMeshDim(int meshDim);
private:
static void LoadStrMeshDAFromFile(med_idt fid, int meshDim, int dt, int it, const std::string& mName, MEDFileMeshReadSelector *mrs,
MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> _names_faces;
mutable MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _rev_num_nodes;
mutable MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _rev_num_cells;
+ mutable MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> _faces_if_necessary;
};
class MEDFileCMesh : public MEDFileStructuredMesh