Public Member Functions | |
virtual void | addFamily (const std::string &familyName, int id) |
void | addFamilyOnGrp (const std::string &grpName, const std::string &famName) |
virtual void | addGroup (int meshDimRelToMaxExt, const DataArrayInt *ids)=0 |
virtual void | addNodeGroup (const DataArrayInt *ids)=0 |
virtual std::string | advancedRepr () const =0 |
bool | areFamsEqual (const MEDFileMesh *other, std::string &what) const |
bool | areGrpsEqual (const MEDFileMesh *other, std::string &what) const |
void | assignFamilyNameWithGroupName () |
virtual int | buildImplicitPartIfAny (INTERP_KERNEL::NormalizedCellType gt) const =0 |
virtual MEDFileMesh * | cartesianize () const =0 |
void | changeAllGroupsContainingFamily (const std::string &familyNameToChange, const std::vector< std::string > &newFamiliesNames) |
void | changeFamilyId (int oldId, int newId) |
void | changeFamilyName (const std::string &oldName, const std::string &newName) |
void | changeGroupName (const std::string &oldName, const std::string &newName) |
bool | changeNames (const std::vector< std::pair< std::string, std::string > > &modifTab) |
void | checkOrphanFamilyZero () const |
void | clearFamGrpMaps () |
void | clearFamMap () |
void | clearGrpMap () |
virtual void | clearNonDiscrAttributes () const |
DataArrayInt * | computeAllFamilyIdsInUse () const |
void | copyFamGrpMapsFrom (const MEDFileMesh &other) |
virtual void | createGroupOnAll (int meshDimRelToMaxExt, const std::string &groupName) |
virtual MEDFileMesh * | createNewEmpty () const =0 |
virtual MEDFileMesh * | deepCopy () const =0 |
bool | ensureDifferentFamIdsPerLevel () |
bool | existsFamily (int famId) const |
bool | existsFamily (const std::string &familyName) const |
bool | existsGroup (const std::string &groupName) const |
std::string | findOrCreateAndGiveFamilyWithId (int id, bool &created) |
DataArrayInt * | getAllFamiliesIdsReferenced () const |
std::vector < INTERP_KERNEL::NormalizedCellType > | getAllGeoTypes () const |
MEDCouplingAxisType | getAxisType () const |
std::string | getDescription () const |
std::vector< const BigMemoryObject * > | getDirectChildrenWithNull () const |
virtual std::vector< int > | getDistributionOfTypes (int meshDimRelToMax) const |
MEDFileEquivalences * | getEquivalences () |
const MEDFileEquivalences * | getEquivalences () const |
virtual std::vector< int > | getFamArrNonEmptyLevelsExt () const =0 |
virtual DataArrayInt * | getFamiliesArr (int meshDimRelToMaxExt, const std::vector< std::string > &fams, bool renum=false) const =0 |
std::vector< int > | getFamiliesIds (const std::vector< std::string > &famNames) const |
std::vector< int > | getFamiliesIdsOnGroup (const std::string &name) const |
std::vector< std::string > | getFamiliesNames () const |
std::vector< std::string > | getFamiliesNamesWithFilePointOfView () const |
std::vector< std::string > | getFamiliesOnGroup (const std::string &name) const |
std::vector< std::string > | getFamiliesOnGroups (const std::vector< std::string > &grps) const |
virtual DataArrayInt * | getFamilyArr (int meshDimRelToMaxExt, const std::string &fam, bool renum=false) const |
virtual const DataArrayInt * | getFamilyFieldAtLevel (int meshDimRelToMaxExt) const =0 |
virtual DataArrayInt * | getFamilyFieldAtLevel (int meshDimRelToMaxExt)=0 |
int | getFamilyId (const std::string &name) const |
const std::map< std::string, int > & | getFamilyInfo () const |
std::string | getFamilyNameGivenId (int id) const |
std::vector< int > | getFamNonEmptyLevels (const std::string &fam) const |
std::vector< int > | getFamNonEmptyLevelsExt (const std::string &fam) const |
virtual std::vector< int > | getFamsNonEmptyLevels (const std::vector< std::string > &fams) const =0 |
virtual std::vector< int > | getFamsNonEmptyLevelsExt (const std::vector< std::string > &fams) const =0 |
virtual std::vector < INTERP_KERNEL::NormalizedCellType > | getGeoTypesAtLevel (int meshDimRelToMax) const =0 |
virtual DataArrayInt * | getGroupArr (int meshDimRelToMaxExt, const std::string &grp, bool renum=false) const |
const std::map< std::string, std::vector< std::string > > & | getGroupInfo () const |
virtual DataArrayInt * | getGroupsArr (int meshDimRelToMaxExt, const std::vector< std::string > &grps, bool renum=false) const |
std::vector< std::string > | getGroupsNames () const |
std::vector< std::string > | getGroupsOnFamily (const std::string &name) const |
std::vector< std::string > | getGroupsOnSpecifiedLev (int meshDimRelToMaxExt) const |
std::vector< int > | getGrpNonEmptyLevels (const std::string &grp) const |
std::vector< int > | getGrpNonEmptyLevelsExt (const std::string &grp) const |
std::vector< int > | getGrpsNonEmptyLevels (const std::vector< std::string > &grps) const |
std::vector< int > | getGrpsNonEmptyLevelsExt (const std::vector< std::string > &grps) const |
std::size_t | getHeapMemorySizeWithoutChildren () const |
int | getIteration () const |
MEDFileJoints * | getJoints () const |
int | getMaxAbsFamilyId () const |
virtual int | getMaxAbsFamilyIdInArrays () const =0 |
int | getMaxFamilyId () const |
virtual int | getMaxFamilyIdInArrays () const =0 |
virtual MEDCouplingMesh * | getMeshAtLevel (int meshDimRelToMax, bool renum=false) const =0 |
virtual int | getMeshDimension () const =0 |
int | getMinFamilyId () const |
virtual int | getMinFamilyIdInArrays () const =0 |
std::string | getName () const |
virtual std::vector< int > | getNameArrNonEmptyLevelsExt () const =0 |
virtual const DataArrayAsciiChar * | getNameFieldAtLevel (int meshDimRelToMaxExt) const =0 |
virtual DataArrayInt * | getNodeFamiliesArr (const std::vector< std::string > &fams, bool renum=false) const |
virtual DataArrayInt * | getNodeFamilyArr (const std::string &fam, bool renum=false) const |
virtual DataArrayInt * | getNodeGroupArr (const std::string &grp, bool renum=false) const |
virtual DataArrayInt * | getNodeGroupsArr (const std::vector< std::string > &grps, bool renum=false) const |
virtual std::vector< int > | getNonEmptyLevels () const =0 |
virtual std::vector< int > | getNonEmptyLevelsExt () const =0 |
virtual std::vector< int > | getNumArrNonEmptyLevelsExt () const =0 |
virtual const DataArrayInt * | getNumberFieldAtLevel (int meshDimRelToMaxExt) const =0 |
virtual int | getNumberOfCellsAtLevel (int meshDimRelToMaxExt) const =0 |
virtual int | getNumberOfCellsWithType (INTERP_KERNEL::NormalizedCellType ct) const =0 |
int | getNumberOfJoints () const |
virtual int | getNumberOfNodes () const =0 |
DataArrayInt * | getOrCreateAndGetFamilyFieldAtLevel (int meshDimRelToMaxExt) |
int | getOrder () const |
virtual const DataArrayInt * | getRevNumberFieldAtLevel (int meshDimRelToMaxExt) const =0 |
virtual int | getSizeAtLevel (int meshDimRelToMaxExt) const =0 |
int | getTheMaxAbsFamilyId () const |
int | getTheMaxFamilyId () const |
int | getTheMinFamilyId () const |
double | getTime (int &dt, int &it) const |
std::string | getTimeUnit () const |
double | getTimeValue () const |
std::string | getUnivName () const |
bool | getUnivNameWrStatus () const |
virtual bool | hasImplicitPart () const =0 |
void | initializeEquivalences () |
virtual bool | isEqual (const MEDFileMesh *other, double eps, std::string &what) const |
virtual bool | keepFamIdsOnlyOnLevs (const std::vector< int > &famIds, const std::vector< int > &levs) |
void | killEquivalences () |
virtual void | killStructureElements () |
void | normalizeFamIdsMEDFile () |
void | normalizeFamIdsTrio () |
virtual bool | presenceOfStructureElements () const =0 |
void | rearrangeFamilies () |
virtual void | releaseImplicitPartIfAny () const =0 |
std::vector< std::string > | removeEmptyGroups () |
void | removeFamiliesReferedByNoGroups () |
void | removeFamily (const std::string &name) |
void | removeGroup (const std::string &name) |
std::vector< std::string > | removeOrphanFamilies () |
std::vector< std::string > | removeOrphanGroups () |
void | setAxisType (MEDCouplingAxisType at) |
void | setDescription (const std::string &name) |
void | setFamiliesIdsOnGroup (const std::string &name, const std::vector< int > &famIds) |
void | setFamiliesOnGroup (const std::string &name, const std::vector< std::string > &fams) |
virtual void | setFamilyFieldArr (int meshDimRelToMaxExt, DataArrayInt *famArr)=0 |
void | setFamilyId (const std::string &familyName, int id) |
void | setFamilyIdUnique (const std::string &familyName, int id) |
void | setFamilyInfo (const std::map< std::string, int > &info) |
void | setGroupInfo (const std::map< std::string, std::vector< std::string > > &info) |
virtual void | setGroupsAtLevel (int meshDimRelToMaxExt, const std::vector< const DataArrayInt * > &grps, bool renum=false) |
void | setGroupsOnFamily (const std::string &famName, const std::vector< std::string > &grps) |
void | setIteration (int it) |
void | setJoints (MEDFileJoints *joints) |
virtual void | setName (const std::string &name) |
virtual void | setNameFieldAtLevel (int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr)=0 |
void | setOrder (int order) |
virtual void | setRenumFieldArr (int meshDimRelToMaxExt, DataArrayInt *renumArr)=0 |
void | setTime (int dt, int it, double time) |
void | setTimeUnit (const std::string &unit) |
void | setTimeValue (double time) |
void | setUnivNameWrStatus (bool newStatus) |
virtual MEDFileMesh * | shallowCpy () const =0 |
virtual std::string | simpleRepr () const |
virtual bool | unPolyze (std::vector< int > &oldCode, std::vector< int > &newCode, DataArrayInt *&o2nRenumCell)=0 |
virtual void | whichAreNodesFetched (const MEDFileField1TSStructItem &st, const MEDFileFieldGlobsReal *globs, std::vector< bool > &nodesFetched) const =0 |
void | writeLL (med_idt fid) const |
Static Public Member Functions | |
static TypeOfField | ConvertFromMEDFileEntity (med_entity_type etype) |
static INTERP_KERNEL::NormalizedCellType | ConvertFromMEDFileGeoType (med_geometry_type geoType) |
static std::string | GetMagicFamilyStr () |
static MEDFileMesh * | New (const std::string &fileName, MEDFileMeshReadSelector *mrs=0) |
static MEDFileMesh * | New (med_idt fid, MEDFileMeshReadSelector *mrs=0) |
static MEDFileMesh * | New (DataArrayByte *db) |
static MEDFileMesh * | New (const std::string &fileName, const std::string &mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0, MEDFileJoints *joints=0) |
static MEDFileMesh * | New (med_idt fid, const std::string &mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0, MEDFileJoints *joints=0) |
Static Public Attributes | |
static const char | DFT_FAM_NAME [] ="FAMILLE_ZERO" |
Protected Member Functions | |
void | addFamilyOnAllGroupsHaving (const std::string &famName, const std::string &otherFamName) |
void | addGroupUnderground (bool isNodeGroup, const DataArrayInt *ids, DataArrayInt *famArr) |
virtual void | appendFamilyEntries (const DataArrayInt *famIds, const std::vector< std::vector< int > > &fidsOfGrps, const std::vector< std::string > &grpNames) |
bool | areEquivalencesEqual (const MEDFileMesh *other, std::string &what) const |
virtual void | changeFamilyIdArr (int oldId, int newId)=0 |
void | checkCartesian () const |
void | dealWithTinyInfo (const MEDCouplingMesh *m) |
void | deepCpyEquivalences (const MEDFileMesh &other) |
virtual std::list< MCAuto < DataArrayInt > > | getAllNonNullFamilyIds () const =0 |
void | getEquivalencesRepr (std::ostream &oss) const |
void | getFamilyRepr (std::ostream &oss) const |
void | loadEquivalences (med_idt fid) |
void | loadJointsFromFile (med_idt fid, MEDFileJoints *toUseInstedOfReading=0) |
virtual void | loadLL (med_idt fid, const std::string &mName, int dt, int it, MEDFileMeshReadSelector *mrs)=0 |
void | loadLLWithAdditionalItems (med_idt fid, const std::string &mName, int dt, int it, MEDFileMeshReadSelector *mrs) |
MEDFileMesh () | |
void | setUnivName (const std::string &name) |
virtual void | synchronizeTinyInfoOnLeaves () const =0 |
void | writeJoints (med_idt fid) const |
Protected Member Functions inherited from MEDCoupling::RefCountObject | |
RefCountObject () | |
RefCountObject (const RefCountObject &other) | |
virtual | ~RefCountObject () |
Protected Member Functions inherited from MEDCoupling::RefCountObjectOnly | |
RefCountObjectOnly () | |
RefCountObjectOnly (const RefCountObjectOnly &other) | |
virtual | ~RefCountObjectOnly () |
Static Protected Member Functions | |
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 | CreateNameNotIn (const std::string &nameTry, const std::vector< std::string > &namesToAvoid) |
static std::string | FindOrCreateAndGiveFamilyWithId (std::map< std::string, int > &families, int id, bool &created) |
static int | PutInThirdComponentOfCodeOffset (std::vector< int > &code, int strt) |
static void | TranslateFamilyIds (int offset, DataArrayInt *famArr, std::vector< std::vector< int > > &famIdsPerGrp) |
Protected Attributes | |
MEDCouplingAxisType | _axis_type |
std::string | _desc_name |
std::string | _dt_unit |
MCAuto< MEDFileEquivalences > | _equiv |
std::map< std::string, int > | _families |
std::map< std::string, std::vector< std::string > > | _groups |
int | _iteration |
MCAuto< MEDFileJoints > | _joints |
std::string | _name |
int | _order |
double | _time |
std::string | _univ_name |
bool | _univ_wr_status |
|
protected |
|
static |
Returns a new MEDFileMesh holding the mesh data that has been read from a given MED file. The first mesh in the file is loaded.
[in] | fileName | - the name of MED file to read. |
If | the file is not readable. |
If | there is no meshes in the file. |
If | the mesh in the file is of a not supported type. |
Referenced by MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::getFieldAtLevel(), MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::getFieldAtTopLevel(), New(), MEDCoupling::ReadField(), MEDCoupling::ReadFieldCell(), MEDCoupling::ReadFieldGauss(), MEDCoupling::ReadFieldGaussNE(), MEDCoupling::ReadFieldNode(), MEDCoupling::ReadFieldsOnSameMesh(), MEDCoupling::ReadMeshFromFile(), MEDCoupling::ReadUMeshFromFamilies(), MEDCoupling::ReadUMeshFromFile(), MEDCoupling::ReadUMeshFromGroups(), and MEDCoupling::WriteField().
|
static |
|
static |
|
static |
Returns a new MEDFileMesh holding the mesh data that has been read from a given MED file. The mesh to load is specified by its name and numbers of a time step and an iteration.
[in] | fileName | - the name of MED file to read. |
[in] | mName | - the name of the mesh to read. |
[in] | dt | - the number of a time step. |
[in] | it | - the number of an iteration. |
[in] | joints | - the sub-domain joints to use instead of those that can be read from the MED file. Usually this joints are those just read by another iteration of mName mesh, when this method is called by MEDFileMeshMultiTS::New() |
If | the file is not readable. |
If | there is no mesh with given attributes in the file. |
If | the mesh in the file is of a not supported type. |
References New().
|
static |
void MEDFileMesh::writeLL | ( | med_idt | fid | ) | const |
Writes this mesh into an open MED file specified by its descriptor.
[in] | fid | - the MED file descriptor. |
If | the mesh name is not set. |
If | the file is open for reading only. |
If | the writing mode == 1 and the same data is present in an existing file. |
References _equiv, _name, addFamily(), DFT_FAM_NAME, existsFamily(), and writeJoints().
|
virtual |
Implements MEDCoupling::BigMemoryObject.
Reimplemented in MEDCoupling::MEDFileCurveLinearMesh, MEDCoupling::MEDFileCMesh, MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
References _desc_name, _dt_unit, _families, _groups, _name, and _univ_name.
Referenced by MEDCoupling::MEDFileUMesh::getHeapMemorySizeWithoutChildren(), and MEDCoupling::MEDFileStructuredMesh::getHeapMemorySizeWithoutChildren().
|
virtual |
Implements MEDCoupling::BigMemoryObject.
Reimplemented in MEDCoupling::MEDFileCurveLinearMesh, MEDCoupling::MEDFileCMesh, MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
References _equiv.
Referenced by MEDCoupling::MEDFileUMesh::getDirectChildrenWithNull(), and MEDCoupling::MEDFileStructuredMesh::getDirectChildrenWithNull().
|
pure virtual |
Implemented in MEDCoupling::MEDFileCurveLinearMesh, MEDCoupling::MEDFileCMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileCurveLinearMesh, MEDCoupling::MEDFileCMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileCurveLinearMesh, MEDCoupling::MEDFileCMesh, and MEDCoupling::MEDFileUMesh.
|
virtual |
Checks if this and another mesh are equal.
[in] | other | - the mesh to compare with. |
[in] | eps | - a precision used to compare real values. |
[in,out] | what | - the string returning description of unequal data. |
true
if the meshes are equal, false
, else. Reimplemented in MEDCoupling::MEDFileCurveLinearMesh, MEDCoupling::MEDFileCMesh, MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
References _desc_name, _dt_unit, _iteration, _name, _order, _time, areEquivalencesEqual(), areFamsEqual(), and areGrpsEqual().
Referenced by MEDCoupling::MEDFileUMesh::isEqual(), and MEDCoupling::MEDFileStructuredMesh::isEqual().
|
virtual |
Clears redundant attributes of incorporated data arrays.
Reimplemented in MEDCoupling::MEDFileCurveLinearMesh, MEDCoupling::MEDFileCMesh, MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by MEDCoupling::MEDFileUMesh::clearNonDiscrAttributes(), and MEDCoupling::MEDFileStructuredMesh::clearNonDiscrAttributes().
|
virtual |
Reimplemented in MEDCoupling::MEDFileUMesh.
References _name.
Referenced by MEDCoupling::MEDFileStructuredMesh::loadStrMeshFromFile(), and MEDCoupling::MEDFileUMesh::setName().
bool MEDFileMesh::changeNames | ( | const std::vector< std::pair< std::string, std::string > > & | modifTab | ) |
References _name.
Referenced by MEDCoupling::MEDFileMeshMultiTS::changeNames().
std::string MEDCoupling::MEDFileMesh::getName | ( | ) | const |
References _name.
Referenced by MEDCoupling::MEDFileData::Aggregate(), MEDCoupling::MEDFileUMesh::Aggregate(), MEDCoupling::MEDFileUMesh::buildExtrudedMesh(), MEDCoupling::MEDFileUMesh::buildInnerBoundaryAlongM1Group(), MEDCoupling::MEDFileAnyTypeFieldMultiTS::CheckSupportAcrossTime(), MEDCoupling::MEDFileUMesh::extractPart(), MEDCoupling::MEDFileField1TS::extractPart(), MEDCoupling::MEDFileUMesh::getMeshAtLevel(), MEDCoupling::ReadMeshFromFile(), MEDCoupling::ReadUMeshFromFamilies(), MEDCoupling::ReadUMeshFromFile(), MEDCoupling::ReadUMeshFromGroups(), setGroupsAtLevel(), and simpleRepr().
std::string MEDCoupling::MEDFileMesh::getUnivName | ( | ) | const |
References _univ_name.
bool MEDCoupling::MEDFileMesh::getUnivNameWrStatus | ( | ) | const |
References _univ_wr_status.
void MEDCoupling::MEDFileMesh::setUnivNameWrStatus | ( | bool | newStatus | ) |
References _univ_wr_status.
void MEDCoupling::MEDFileMesh::setDescription | ( | const std::string & | name | ) |
References _desc_name.
Referenced by MEDCoupling::MEDFileStructuredMesh::loadStrMeshFromFile().
std::string MEDCoupling::MEDFileMesh::getDescription | ( | ) | const |
References _desc_name.
Referenced by simpleRepr().
void MEDCoupling::MEDFileMesh::setOrder | ( | int | order | ) |
References _order.
Referenced by MEDCoupling::MEDFileStructuredMesh::loadStrMeshFromFile().
int MEDCoupling::MEDFileMesh::getOrder | ( | ) | const |
References _order.
Referenced by MEDCoupling::MEDFileAnyTypeFieldMultiTS::CheckSupportAcrossTime().
void MEDCoupling::MEDFileMesh::setIteration | ( | int | it | ) |
References _iteration.
Referenced by MEDCoupling::MEDFileStructuredMesh::loadStrMeshFromFile().
int MEDCoupling::MEDFileMesh::getIteration | ( | ) | const |
References _iteration.
Referenced by MEDCoupling::MEDFileAnyTypeFieldMultiTS::CheckSupportAcrossTime().
void MEDCoupling::MEDFileMesh::setTimeValue | ( | double | time | ) |
References _time.
Referenced by MEDCoupling::MEDFileStructuredMesh::loadStrMeshFromFile().
void MEDCoupling::MEDFileMesh::setTime | ( | int | dt, |
int | it, | ||
double | time | ||
) |
References _iteration, _order, and _time.
double MEDCoupling::MEDFileMesh::getTime | ( | int & | dt, |
int & | it | ||
) | const |
References _iteration, _order, and _time.
double MEDCoupling::MEDFileMesh::getTimeValue | ( | ) | const |
References _time.
void MEDCoupling::MEDFileMesh::setTimeUnit | ( | const std::string & | unit | ) |
References _dt_unit.
Referenced by MEDCoupling::MEDFileStructuredMesh::loadStrMeshFromFile().
std::string MEDCoupling::MEDFileMesh::getTimeUnit | ( | ) | const |
References _dt_unit.
void MEDCoupling::MEDFileMesh::setAxisType | ( | MEDCouplingAxisType | at | ) |
MEDCouplingAxisType MEDCoupling::MEDFileMesh::getAxisType | ( | ) | const |
std::vector< INTERP_KERNEL::NormalizedCellType > MEDFileMesh::getAllGeoTypes | ( | ) | const |
References getGeoTypesAtLevel(), and getNonEmptyLevels().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by getAllGeoTypes().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by getAllGeoTypes().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by createGroupOnAll(), ensureDifferentFamIdsPerLevel(), keepFamIdsOnlyOnLevs(), normalizeFamIdsMEDFile(), normalizeFamIdsTrio(), and rearrangeFamilies().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by computeAllFamilyIdsInUse().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by getOrCreateAndGetFamilyFieldAtLevel(), and setGroupsAtLevel().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by getDistributionOfTypes(), MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel(), MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::getFieldWithProfile(), MEDCoupling::ReadFieldCell(), MEDCoupling::ReadFieldGauss(), MEDCoupling::ReadFieldGaussNE(), MEDCoupling::ReadFieldNode(), and MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::setFieldProfile().
|
virtual |
Reimplemented in MEDCoupling::MEDFileUMesh.
References MEDCoupling::MEDCouplingMesh::getDistributionOfTypes(), and getMeshAtLevel().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileCurveLinearMesh, MEDCoupling::MEDFileCMesh, and MEDCoupling::MEDFileUMesh.
Referenced by MEDCoupling::MEDFileMeshMultiTS::cartesianizeMe().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
|
virtual |
Reimplemented in MEDCoupling::MEDFileUMesh.
bool MEDFileMesh::areFamsEqual | ( | const MEDFileMesh * | other, |
std::string & | what | ||
) | const |
Checks if this and another mesh contains the same families.
[in] | other | - the mesh to compare with this one. |
[in,out] | what | - an unused parameter. |
true
if number of families and their ids are the same in the two meshes. Families with the id == 0
are not considered. References _families.
Referenced by isEqual().
bool MEDFileMesh::areGrpsEqual | ( | const MEDFileMesh * | other, |
std::string & | what | ||
) | const |
Checks if this and another mesh contains the same groups.
[in] | other | - the mesh to compare with this one. |
[in,out] | what | - a string describing a difference of groups of the two meshes in case if this method returns false . |
true
if number of groups and families constituting them are the same in the two meshes. References _groups.
Referenced by isEqual().
bool MEDFileMesh::existsGroup | ( | const std::string & | groupName | ) | const |
Checks if a group with a given name exists in this mesh.
[in] | groupName | - the group name. |
true
the group groupName exists in this mesh. References _groups.
Referenced by createGroupOnAll().
bool MEDFileMesh::existsFamily | ( | int | famId | ) | const |
Checks if a family with a given id exists in this mesh.
[in] | famId | - the family id. |
true
the family with the id famId exists in this mesh. References _families.
Referenced by addGroupUnderground(), and writeLL().
bool MEDFileMesh::existsFamily | ( | const std::string & | familyName | ) | const |
Checks if a family with a given name exists in this mesh.
[in] | familyName | - the family name. |
true
the family familyName exists in this mesh. References _families.
void MEDFileMesh::setFamilyId | ( | const std::string & | familyName, |
int | id | ||
) |
Sets an id of a family.
[in] | familyName | - the family name. |
[in] | id | - a new id of the family. |
References _families.
Referenced by MEDCoupling::MEDFileUMesh::New().
void MEDFileMesh::setFamilyIdUnique | ( | const std::string & | familyName, |
int | id | ||
) |
References _families.
|
virtual |
Adds a family to this mesh.
[in] | familyName | - a name of the family. |
[in] | famId | - an id of the family. |
If | a family with the same name or id already exists in this mesh. |
References _families.
Referenced by MEDCoupling::MEDFileUMesh::buildInnerBoundaryAlongM1Group(), and writeLL().
|
virtual |
Creates a group including all mesh entities of given dimension.
[in] | meshDimRelToMaxExt | - a relative dimension of mesh entities to include to the group. |
[in] | groupName | - a name of the new group. |
If | a group named groupName already exists. |
If | no mesh entities of dimension meshDimRelToMaxExt exist in this mesh. |
If | no family field of dimension meshDimRelToMaxExt is present in this mesh. |
References _groups, MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::end(), existsGroup(), findOrCreateAndGiveFamilyWithId(), MEDCoupling::DataArrayInt::getDifferentValues(), getFamilyFieldAtLevel(), and getNonEmptyLevelsExt().
|
virtual |
Ensures that given family ids do not present in family fields of dimensions different than given ones. If a family id is present in the family fields of dimensions different than the given ones, a new family is created and the whole data is updated accordingly.
[in] | famIds | - a sequence of family ids to check. |
[in] | vMeshDimRelToMaxExt | - a sequence of relative dimensions to which the famIds should exclusively belong. |
true
if no modification is done in this mesh by this method. References _families, addFamilyOnAllGroupsHaving(), MEDCoupling::DataArrayTemplate< T >::begin(), CreateNameNotIn(), MEDCoupling::DataArrayTemplate< T >::end(), MEDCoupling::DataArrayInt::getDifferentValues(), getFamiliesNames(), getFamilyFieldAtLevel(), getFamilyNameGivenId(), getMaxFamilyId(), and getNonEmptyLevelsExt().
void MEDFileMesh::addFamilyOnGrp | ( | const std::string & | grpName, |
const std::string & | famName | ||
) |
Adds a family to a given group in this mesh. If the group with a given name does not exist, it is created.
[in] | grpName | - the name of the group to add the family in. |
[in] | famName | - the name of the family to add to the group named grpName. |
If | grpName or famName is an empty string. |
If | no family named famName is present in this mesh. |
References _groups, and getFamiliesNames().
Referenced by MEDCoupling::MEDFileUMesh::buildInnerBoundaryAlongM1Group(), and ensureDifferentFamIdsPerLevel().
std::string MEDFileMesh::findOrCreateAndGiveFamilyWithId | ( | int | id, |
bool & | created | ||
) |
Returns a name of the family having a given id or, if no such a family exists, creates a new uniquely named family and returns its name.
[in] | id | - the id of the family whose name is required. |
[out] | created | - returns true if the new family has been created, false , else. |
If | it is not possible to create a unique family name. |
References _families, and FindOrCreateAndGiveFamilyWithId().
Referenced by createGroupOnAll(), and ensureDifferentFamIdsPerLevel().
void MEDFileMesh::setFamilyInfo | ( | const std::map< std::string, int > & | info | ) |
Sets names and ids of all families in this mesh.
[in] | info | - a map of a family name to a family id. |
References _families.
Referenced by MEDCoupling::MEDFileUMesh::Aggregate().
void MEDFileMesh::setGroupInfo | ( | const std::map< std::string, std::vector< std::string > > & | info | ) |
Sets names of all groups and families constituting them in this mesh.
[in] | info | - a map of a group name to a vector of names of families constituting the group. |
References _groups.
Referenced by MEDCoupling::MEDFileUMesh::Aggregate().
void MEDFileMesh::copyFamGrpMapsFrom | ( | const MEDFileMesh & | other | ) |
Copies data on groups and families from another mesh.
[in] | other | - the mesh to copy the data from. |
References _families, and _groups.
Referenced by MEDCoupling::MEDFileUMesh::extractPart(), MEDCoupling::MEDFileUMesh::linearToQuadratic(), and MEDCoupling::MEDFileUMesh::quadraticToLinear().
void MEDFileMesh::clearGrpMap | ( | ) |
This method clear all the groups in the map. So this method does not operate at all on arrays. So this method can lead to orphan families.
References _groups.
Referenced by clearFamGrpMaps().
void MEDFileMesh::clearFamMap | ( | ) |
This method clear all the families in the map. So this method does not operate at all on arrays. WARNING ! if there are some groups lying on cleared families, those groups will be impacted !
References _families.
Referenced by clearFamGrpMaps().
void MEDFileMesh::clearFamGrpMaps | ( | ) |
This method clear all the families and groups in the map. So this method does not operate at all on arrays. As all groups and families entry will be removed after the call of MEDFileMesh::setFamilyFieldArr method with 0 or None (python) in the 2nd parameter can be useful to reduce the size of the object.
References clearFamMap(), and clearGrpMap().
const std::map<std::string,int>& MEDCoupling::MEDFileMesh::getFamilyInfo | ( | ) | const |
References _families.
const std::map<std::string, std::vector<std::string> >& MEDCoupling::MEDFileMesh::getGroupInfo | ( | ) | const |
References _groups.
std::vector< std::string > MEDFileMesh::getFamiliesOnGroup | ( | const std::string & | name | ) | const |
Returns names of families constituting a group.
[in] | name | - the name of the group of interest. |
If | the name of a nonexistent group is specified. |
References _groups, and getGroupsNames().
Referenced by getGrpNonEmptyLevels(), and getGrpNonEmptyLevelsExt().
std::vector< std::string > MEDFileMesh::getFamiliesOnGroups | ( | const std::vector< std::string > & | grps | ) | const |
Returns names of families constituting some groups.
[in] | grps | - a sequence of names of groups of interest. |
If | a name of a nonexistent group is present in grps. |
References _groups, _name, and getGroupsNames().
Referenced by MEDCoupling::MEDFileUMesh::getGroups(), getGroupsArr(), getGrpsNonEmptyLevels(), and getGrpsNonEmptyLevelsExt().
std::vector< int > MEDFileMesh::getFamiliesIdsOnGroup | ( | const std::string & | name | ) | const |
Returns ids of families constituting a group.
[in] | name | - the name of the group of interest. |
If | the name of a nonexistent group is specified. |
References _groups, getFamiliesIds(), and getGroupsNames().
void MEDFileMesh::setFamiliesOnGroup | ( | const std::string & | name, |
const std::vector< std::string > & | fams | ||
) |
Sets names of families constituting a group. If data on families of this group is already present, it is overwritten. Every family in fams is checked, and if a family is not yet in this mesh, the default group id 0
is assigned to it.
[in] | name | - the name of the group of interest. |
[in] | fams | - a sequence of names of families constituting the group. |
void MEDFileMesh::setFamiliesIdsOnGroup | ( | const std::string & | name, |
const std::vector< int > & | famIds | ||
) |
Sets families constituting a group. The families are specified by their ids. If a family name is not found by its id, an exception is thrown. If several families have same id, the first one in lexical order is taken.
[in] | name | - the name of the group of interest. |
[in] | famIds | - a sequence of ids of families constituting the group. |
If | a family name is not found by its id. |
References _groups, and getFamilyNameGivenId().
std::vector< std::string > MEDFileMesh::getGroupsOnFamily | ( | const std::string & | name | ) | const |
Returns names of groups including a given family.
[in] | name | - the name of the family of interest. |
References _groups.
Referenced by assignFamilyNameWithGroupName(), ensureDifferentFamIdsPerLevel(), getFamilyRepr(), and removeOrphanFamilies().
void MEDFileMesh::setGroupsOnFamily | ( | const std::string & | famName, |
const std::vector< std::string > & | grps | ||
) |
Adds an existing family to groups.
[in] | famName | - a name of family to add to grps. |
[in] | grps | - a sequence of group names to add the family in. |
If | a family named famName not yet exists. |
References _families, _groups, and getFamiliesNames().
std::vector< std::string > MEDFileMesh::getGroupsNames | ( | ) | const |
Returns names of all groups of this mesh.
References _groups.
Referenced by addGroupUnderground(), MEDCoupling::MEDFileUMesh::buildExtrudedMesh(), changeGroupName(), getFamiliesIdsOnGroup(), getFamiliesOnGroup(), getFamiliesOnGroups(), getGroupsOnSpecifiedLev(), and removeGroup().
std::vector< std::string > MEDFileMesh::getFamiliesNames | ( | ) | const |
Returns names of all families of this mesh.
References _families.
Referenced by addFamilyOnGrp(), changeFamilyName(), getFamiliesIds(), getFamiliesNamesWithFilePointOfView(), getFamilyId(), keepFamIdsOnlyOnLevs(), normalizeFamIdsMEDFile(), normalizeFamIdsTrio(), removeFamily(), removeOrphanFamilies(), and setGroupsOnFamily().
std::vector< std::string > MEDFileMesh::getGroupsOnSpecifiedLev | ( | int | meshDimRelToMaxExt | ) | const |
Returns names of groups that partly or fully appear on the level meshDimRelToMaxExt.
[in] | meshDimRelToMaxExt | - a relative dimension of interest. |
References getGroupsNames(), and getGrpNonEmptyLevelsExt().
std::vector< int > MEDFileMesh::getGrpNonEmptyLevelsExt | ( | const std::string & | grp | ) | const |
Returns all relative mesh levels (including nodes) where a given group is defined.
[in] | grp | - the name of the group of interest. |
References getFamiliesOnGroup(), and getFamsNonEmptyLevelsExt().
Referenced by getGroupsOnSpecifiedLev().
std::vector< int > MEDFileMesh::getGrpNonEmptyLevels | ( | const std::string & | grp | ) | const |
Returns all relative mesh levels (excluding nodes) where a given group is defined. To include nodes, call getGrpNonEmptyLevelsExt() method.
[in] | grp | - the name of the group of interest. |
References getFamiliesOnGroup(), and getFamsNonEmptyLevels().
std::vector< int > MEDFileMesh::getGrpsNonEmptyLevels | ( | const std::vector< std::string > & | grps | ) | const |
Returns all relative mesh levels (excluding nodes) where given groups are defined. To include nodes, call getGrpsNonEmptyLevelsExt() method.
[in] | grps | - a sequence of names of the groups of interest. |
References getFamiliesOnGroups(), and getFamsNonEmptyLevels().
std::vector< int > MEDFileMesh::getGrpsNonEmptyLevelsExt | ( | const std::vector< std::string > & | grps | ) | const |
Returns all relative mesh levels (including nodes) where given groups are defined.
[in] | grps | - a sequence of names of the groups of interest. |
References getFamiliesOnGroups(), and getFamsNonEmptyLevelsExt().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by getFamNonEmptyLevels(), getGrpNonEmptyLevels(), and getGrpsNonEmptyLevels().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by getFamNonEmptyLevelsExt(), getGrpNonEmptyLevelsExt(), and getGrpsNonEmptyLevelsExt().
std::vector< int > MEDFileMesh::getFamNonEmptyLevels | ( | const std::string & | fam | ) | const |
Returns all relative mesh levels (excluding nodes) where a given family is defined. To include nodes, call getFamNonEmptyLevelsExt() method.
[in] | fam | - the name of the family of interest. |
References getFamsNonEmptyLevels().
std::vector< int > MEDFileMesh::getFamNonEmptyLevelsExt | ( | const std::string & | fam | ) | const |
Returns all relative mesh levels (including nodes) where a given family is defined.
[in] | fam | - the name of the family of interest. |
References getFamsNonEmptyLevelsExt().
std::vector< std::string > MEDFileMesh::getFamiliesNamesWithFilePointOfView | ( | ) | const |
Returns names of all families of this mesh but like they would be in file. This method is here only for MED file families gurus. If you are a kind user forget this method :-) This method is only useful for aggressive users that want to have in their file a same family lying both on cells and on nodes. This is not a good idea for lisibility ! For your information internaly in memory such families are renamed to have a nicer API.
References getFamiliesNames().
|
static |
void MEDFileMesh::assignFamilyNameWithGroupName | ( | ) |
Changes a name of every family, included in one group only, to be same as the group name.
If | there are families with equal names in this mesh. |
References _families, _groups, and getGroupsOnFamily().
std::vector< std::string > MEDFileMesh::removeEmptyGroups | ( | ) |
Removes all groups lying on no family. If there is no empty groups, this is let untouched.
References _groups.
Referenced by removeOrphanGroups().
void MEDFileMesh::removeGroup | ( | const std::string & | name | ) |
Removes a group from this mesh.
[in] | name | - the name of the group to remove. |
If | no group with such a name exists. |
References _groups, and getGroupsNames().
void MEDFileMesh::removeFamily | ( | const std::string & | name | ) |
Removes a family from this mesh.
[in] | name | - the name of the family to remove. |
If | no family with such a name exists. |
References _families, _groups, and getFamiliesNames().
std::vector< std::string > MEDFileMesh::removeOrphanGroups | ( | ) |
Removes all groups in this that are orphan. A group is orphan if this group lies on a set of families, themselves orphan. A family is said orphan if its id appears nowhere in family field whatever its level. This method also suppresses the orphan families.
References removeEmptyGroups(), and removeOrphanFamilies().
std::vector< std::string > MEDFileMesh::removeOrphanFamilies | ( | ) |
Removes all families in this that are orphan. A family is said orphan if its id appears nowhere in family field whatever its level. Groups are updated in consequence, that is to say all groups lying on orphan family, will see their families list modified.
References _families, _groups, computeAllFamilyIdsInUse(), getFamiliesNames(), getGroupsOnFamily(), and MEDCoupling::DataArrayInt::presenceOfValue().
Referenced by rearrangeFamilies(), and removeOrphanGroups().
void MEDFileMesh::removeFamiliesReferedByNoGroups | ( | ) |
This method operates only on maps in this. The arrays are not considered here. So this method will remove a family (except "FAMILLE_ZERO" family) if no group lies on it whatever this family is orphan or not.
References _families, _groups, and DFT_FAM_NAME.
Referenced by rearrangeFamilies().
void MEDFileMesh::rearrangeFamilies | ( | ) |
This method has no impact on groups. This method only works on families. This method firstly removes families not refered by any groups in this, then all unused entities are put as belonging to family 0 ("FAMILLE_ZERO"). Finally, all orphanFamilies are killed. This method raises an exception if "FAMILLE_ZERO" is already belonging to a group.
References _families, MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayInt::BuildListOfSwitchedOff(), checkOrphanFamilyZero(), MEDCoupling::DataArrayInt::deepCopy(), MEDCoupling::DataArrayTemplate< T >::empty(), MEDCoupling::DataArrayTemplate< T >::end(), getFamilyFieldAtLevel(), getNonEmptyLevelsExt(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), removeFamiliesReferedByNoGroups(), removeOrphanFamilies(), setFamilyFieldArr(), and MEDCoupling::DataArrayInt::switchOnTupleEqualTo().
void MEDFileMesh::checkOrphanFamilyZero | ( | ) | const |
This method only checks that "FAMILLE_ZERO" is orphan (not belonging to a group).
References _groups, and DFT_FAM_NAME.
Referenced by rearrangeFamilies().
void MEDFileMesh::changeGroupName | ( | const std::string & | oldName, |
const std::string & | newName | ||
) |
Renames a group in this mesh.
[in] | oldName | - a current name of the group to rename. |
[in] | newName | - a new group name. |
If | no group named oldName exists in this mesh. |
If | a group named newName already exists. |
References _groups, and getGroupsNames().
void MEDFileMesh::changeFamilyName | ( | const std::string & | oldName, |
const std::string & | newName | ||
) |
Renames a family in this mesh.
[in] | oldName | - a current name of the family to rename. |
[in] | newName | - a new family name. |
If | no family named oldName exists in this mesh. |
If | a family named newName already exists. |
References _families, _groups, and getFamiliesNames().
void MEDFileMesh::changeFamilyId | ( | int | oldId, |
int | newId | ||
) |
Changes an id of a family in this mesh. This method calls changeFamilyIdArr().
[in] | oldId | - a current id of the family. |
[in] | newId | - a new family id. |
References _families, and changeFamilyIdArr().
void MEDFileMesh::changeAllGroupsContainingFamily | ( | const std::string & | familyNameToChange, |
const std::vector< std::string > & | newFamiliesNames | ||
) |
References _groups, and ChangeAllGroupsContainingFamily().
int MEDFileMesh::getFamilyId | ( | const std::string & | name | ) | const |
Returns an id of the family having a given name.
[in] | name | - the name of the family of interest. |
If | no family with such a name exists. |
References _families, and getFamiliesNames().
Referenced by MEDCoupling::MEDFileUMesh::convertToExtrudedMesh().
int MEDFileMesh::getMaxAbsFamilyId | ( | ) | const |
Returns a maximal abs(id) of families in this mesh.
If | there are no families in this mesh. |
References _families.
Referenced by setGroupsAtLevel().
int MEDFileMesh::getMaxFamilyId | ( | ) | const |
Returns a maximal id of families in this mesh.
If | there are no families in this mesh. |
References _families.
Referenced by MEDCoupling::MEDFileUMesh::buildInnerBoundaryAlongM1Group(), ensureDifferentFamIdsPerLevel(), and keepFamIdsOnlyOnLevs().
int MEDFileMesh::getMinFamilyId | ( | ) | const |
Returns a minimal id of families in this mesh.
If | there are no families in this mesh. |
References _families.
Referenced by MEDCoupling::MEDFileUMesh::buildInnerBoundaryAlongM1Group().
int MEDFileMesh::getTheMaxAbsFamilyId | ( | ) | const |
Returns a maximal id of families in this mesh. Not only named families are considered but all family fields as well.
References _families, and getMaxAbsFamilyIdInArrays().
Referenced by addGroupUnderground().
int MEDFileMesh::getTheMaxFamilyId | ( | ) | const |
Returns a maximal id of families in this mesh. Not only named families are considered but all family fields as well.
References _families, and getMaxFamilyIdInArrays().
int MEDFileMesh::getTheMinFamilyId | ( | ) | const |
Returns a minimal id of families in this mesh. Not only named families are considered but all family fields as well.
References _families, and getMinFamilyIdInArrays().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by getTheMaxAbsFamilyId().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by getTheMaxFamilyId().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by getTheMinFamilyId().
DataArrayInt * MEDFileMesh::getAllFamiliesIdsReferenced | ( | ) | const |
This method only considers the maps. The contain of family array is ignored here.
References _families, MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::getPointer(), MEDCoupling::DataArrayInt::New(), and MEDCoupling::MCAuto< T >::retn().
Referenced by ensureDifferentFamIdsPerLevel(), normalizeFamIdsMEDFile(), and normalizeFamIdsTrio().
DataArrayInt * MEDFileMesh::computeAllFamilyIdsInUse | ( | ) | const |
This method does not consider map of family name, family id. Only family field array on different levels is considered.
References MEDCoupling::DataArrayInt::buildUnion(), MEDCoupling::DataArrayInt::getDifferentValues(), getFamArrNonEmptyLevelsExt(), getFamilyFieldAtLevel(), and MEDCoupling::MCAuto< T >::retn().
Referenced by removeOrphanFamilies().
std::vector< int > MEDFileMesh::getFamiliesIds | ( | const std::vector< std::string > & | fams | ) | const |
Returns ids of the families having given names.
[in] | fams | - a sequence of the names of families of interest. |
If | fams contains a name of an inexistent family. |
References _families, and getFamiliesNames().
Referenced by MEDCoupling::MEDFileUMesh::getFamilies(), MEDCoupling::MEDFileUMesh::getFamiliesArr(), MEDCoupling::MEDFileStructuredMesh::getFamiliesArr(), getFamiliesIdsOnGroup(), MEDCoupling::MEDFileUMesh::getFamsNonEmptyLevels(), and MEDCoupling::MEDFileUMesh::getFamsNonEmptyLevelsExt().
std::string MEDFileMesh::getFamilyNameGivenId | ( | int | id | ) | const |
Returns a name of the family by its id. If there are several families having the given id, the name first in lexical order is returned.
[in] | id | - the id of the family whose name is required. |
If | no family with the given id exists. |
References _families.
Referenced by addGroupUnderground(), ensureDifferentFamIdsPerLevel(), keepFamIdsOnlyOnLevs(), normalizeFamIdsMEDFile(), normalizeFamIdsTrio(), setFamiliesIdsOnGroup(), and MEDCoupling::MEDFileUMesh::setFamilyNameAttachedOnId().
bool MEDFileMesh::ensureDifferentFamIdsPerLevel | ( | ) |
true is returned if no modification has been needed. false if family renumbering has been needed.
References addFamilyOnGrp(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::end(), MEDCoupling::DataArrayInt::findIdsEqualList(), findOrCreateAndGiveFamilyWithId(), getAllFamiliesIdsReferenced(), MEDCoupling::DataArrayInt::getDifferentValues(), getFamilyFieldAtLevel(), getFamilyNameGivenId(), getGroupsOnFamily(), getMaxFamilyId(), getNonEmptyLevelsExt(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and MEDCoupling::DataArrayInt::presenceOfValue().
Referenced by normalizeFamIdsMEDFile(), and normalizeFamIdsTrio().
void MEDFileMesh::normalizeFamIdsTrio | ( | ) |
This method normalizes fam id with the policy explained underneath. This policy is close to those implemented in SMESH. Level #0 famids > 0, Level #-1 famids < 0, Level #-2 famids=0, Level #1 famids=0 This policy is those used by SMESH and Trio and that is the opposite of those in MED file. This method will throw an exception if a same family id is detected in different level.
References _families, MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::end(), ensureDifferentFamIdsPerLevel(), MEDCoupling::DataArrayInt::fillWithZero(), getAllFamiliesIdsReferenced(), MEDCoupling::DataArrayInt::getDifferentValues(), getFamiliesNames(), getFamilyFieldAtLevel(), getFamilyNameGivenId(), getNonEmptyLevelsExt(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::DataArrayInt::presenceOfValue().
void MEDFileMesh::normalizeFamIdsMEDFile | ( | ) |
This method normalizes fam id with the following policy. Level #0 famids < 0, Level #-1 famids < 0 and for Level #1 famids >= 0 This policy is those defined in the MED file format but is the opposite of those implemented in SMESH and Trio. This method will throw an exception if a same family id is detected in different level.
References _families, MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::end(), ensureDifferentFamIdsPerLevel(), getAllFamiliesIdsReferenced(), MEDCoupling::DataArrayInt::getDifferentValues(), getFamiliesNames(), getFamilyFieldAtLevel(), getFamilyNameGivenId(), getNonEmptyLevelsExt(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::DataArrayInt::presenceOfValue().
|
pure virtual |
Implemented in MEDCoupling::MEDFileCurveLinearMesh, MEDCoupling::MEDFileCMesh, and MEDCoupling::MEDFileUMesh.
Referenced by MEDCoupling::MEDFileStructuredMesh::buildImplicitPartIfAny(), MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::fieldOnMesh(), MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::getFieldAtTopLevel(), MEDCoupling::MEDFileStructuredMesh::getNumberOfCellsWithType(), MEDCoupling::MEDFileStructuredMesh::loadStrMeshFromFile(), MEDCoupling::MEDFileStructuredMesh::whichAreNodesFetched(), MEDCoupling::WriteField(), and MEDCoupling::MEDFileStructuredMesh::writeStructuredLL().
|
virtual |
Returns a string describing this mesh. This description includes the mesh name and the mesh description string.
Reimplemented in MEDCoupling::MEDFileCurveLinearMesh, MEDCoupling::MEDFileCMesh, and MEDCoupling::MEDFileUMesh.
References getDescription(), and getName().
Referenced by MEDCoupling::MEDFileUMesh::simpleRepr(), MEDCoupling::MEDFileCMesh::simpleRepr(), and MEDCoupling::MEDFileCurveLinearMesh::simpleRepr().
|
pure virtual |
Implemented in MEDCoupling::MEDFileCurveLinearMesh, MEDCoupling::MEDFileCMesh, and MEDCoupling::MEDFileUMesh.
|
virtual |
Adds groups of given dimension and creates corresponding families and family fields given ids of mesh entities of each group.
[in] | meshDimRelToMaxExt | - the relative mesh dimension of given mesh entities. |
[in] | grps | - a sequence of arrays of ids each describing a group. |
[in] | renum | - true means that grps contains not ids but optional numbers of mesh entities. |
If | names of some groups in grps are equal. |
If | grps includes a group with an empty name. |
If | grps includes invalid ids (or numbers if renum == true ). |
If | there are no mesh entities of meshDimRelToMaxExt dimension in this mesh. |
References _families, appendFamilyEntries(), MEDCoupling::DataArrayInt::getDifferentValues(), getMaxAbsFamilyId(), getName(), getRevNumberFieldAtLevel(), getSizeAtLevel(), MEDCoupling::DataArrayInt::MakePartition(), setFamilyFieldArr(), and TranslateFamilyIds().
Referenced by MEDCoupling::MEDFileUMesh::buildExtrudedMesh(), MEDCoupling::MEDFileUMesh::setGroupsFromScratch(), and MEDCoupling::MEDFileUMesh::setGroupsOnSetMesh().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by getOrCreateAndGetFamilyFieldAtLevel(), rearrangeFamilies(), and setGroupsAtLevel().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by computeAllFamilyIdsInUse(), createGroupOnAll(), ensureDifferentFamIdsPerLevel(), getOrCreateAndGetFamilyFieldAtLevel(), keepFamIdsOnlyOnLevs(), normalizeFamIdsMEDFile(), normalizeFamIdsTrio(), and rearrangeFamilies().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
DataArrayInt * MEDFileMesh::getOrCreateAndGetFamilyFieldAtLevel | ( | int | meshDimRelToMaxExt | ) |
This method is nearly like getFamilyFieldAtLevel method. Except that if the array does not exist at the specified level meshDimRelToMaxExt an empty one is created.
References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayInt::fillWithZero(), getFamilyFieldAtLevel(), getSizeAtLevel(), MEDCoupling::DataArrayInt::New(), and setFamilyFieldArr().
Referenced by MEDCoupling::MEDFileStructuredMesh::addGroup().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by setGroupsAtLevel().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by getFamilyArr(), getGroupsArr(), and getNodeFamiliesArr().
|
virtual |
Returns ids of mesh entities contained in given groups of a given dimension.
[in] | meshDimRelToMaxExt | - a relative dimension of the mesh entities whose ids are required. |
[in] | grps | - the names of the groups of interest. |
[in] | renum | - if true , the optional numbers of entities, if available, are returned instead of ids. |
If | the name of a nonexistent group is present in grps. |
If | the family field is missing for meshDimRelToMaxExt. |
References getFamiliesArr(), and getFamiliesOnGroups().
Referenced by getGroupArr(), and getNodeGroupsArr().
|
virtual |
Returns ids of mesh entities contained in a given group of a given dimension.
[in] | meshDimRelToMaxExt | - a relative dimension of the mesh entities whose ids are required. |
[in] | grp | - the name of the group of interest. |
[in] | renum | - if true , the optional numbers of entities, if available, are returned instead of ids. |
If | the name of a nonexistent group is specified. |
If | the family field is missing for meshDimRelToMaxExt. |
References getGroupsArr(), and MEDCoupling::DataArray::setName().
Referenced by MEDCoupling::MEDFileUMesh::buildExtrudedMesh(), and MEDCoupling::MEDFileUMesh::buildInnerBoundaryAlongM1Group().
|
virtual |
Returns ids of mesh entities contained in a given family of a given dimension.
[in] | meshDimRelToMaxExt | - a relative dimension of the mesh entities whose ids are required. |
[in] | fam | - the name of the family of interest. |
[in] | renum | - if true , the optional numbers of entities, if available, are returned instead of ids. |
If | the family field is missing for meshDimRelToMaxExt. |
References getFamiliesArr(), and MEDCoupling::DataArray::setName().
|
virtual |
Returns ids of nodes contained in a given group.
[in] | grp | - the name of the group of interest. |
[in] | renum | - if true , the optional numbers of nodes, if available, are returned instead of ids. |
If | the name of a nonexistent group is specified. |
If | the family field is missing for nodes. |
References getNodeGroupsArr(), and MEDCoupling::DataArray::setName().
|
virtual |
Returns ids of nodes contained in given groups.
[in] | grps | - the names of the groups of interest. |
[in] | renum | - if true , the optional numbers of nodes, if available, are returned instead of ids. |
If | the name of a nonexistent group is present in grps. |
If | the family field is missing for nodes. |
References getGroupsArr().
Referenced by getNodeGroupArr().
|
virtual |
Returns ids of nodes contained in a given group.
[in] | grp | - the name of the group of interest. |
[in] | renum | - if true , the optional numbers of nodes, if available, are returned instead of ids. |
If | the name of a nonexistent group is specified. |
If | the family field is missing for nodes. |
References getNodeFamiliesArr(), and MEDCoupling::DataArray::setName().
|
virtual |
Returns ids of nodes contained in given families.
[in] | fams | - the names of the families of interest. |
[in] | renum | - if true , the optional numbers of nodes, if available, are returned instead of ids. |
If | the family field is missing for nodes. |
References getFamiliesArr().
Referenced by getNodeFamilyArr().
|
pure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh, and MEDCoupling::MEDFileUMesh.
Referenced by MEDCoupling::MEDFileData::unPolyzeMeshes().
int MEDFileMesh::getNumberOfJoints | ( | ) | const |
Return number of joints, which is equal to number of adjacent mesh domains.
References _joints.
MEDFileJoints * MEDFileMesh::getJoints | ( | ) | const |
Return joints with all adjacent mesh domains.
void MEDFileMesh::setJoints | ( | MEDFileJoints * | joints | ) |
References _joints.
Referenced by loadJointsFromFile(), and MEDCoupling::MEDFileMeshMultiTS::writeLL().
MEDFileEquivalences* MEDCoupling::MEDFileMesh::getEquivalences | ( | ) |
References _equiv.
const MEDFileEquivalences* MEDCoupling::MEDFileMesh::getEquivalences | ( | ) | const |
References _equiv.
void MEDCoupling::MEDFileMesh::killEquivalences | ( | ) |
References _equiv.
void MEDCoupling::MEDFileMesh::initializeEquivalences | ( | ) |
References _equiv.
|
static |
References INTERP_KERNEL::NORM_ERROR, typmai, and typmai2.
|
static |
References MEDCoupling::ON_CELLS, and MEDCoupling::ON_NODES.
|
protected |
protected because no way in MED file API to specify this name
References _univ_name.
Referenced by MEDCoupling::MEDFileStructuredMesh::loadStrMeshFromFile().
|
protected |
This method adds to all groups lying on family with name 'famName' the other family name 'otherFamName'. This method is quite underground because it can lead to unconsistency because family 'otherFamName' is not added into _families. This method is used by MEDFileMesh::keepFamIdsOnlyOnLevs method.
References _groups.
Referenced by keepFamIdsOnlyOnLevs().
|
protected |
This method should be called by any set* method of subclasses to deal automatically with _name attribute. If _name attribute is empty the name of 'm' if taken as _name attribute. If _name is not empty and that 'm' has the same name nothing is done. If _name is not emplt and that 'm' has NOT the same name an exception is thrown.
References _desc_name, _name, MEDCoupling::MEDCouplingMesh::getDescription(), and MEDCoupling::MEDCouplingMesh::getName().
Referenced by MEDCoupling::MEDFileCMesh::setMesh(), and MEDCoupling::MEDFileCurveLinearMesh::setMesh().
|
protectedpure virtual |
|
protected |
References _families, and getGroupsOnFamily().
Referenced by MEDCoupling::MEDFileUMesh::simpleRepr().
|
protectedvirtual |
This method append into '_families' attribute the families whose ids are in 'famIds'. Warning 'famIds' are expected to be ids not in '_families'. Groups information are given in parameters in order to give to families representative names. For the moment, the two last input parameters are not taken into account.
References _families, _groups, MEDCoupling::DataArrayTemplate< T >::begin(), and MEDCoupling::DataArrayTemplate< T >::end().
Referenced by setGroupsAtLevel().
|
protectedpure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh.
Referenced by changeFamilyId().
|
protectedpure virtual |
Implemented in MEDCoupling::MEDFileStructuredMesh.
Referenced by addGroupUnderground().
|
protectedpure virtual |
Referenced by loadLLWithAdditionalItems().
|
protected |
References loadEquivalences(), loadJointsFromFile(), and loadLL().
Referenced by New().
|
protected |
[in] | ids | ids and group name of the new group to add. The ids should be sorted and different each other (MED file norm). [in,out] famArr family array on level of interest to be renumbered. The input pointer should be not NULL (no check of that will be performed) |
References _families, _groups, MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayInt::buildSubstractionOptimized(), ChangeAllGroupsContainingFamily(), MEDCoupling::DataArrayInt::checkStrictlyMonotonic(), MEDCoupling::DataArrayTemplate< T >::end(), existsFamily(), MEDCoupling::DataArrayInt::findIdsEqual(), FindOrCreateAndGiveFamilyWithId(), getAllNonNullFamilyIds(), MEDCoupling::DataArrayInt::getDifferentValues(), getFamilyNameGivenId(), getGroupsNames(), MEDCoupling::DataArray::getName(), getTheMaxAbsFamilyId(), MEDCoupling::RefCountObjectOnly::incrRef(), MEDCoupling::DataArrayInt::selectByTupleId(), MEDCoupling::DataArrayInt::selectByTupleIdSafe(), and MEDCoupling::DataArrayTemplate< T >::setPartOfValuesSimple3().
Referenced by MEDCoupling::MEDFileUMesh::addGroup(), MEDCoupling::MEDFileStructuredMesh::addGroup(), and MEDCoupling::MEDFileUMesh::addNodeGroup().
|
staticprotected |
References MEDCoupling::DataArrayInt::applyLin().
Referenced by setGroupsAtLevel().
|
staticprotected |
Referenced by addGroupUnderground(), and changeAllGroupsContainingFamily().
|
staticprotected |
If it exists a family whose family id is equal to 'id' this method behaves as MEDFileMesh::getFamilyNameGivenId. In this case, 'this' internal states remains unchanged and 'created' out parameter will be set to false. If there is no family whose family id is equal to 'id' a family is created with a name different from those already existing. In this case 'created' will be returned with a value set to true, and internal state will be modified. This method will throws an exception if it is not possible to create a unique family name.
References CreateNameNotIn().
Referenced by addGroupUnderground(), and findOrCreateAndGiveFamilyWithId().
|
staticprotected |
Warning no check is done on 'nameTry' in parameter. It should be non empty. This method returns a name close to 'nameTry' so that it is not already into 'namesToAvoid'. If this method fails to find such a name it will throw an exception.
Referenced by FindOrCreateAndGiveFamilyWithId(), and keepFamIdsOnlyOnLevs().
|
staticprotected |
Referenced by MEDCoupling::MEDFileUMesh::unPolyze().
|
protected |
Write joints in a file.
References _joints, and MEDCoupling::MCAuto< T >::isNotNull().
Referenced by writeLL().
|
protected |
Load joints in a file or use provided ones.
Load joints in a file or use provided ones
[in] | fid | - MED file descriptor |
[in] | toUseInstedOfReading | - optional joints to use instead of reading, Usually this joints are those just read by another iteration of namesake mesh, when this method is called by MEDFileMeshMultiTS::New() |
References _joints, _name, and setJoints().
Referenced by loadLLWithAdditionalItems().
|
protected |
Referenced by loadLLWithAdditionalItems().
|
protected |
References _equiv.
Referenced by MEDCoupling::MEDFileUMesh::deepCopy(), MEDCoupling::MEDFileCMesh::deepCopy(), and MEDCoupling::MEDFileCurveLinearMesh::deepCopy().
|
protected |
|
protected |
References _equiv.
Referenced by MEDCoupling::MEDFileUMesh::simpleRepr().
|
protected |
References MEDCoupling::AX_CART, getAxisType(), and MEDCoupling::DataArray::GetAxisTypeRepr().
Referenced by MEDCoupling::MEDFileUMesh::buildExtrudedMesh(), MEDCoupling::MEDFileUMesh::getCoords(), MEDCoupling::MEDFileUMesh::getDirectUndergroundSingleGeoTypeMesh(), MEDCoupling::MEDFileUMesh::getDirectUndergroundSingleGeoTypeMeshes(), MEDCoupling::MEDFileUMesh::getFamilies(), MEDCoupling::MEDFileUMesh::getFamily(), MEDCoupling::MEDFileUMesh::getGroup(), MEDCoupling::MEDFileUMesh::getGroups(), MEDCoupling::MEDFileStructuredMesh::getImplicitFaceMesh(), MEDCoupling::MEDFileUMesh::getMeshAtLevel(), MEDCoupling::MEDFileStructuredMesh::getMeshAtLevel(), MEDCoupling::MEDFileUMesh::linearToQuadratic(), and MEDCoupling::MEDFileUMesh::quadraticToLinear().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by getHeapMemorySizeWithoutChildren(), getTimeUnit(), isEqual(), and setTimeUnit().
|
protected |
|
mutableprotected |
this attribute do not impact the state of instance -> mutable
Referenced by getHeapMemorySizeWithoutChildren(), getUnivName(), and setUnivName().
|
protected |
Referenced by getUnivNameWrStatus(), and setUnivNameWrStatus().
|
protected |
|
protected |
Referenced by getAxisType(), and setAxisType().
|
protected |
Referenced by getNumberOfJoints(), loadJointsFromFile(), setJoints(), and writeJoints().
|
protected |
|
protected |
Referenced by addFamilyOnAllGroupsHaving(), addFamilyOnGrp(), addGroupUnderground(), appendFamilyEntries(), areGrpsEqual(), assignFamilyNameWithGroupName(), changeAllGroupsContainingFamily(), changeFamilyName(), changeGroupName(), checkOrphanFamilyZero(), clearGrpMap(), copyFamGrpMapsFrom(), createGroupOnAll(), existsGroup(), getFamiliesIdsOnGroup(), getFamiliesOnGroup(), getFamiliesOnGroups(), getGroupInfo(), getGroupsNames(), getGroupsOnFamily(), getHeapMemorySizeWithoutChildren(), MEDCoupling::MEDFileStructuredMesh::loadStrMeshFromFile(), MEDCoupling::MEDFileUMesh::optimizeFamilies(), removeEmptyGroups(), removeFamiliesReferedByNoGroups(), removeFamily(), removeGroup(), removeOrphanFamilies(), MEDCoupling::MEDFileUMesh::serialize(), setFamiliesIdsOnGroup(), setFamiliesOnGroup(), setGroupInfo(), setGroupsOnFamily(), MEDCoupling::MEDFileUMesh::unserialize(), and MEDCoupling::MEDFileStructuredMesh::writeStructuredLL().
|
protected |
Referenced by addFamily(), addGroupUnderground(), appendFamilyEntries(), areFamsEqual(), assignFamilyNameWithGroupName(), changeFamilyId(), changeFamilyName(), clearFamMap(), copyFamGrpMapsFrom(), existsFamily(), findOrCreateAndGiveFamilyWithId(), getAllFamiliesIdsReferenced(), getFamiliesIds(), getFamiliesNames(), getFamilyId(), getFamilyInfo(), getFamilyNameGivenId(), getFamilyRepr(), getHeapMemorySizeWithoutChildren(), getMaxAbsFamilyId(), getMaxFamilyId(), getMinFamilyId(), getTheMaxAbsFamilyId(), getTheMaxFamilyId(), getTheMinFamilyId(), keepFamIdsOnlyOnLevs(), MEDCoupling::MEDFileStructuredMesh::loadStrMeshFromFile(), normalizeFamIdsMEDFile(), normalizeFamIdsTrio(), MEDCoupling::MEDFileUMesh::optimizeFamilies(), rearrangeFamilies(), removeFamiliesReferedByNoGroups(), removeFamily(), removeOrphanFamilies(), MEDCoupling::MEDFileUMesh::serialize(), setFamiliesOnGroup(), setFamilyId(), setFamilyIdUnique(), setFamilyInfo(), MEDCoupling::MEDFileUMesh::setFamilyNameAttachedOnId(), setGroupsAtLevel(), setGroupsOnFamily(), MEDCoupling::MEDFileUMesh::simpleRepr(), MEDCoupling::MEDFileUMesh::unserialize(), and MEDCoupling::MEDFileStructuredMesh::writeStructuredLL().
|
static |
Referenced by checkOrphanFamilyZero(), removeFamiliesReferedByNoGroups(), and writeLL().