}
}
+/*!
+ * \param [in] ids ids and group name of the new group to add. The ids should be sorted and different each other (MED file norm).
+ * \parma [in,out] famArr family array on level of interest to be renumbered. The input pointer should be not \c NULL (no check of that will be performed)
+ */
+void MEDFileMesh::addGroupUnderground(bool isNodeGroup, const DataArrayInt *ids, DataArrayInt *famArr)
+{
+ if(!ids)
+ throw INTERP_KERNEL::Exception("MEDFileUMesh::addGroup : NULL pointer in input !");
+ std::string grpName(ids->getName());
+ if(grpName.empty())
+ throw INTERP_KERNEL::Exception("MEDFileUMesh::addGroup : empty group name ! MED file format do not accept empty group name !");
+ ids->checkStrictlyMonotonic(true);
+ famArr->incrRef(); MEDCouplingAutoRefCountObjectPtr<DataArrayInt> famArrTmp(famArr);
+ std::vector<std::string> grpsNames=getGroupsNames();
+ if(std::find(grpsNames.begin(),grpsNames.end(),grpName)!=grpsNames.end())
+ {
+ std::ostringstream oss; oss << "MEDFileUMesh::addGroup : Group with name \"" << grpName << "\" already exists ! Destroy it before calling this method !";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ std::list< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > allFamIds(getAllNonNullFamilyIds());
+ allFamIds.erase(std::find(allFamIds.begin(),allFamIds.end(),famArrTmp));
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> famIds=famArr->selectByTupleIdSafe(ids->begin(),ids->end());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> diffFamIds=famIds->getDifferentValues();
+ std::vector<int> familyIds;
+ std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > idsPerfamiliyIds;
+ int maxVal=getTheMaxAbsFamilyId()+1;
+ std::map<std::string,int> families(_families);
+ std::map<std::string, std::vector<std::string> > groups(_groups);
+ std::vector<std::string> fams;
+ bool created(false);
+ for(const int *famId=diffFamIds->begin();famId!=diffFamIds->end();famId++)
+ {
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ids2Tmp=famIds->getIdsEqual(*famId);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ids2=ids->selectByTupleId(ids2Tmp->begin(),ids2Tmp->end());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ids1=famArr->getIdsEqual(*famId);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret0(ids1->buildSubstractionOptimized(ids2));
+ if(ret0->empty())
+ {
+ bool isFamPresent=false;
+ for(std::list< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> >::const_iterator itl=allFamIds.begin();itl!=allFamIds.end() && !isFamPresent;itl++)
+ isFamPresent=(*itl)->presenceOfValue(*famId);
+ if(!isFamPresent)
+ { familyIds.push_back(*famId); idsPerfamiliyIds.push_back(ret0); fams.push_back(FindOrCreateAndGiveFamilyWithId(families,*famId,created)); } // adding *famId in grp
+ else
+ {
+ familyIds.push_back(isNodeGroup?maxVal:-maxVal); idsPerfamiliyIds.push_back(ids2);
+ std::string locFamName=FindOrCreateAndGiveFamilyWithId(families,isNodeGroup?maxVal:-maxVal,created);
+ fams.push_back(locFamName);
+ if(existsFamily(*famId))
+ {
+ std::string locFamName2=getFamilyNameGivenId(*famId); std::vector<std::string> v(2); v[0]=locFamName2; v[1]=locFamName;
+ ChangeAllGroupsContainingFamily(groups,getFamilyNameGivenId(*famId),v);
+ }
+ maxVal++;
+ } // modifying all other groups on *famId to lie on maxVal and lie the grp on maxVal
+ }
+ else
+ {
+ familyIds.push_back(isNodeGroup?maxVal:-maxVal); idsPerfamiliyIds.push_back(ret0); // modifying all other groups on *famId to lie on maxVal and on maxVal+1
+ familyIds.push_back(isNodeGroup?maxVal+1:-maxVal-1); idsPerfamiliyIds.push_back(ids2);//grp lie only on maxVal+1
+ std::string n2(FindOrCreateAndGiveFamilyWithId(families,isNodeGroup?maxVal+1:-maxVal-1,created)); fams.push_back(n2);
+ if(existsFamily(*famId))
+ {
+ std::string n1(FindOrCreateAndGiveFamilyWithId(families,isNodeGroup?maxVal:-maxVal,created)); std::vector<std::string> v(2); v[0]=n1; v[1]=n2;
+ ChangeAllGroupsContainingFamily(groups,getFamilyNameGivenId(*famId),v);
+ }
+ maxVal+=2;
+ }
+ }
+ for(std::size_t i=0;i<familyIds.size();i++)
+ {
+ DataArrayInt *da=idsPerfamiliyIds[i];
+ famArr->setPartOfValuesSimple3(familyIds[i],da->begin(),da->end(),0,1,1);
+ }
+ _families=families;
+ _groups=groups;
+ _groups[grpName]=fams;
+}
+
void MEDFileMesh::changeAllGroupsContainingFamily(const std::string& familyNameToChange, const std::vector<std::string>& newFamiliesNames)
{
ChangeAllGroupsContainingFamily(_groups,familyNameToChange,newFamiliesNames);
return oss.str();
}
+/*!
+ * This method is nearly like getFamilyFieldAtLevel method. Except that if the array does not exist at the specified level \a meshDimRelToMaxExt
+ * an empty one is created.
+ */
+DataArrayInt *MEDFileMesh::getOrCreateAndGetFamilyFieldAtLevel(int meshDimRelToMaxExt)
+{
+ DataArrayInt *ret(getFamilyFieldAtLevel(meshDimRelToMaxExt));
+ if(ret)
+ return ret;
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> arr(DataArrayInt::New());
+ arr->alloc(getSizeAtLevel(meshDimRelToMaxExt),1);
+ arr->fillWithZero();
+ setFamilyFieldArr(meshDimRelToMaxExt,arr);
+ return getFamilyFieldAtLevel(meshDimRelToMaxExt);
+}
+
/*!
* Returns ids of mesh entities contained in a given group of a given dimension.
* \param [in] meshDimRelToMaxExt - a relative dimension of the mesh entities whose ids
{
if(meshDimRelToMaxExt==1)
return _fam_coords;
- const MEDFileUMeshSplitL1 *l1=getMeshAtLevSafe(meshDimRelToMaxExt);
+ const MEDFileUMeshSplitL1 *l1(getMeshAtLevSafe(meshDimRelToMaxExt));
+ return l1->getFamilyField();
+}
+
+DataArrayInt *MEDFileUMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt)
+{
+ if(meshDimRelToMaxExt==1)
+ return _fam_coords;
+ MEDFileUMeshSplitL1 *l1(getMeshAtLevSafe(meshDimRelToMaxExt));
return l1->getFamilyField();
}
int MEDFileUMesh::getNumberOfNodes() const
{
- const DataArrayDouble *coo=_coords;
+ const DataArrayDouble *coo(_coords);
if(!coo)
throw INTERP_KERNEL::Exception(" MEDFileUMesh::getNumberOfNodes : no coords set !");
return coo->getNumberOfTuples();
int MEDFileUMesh::getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const
{
- const MEDFileUMeshSplitL1 *l1=getMeshAtLevSafe(meshDimRelToMaxExt);
+ const MEDFileUMeshSplitL1 *l1(getMeshAtLevSafe(meshDimRelToMaxExt));
return l1->getNumberOfCells();
}
*/
void MEDFileUMesh::addNodeGroup(const DataArrayInt *ids)
{
- const DataArrayDouble *coords=_coords;
+ const DataArrayDouble *coords(_coords);
if(!coords)
throw INTERP_KERNEL::Exception("MEDFileUMesh::addNodeGroup : no coords set !");
- int nbOfNodes=coords->getNumberOfTuples();
+ int nbOfNodes(coords->getNumberOfTuples());
if(!((DataArrayInt *)_fam_coords))
{ _fam_coords=DataArrayInt::New(); _fam_coords->alloc(nbOfNodes,1); _fam_coords->fillWithZero(); }
//
*/
void MEDFileUMesh::addGroup(int meshDimRelToMaxExt, const DataArrayInt *ids)
{
- std::vector<int> levs=getNonEmptyLevelsExt();
+ std::vector<int> levs(getNonEmptyLevelsExt());
if(std::find(levs.begin(),levs.end(),meshDimRelToMaxExt)==levs.end())
{
std::ostringstream oss; oss << "MEDFileUMesh::addGroup : level " << meshDimRelToMaxExt << " not available ! Should be in ";
}
if(meshDimRelToMaxExt==1)
{ addNodeGroup(ids); return ; }
- MEDFileUMeshSplitL1 *lev=getMeshAtLevSafe(meshDimRelToMaxExt);
- DataArrayInt *fam=lev->getOrCreateAndGetFamilyField();
+ MEDFileUMeshSplitL1 *lev(getMeshAtLevSafe(meshDimRelToMaxExt));
+ DataArrayInt *fam(lev->getOrCreateAndGetFamilyField());
addGroupUnderground(false,ids,fam);
}
-/*!
- * \param [in] ids ids and group name of the new group to add. The ids should be sorted and different each other (MED file norm).
- * \parma [in,out] famArr family array on level of interest to be renumbered. The input pointer should be not \c NULL (no check of that will be performed)
- */
-void MEDFileUMesh::addGroupUnderground(bool isNodeGroup, const DataArrayInt *ids, DataArrayInt *famArr)
-{
- if(!ids)
- throw INTERP_KERNEL::Exception("MEDFileUMesh::addGroup : NULL pointer in input !");
- std::string grpName(ids->getName());
- if(grpName.empty())
- throw INTERP_KERNEL::Exception("MEDFileUMesh::addGroup : empty group name ! MED file format do not accept empty group name !");
- ids->checkStrictlyMonotonic(true);
- famArr->incrRef(); MEDCouplingAutoRefCountObjectPtr<DataArrayInt> famArrTmp(famArr);
- std::vector<std::string> grpsNames=getGroupsNames();
- if(std::find(grpsNames.begin(),grpsNames.end(),grpName)!=grpsNames.end())
- {
- std::ostringstream oss; oss << "MEDFileUMesh::addGroup : Group with name \"" << grpName << "\" already exists ! Destroy it before calling this method !";
- throw INTERP_KERNEL::Exception(oss.str().c_str());
- }
- std::list< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > allFamIds=getAllNonNullFamilyIds();
- allFamIds.erase(std::find(allFamIds.begin(),allFamIds.end(),famArrTmp));
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> famIds=famArr->selectByTupleIdSafe(ids->begin(),ids->end());
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> diffFamIds=famIds->getDifferentValues();
- std::vector<int> familyIds;
- std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > idsPerfamiliyIds;
- int maxVal=getTheMaxAbsFamilyId()+1;
- std::map<std::string,int> families(_families);
- std::map<std::string, std::vector<std::string> > groups(_groups);
- std::vector<std::string> fams;
- bool created(false);
- for(const int *famId=diffFamIds->begin();famId!=diffFamIds->end();famId++)
- {
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ids2Tmp=famIds->getIdsEqual(*famId);
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ids2=ids->selectByTupleId(ids2Tmp->begin(),ids2Tmp->end());
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ids1=famArr->getIdsEqual(*famId);
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret0(ids1->buildSubstractionOptimized(ids2));
- if(ret0->empty())
- {
- bool isFamPresent=false;
- for(std::list< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> >::const_iterator itl=allFamIds.begin();itl!=allFamIds.end() && !isFamPresent;itl++)
- isFamPresent=(*itl)->presenceOfValue(*famId);
- if(!isFamPresent)
- { familyIds.push_back(*famId); idsPerfamiliyIds.push_back(ret0); fams.push_back(FindOrCreateAndGiveFamilyWithId(families,*famId,created)); } // adding *famId in grp
- else
- {
- familyIds.push_back(isNodeGroup?maxVal:-maxVal); idsPerfamiliyIds.push_back(ids2);
- std::string locFamName=FindOrCreateAndGiveFamilyWithId(families,isNodeGroup?maxVal:-maxVal,created);
- fams.push_back(locFamName);
- if(existsFamily(*famId))
- {
- std::string locFamName2=getFamilyNameGivenId(*famId); std::vector<std::string> v(2); v[0]=locFamName2; v[1]=locFamName;
- ChangeAllGroupsContainingFamily(groups,getFamilyNameGivenId(*famId),v);
- }
- maxVal++;
- } // modifying all other groups on *famId to lie on maxVal and lie the grp on maxVal
- }
- else
- {
- familyIds.push_back(isNodeGroup?maxVal:-maxVal); idsPerfamiliyIds.push_back(ret0); // modifying all other groups on *famId to lie on maxVal and on maxVal+1
- familyIds.push_back(isNodeGroup?maxVal+1:-maxVal-1); idsPerfamiliyIds.push_back(ids2);//grp lie only on maxVal+1
- std::string n2(FindOrCreateAndGiveFamilyWithId(families,isNodeGroup?maxVal+1:-maxVal-1,created)); fams.push_back(n2);
- if(existsFamily(*famId))
- {
- std::string n1(FindOrCreateAndGiveFamilyWithId(families,isNodeGroup?maxVal:-maxVal,created)); std::vector<std::string> v(2); v[0]=n1; v[1]=n2;
- ChangeAllGroupsContainingFamily(groups,getFamilyNameGivenId(*famId),v);
- }
- maxVal+=2;
- }
- }
- for(std::size_t i=0;i<familyIds.size();i++)
- {
- DataArrayInt *da=idsPerfamiliyIds[i];
- famArr->setPartOfValuesSimple3(familyIds[i],da->begin(),da->end(),0,1,1);
- }
- _families=families;
- _groups=groups;
- _groups[grpName]=fams;
-}
-
/*!
* Changes a name of a family specified by its id.
* \param [in] id - the id of the family of interest.
nameArr->incrRef();
}
+/*!
+ * Adds a group of nodes to \a this mesh.
+ * \param [in] ids - a DataArrayInt providing ids and a name of the group to add.
+ * The ids should be sorted and different each other (MED file norm).
+ *
+ * \warning this method can alter default "FAMILLE_ZERO" family.
+ * For users sensitive to this a call to MEDFileMesh::rearrangeFamilies will be necessary after addGroup session.
+ *
+ * \throw If the node coordinates array is not set.
+ * \throw If \a ids == \c NULL.
+ * \throw If \a ids->getName() == "".
+ * \throw If \a ids does not respect the MED file norm.
+ * \throw If a group with name \a ids->getName() already exists.
+ */
+void MEDFileStructuredMesh::addNodeGroup(const DataArrayInt *ids)
+{
+ addGroup(1,ids);
+}
+
+/*!
+ * Adds a group of nodes/cells/faces/edges to \a this mesh.
+ *
+ * \param [in] ids - a DataArrayInt providing ids and a name of the group to add.
+ * The ids should be sorted and different each other (MED file norm).
+ *
+ * \warning this method can alter default "FAMILLE_ZERO" family.
+ * For users sensitive to this a call to MEDFileMesh::rearrangeFamilies will be necessary after addGroup session.
+ *
+ * \throw If the node coordinates array is not set.
+ * \throw If \a ids == \c NULL.
+ * \throw If \a ids->getName() == "".
+ * \throw If \a ids does not respect the MED file norm.
+ * \throw If a group with name \a ids->getName() already exists.
+ */
+void MEDFileStructuredMesh::addGroup(int meshDimRelToMaxExt, const DataArrayInt *ids)
+{
+ DataArrayInt *fam(getOrCreateAndGetFamilyFieldAtLevel(meshDimRelToMaxExt));
+ addGroupUnderground(false,ids,fam);
+ return ;
+}
+
/*!
* Returns the family field for mesh entities of a given dimension.
* \param [in] meshDimRelToMaxExt - the relative dimension of mesh entities.
}
}
+/*!
+ * Returns the family field for mesh entities of a given dimension.
+ * \param [in] meshDimRelToMaxExt - the relative dimension of mesh entities.
+ * \return const DataArrayInt * - the family field. It is an array of ids of families
+ * each mesh entity belongs to. It can be \c NULL.
+ * \throw If \a meshDimRelToMaxExt != 0 and \a meshDimRelToMaxExt != 1.
+ */
+DataArrayInt *MEDFileStructuredMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt)
+{
+ switch(meshDimRelToMaxExt)
+ {
+ case 0:
+ return _fam_cells;
+ case 1:
+ return _fam_nodes;
+ case -1:
+ return _fam_faces;
+ default:
+ throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getFamilyFieldAtLevel : Only available for levels 0 or 1 or -1 !");
+ }
+}
+
/*!
* Returns the optional numbers of mesh entities of a given dimension.
* \param [in] meshDimRelToMaxExt - the relative dimension of mesh entities.
arr->changeValue(oldId,newId);
}
+std::list< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > MEDFileStructuredMesh::getAllNonNullFamilyIds() const
+{
+ std::list< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > ret;
+ const DataArrayInt *da(_fam_nodes);
+ if(da)
+ { da->incrRef(); ret.push_back(MEDCouplingAutoRefCountObjectPtr<DataArrayInt>(const_cast<DataArrayInt *>(da))); }
+ da=_fam_cells;
+ if(da)
+ { da->incrRef(); ret.push_back(MEDCouplingAutoRefCountObjectPtr<DataArrayInt>(const_cast<DataArrayInt *>(da))); }
+ da=_fam_faces;
+ if(da)
+ { da->incrRef(); ret.push_back(MEDCouplingAutoRefCountObjectPtr<DataArrayInt>(const_cast<DataArrayInt *>(da))); }
+ return ret;
+}
+
void MEDFileStructuredMesh::deepCpyAttributes()
{
if((const DataArrayInt*)_fam_nodes)
return cmesh->getNumberOfNodes();
}
+int MEDFileStructuredMesh::getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const
+{
+ const MEDCouplingStructuredMesh *cmesh(getStructuredMesh());
+ if(!cmesh)
+ throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getNumberOfNodes : no cartesian mesh set !");
+ switch(meshDimRelToMaxExt)
+ {
+ case 0:
+ return cmesh->getNumberOfCells();
+ case -1:
+ return cmesh->getNumberOfCellsOfSubLevelMesh();
+ default:
+ throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getNumberOfNodes : only meshDimRelToMax=0 and meshDimRelToMax=-1 supported !");
+ }
+}
+
bool MEDFileStructuredMesh::hasImplicitPart() const
{
return true;
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 int getNumberOfCellsAtLevel(int meshDimRelToMaxExt) 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 void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr) = 0;
MEDLOADER_EXPORT virtual void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayInt *renumArr) = 0;
MEDLOADER_EXPORT virtual void setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr) = 0;
+ MEDLOADER_EXPORT virtual void addNodeGroup(const DataArrayInt *ids) = 0;
+ MEDLOADER_EXPORT virtual void addGroup(int meshDimRelToMaxExt, const DataArrayInt *ids) = 0;
MEDLOADER_EXPORT virtual const DataArrayInt *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const = 0;
+ MEDLOADER_EXPORT virtual DataArrayInt *getFamilyFieldAtLevel(int meshDimRelToMaxExt) = 0;
+ MEDLOADER_EXPORT DataArrayInt *getOrCreateAndGetFamilyFieldAtLevel(int meshDimRelToMaxExt);
MEDLOADER_EXPORT virtual const DataArrayInt *getNumberFieldAtLevel(int meshDimRelToMaxExt) const = 0;
MEDLOADER_EXPORT virtual const DataArrayInt *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const = 0;
MEDLOADER_EXPORT virtual const DataArrayAsciiChar *getNameFieldAtLevel(int meshDimRelToMaxExt) const = 0;
void getFamilyRepr(std::ostream& oss) const;
virtual void appendFamilyEntries(const DataArrayInt *famIds, const std::vector< std::vector<int> >& fidsOfGrps, const std::vector<std::string>& grpNames);
virtual void changeFamilyIdArr(int oldId, int newId) = 0;
+ virtual std::list< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > getAllNonNullFamilyIds() const = 0;
+ void addGroupUnderground(bool isNodeGroup, const DataArrayInt *ids, DataArrayInt *famArr);
static void TranslateFamilyIds(int offset, DataArrayInt *famArr, std::vector< std::vector<int> >& famIdsPerGrp);
static void ChangeAllGroupsContainingFamily(std::map<std::string, std::vector<std::string> >& groups, const std::string& familyNameToChange, const std::vector<std::string>& newFamiliesNames);
static std::string FindOrCreateAndGiveFamilyWithId(std::map<std::string,int>& families, int id, bool& created);
MEDLOADER_EXPORT std::string advancedRepr() const;
MEDLOADER_EXPORT int getSizeAtLevel(int meshDimRelToMaxExt) const;
MEDLOADER_EXPORT const DataArrayInt *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const;
+ MEDLOADER_EXPORT DataArrayInt *getFamilyFieldAtLevel(int meshDimRelToMaxExt);
MEDLOADER_EXPORT const DataArrayInt *getNumberFieldAtLevel(int meshDimRelToMaxExt) const;
MEDLOADER_EXPORT const DataArrayInt *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const;
MEDLOADER_EXPORT const DataArrayAsciiChar *getNameFieldAtLevel(int meshDimRelToMaxExt) const;
void synchronizeTinyInfoOnLeaves() const;
void changeFamilyIdArr(int oldId, int newId);
std::list< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > getAllNonNullFamilyIds() const;
- void addGroupUnderground(bool isNodeGroup, const DataArrayInt *ids, DataArrayInt *famArr);
MEDCouplingAutoRefCountObjectPtr<MEDFileUMeshSplitL1>& checkAndGiveEntryInSplitL1(int meshDimRelToMax, MEDCouplingPointSet *m);
private:
std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileUMeshSplitL1> > _ms;
MEDLOADER_EXPORT void clearNonDiscrAttributes() const;
MEDLOADER_EXPORT DataArrayInt *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
MEDLOADER_EXPORT const DataArrayInt *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const;
+ MEDLOADER_EXPORT DataArrayInt *getFamilyFieldAtLevel(int meshDimRelToMaxExt);
MEDLOADER_EXPORT void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr);
MEDLOADER_EXPORT void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayInt *renumArr);
MEDLOADER_EXPORT void setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr);
+ MEDLOADER_EXPORT void addNodeGroup(const DataArrayInt *ids);
+ MEDLOADER_EXPORT void addGroup(int meshDimRelToMaxExt, const DataArrayInt *ids);
MEDLOADER_EXPORT const DataArrayInt *getNumberFieldAtLevel(int meshDimRelToMaxExt) const;
MEDLOADER_EXPORT const DataArrayInt *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const;
MEDLOADER_EXPORT const DataArrayAsciiChar *getNameFieldAtLevel(int meshDimRelToMaxExt) const;
MEDCouplingMesh *getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
MEDLOADER_EXPORT int getSizeAtLevel(int meshDimRelToMaxExt) const;
MEDLOADER_EXPORT int getNumberOfNodes() const;
+ MEDLOADER_EXPORT int getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const;
MEDLOADER_EXPORT bool hasImplicitPart() const;
MEDLOADER_EXPORT int buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const;
MEDLOADER_EXPORT void releaseImplicitPartIfAny() const;
protected:
~MEDFileStructuredMesh() { }
void changeFamilyIdArr(int oldId, int newId);
+ std::list< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > getAllNonNullFamilyIds() const;
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;