Public Member Functions | |
virtual bool | isEqual (const MEDFileMesh *other, double eps, std::string &what) const |
virtual void | clearNonDiscrAttributes () const |
void | setName (const char *name) |
const char * | getName () const |
void | setUnivName (const char *name) |
const char * | getUnivName () const |
void | setDescription (const char *name) |
const char * | getDescription () const |
void | setOrder (int order) |
int | getOrder () const |
void | setIteration (int it) |
int | getIteration () const |
void | setTimeValue (double time) |
void | setTime (double time, int dt, int it) |
double | getTime (int &dt, int &it) |
double | getTimeValue () const |
void | setTimeUnit (const char *unit) |
const char * | getTimeUnit () const |
virtual std::vector< int > | getNonEmptyLevels () const =0 |
virtual std::vector< int > | getNonEmptyLevelsExt () const =0 |
virtual void | write (const char *fileName, int mode) const throw (INTERP_KERNEL::Exception) |
virtual void | write (med_idt fid) const throw (INTERP_KERNEL::Exception) |
virtual int | getSizeAtLevel (int meshDimRelToMaxExt) const =0 throw (INTERP_KERNEL::Exception) |
virtual MEDCouplingMesh * | getGenMeshAtLevel (int meshDimRelToMax, bool renum=false) const =0 throw (INTERP_KERNEL::Exception) |
bool | areFamsEqual (const MEDFileMesh *other, std::string &what) const |
bool | areGrpsEqual (const MEDFileMesh *other, std::string &what) const |
bool | existsGroup (const char *groupName) const |
bool | existsFamily (int famId) const |
bool | existsFamily (const char *familyName) const |
void | setFamilyId (const char *familyName, int id) |
virtual void | addFamily (const char *familyName, int id) throw (INTERP_KERNEL::Exception) |
virtual void | createGroupOnAll (int meshDimRelToMaxExt, const char *groupName) throw (INTERP_KERNEL::Exception) |
virtual bool | keepFamIdsOnlyOnLevs (const std::vector< int > &famIds, const std::vector< int > &levs) throw (INTERP_KERNEL::Exception) |
void | addFamilyOnGrp (const char *grpName, const char *famName) throw (INTERP_KERNEL::Exception) |
std::string | findOrCreateAndGiveFamilyWithId (int id, bool &created) throw (INTERP_KERNEL::Exception) |
void | setFamilyInfo (const std::map< std::string, int > &info) |
void | setGroupInfo (const std::map< std::string, std::vector< std::string > > &info) |
void | copyFamGrpMapsFrom (const MEDFileMesh &other) |
const std::map< std::string, int > & | getFamilyInfo () const |
const std::map< std::string, std::vector< std::string > > & | getGroupInfo () const |
std::vector< std::string > | getFamiliesOnGroup (const char *name) const throw (INTERP_KERNEL::Exception) |
std::vector< std::string > | getFamiliesOnGroups (const std::vector< std::string > &grps) const throw (INTERP_KERNEL::Exception) |
std::vector< int > | getFamiliesIdsOnGroup (const char *name) const throw (INTERP_KERNEL::Exception) |
void | setFamiliesOnGroup (const char *name, const std::vector< std::string > &fams) throw (INTERP_KERNEL::Exception) |
void | setFamiliesIdsOnGroup (const char *name, const std::vector< int > &famIds) throw (INTERP_KERNEL::Exception) |
std::vector< std::string > | getGroupsOnFamily (const char *name) const throw (INTERP_KERNEL::Exception) |
void | setGroupsOnFamily (const char *famName, const std::vector< std::string > &grps) throw (INTERP_KERNEL::Exception) |
std::vector< std::string > | getGroupsNames () const |
std::vector< std::string > | getFamiliesNames () const |
void | assignFamilyNameWithGroupName () throw (INTERP_KERNEL::Exception) |
void | removeGroup (const char *name) throw (INTERP_KERNEL::Exception) |
void | removeFamily (const char *name) throw (INTERP_KERNEL::Exception) |
void | changeGroupName (const char *oldName, const char *newName) throw (INTERP_KERNEL::Exception) |
void | changeFamilyName (const char *oldName, const char *newName) throw (INTERP_KERNEL::Exception) |
void | changeFamilyId (int oldId, int newId) throw (INTERP_KERNEL::Exception) |
int | getFamilyId (const char *name) const throw (INTERP_KERNEL::Exception) |
int | getMaxFamilyId () const throw (INTERP_KERNEL::Exception) |
std::vector< int > | getFamiliesIds (const std::vector< std::string > &famNames) const throw (INTERP_KERNEL::Exception) |
std::string | getFamilyNameGivenId (int id) const throw (INTERP_KERNEL::Exception) |
virtual int | getMeshDimension () const =0 throw (INTERP_KERNEL::Exception) |
virtual std::string | simpleRepr () const |
virtual std::string | advancedRepr () const =0 |
virtual void | setGroupsAtLevel (int meshDimRelToMaxExt, const std::vector< const DataArrayInt * > &grps, bool renum=false) throw (INTERP_KERNEL::Exception) |
virtual void | setFamilyFieldArr (int meshDimRelToMaxExt, DataArrayInt *famArr)=0 throw (INTERP_KERNEL::Exception) |
virtual void | setRenumFieldArr (int meshDimRelToMaxExt, DataArrayInt *renumArr)=0 throw (INTERP_KERNEL::Exception) |
virtual const DataArrayInt * | getFamilyFieldAtLevel (int meshDimRelToMaxExt) const =0 throw (INTERP_KERNEL::Exception) |
virtual const DataArrayInt * | getNumberFieldAtLevel (int meshDimRelToMaxExt) const =0 throw (INTERP_KERNEL::Exception) |
virtual const DataArrayInt * | getRevNumberFieldAtLevel (int meshDimRelToMaxExt) const =0 throw (INTERP_KERNEL::Exception) |
virtual DataArrayInt * | getFamiliesArr (int meshDimRelToMaxExt, const std::vector< std::string > &fams, bool renum=false) const =0 throw (INTERP_KERNEL::Exception) |
virtual DataArrayInt * | getGroupsArr (int meshDimRelToMaxExt, const std::vector< std::string > &grps, bool renum=false) const throw (INTERP_KERNEL::Exception) |
virtual DataArrayInt * | getGroupArr (int meshDimRelToMaxExt, const char *grp, bool renum=false) const throw (INTERP_KERNEL::Exception) |
virtual DataArrayInt * | getFamilyArr (int meshDimRelToMaxExt, const char *fam, bool renum=false) const throw (INTERP_KERNEL::Exception) |
virtual DataArrayInt * | getNodeGroupArr (const char *grp, bool renum=false) const throw (INTERP_KERNEL::Exception) |
virtual DataArrayInt * | getNodeGroupsArr (const std::vector< std::string > &grps, bool renum=false) const throw (INTERP_KERNEL::Exception) |
virtual DataArrayInt * | getNodeFamilyArr (const char *fam, bool renum=false) const throw (INTERP_KERNEL::Exception) |
virtual DataArrayInt * | getNodeFamiliesArr (const std::vector< std::string > &fams, bool renum=false) const throw (INTERP_KERNEL::Exception) |
![]() | |
bool | decrRef () const |
void | incrRef () const |
Static Public Member Functions | |
static MEDFileMesh * | New (const char *fileName) throw (INTERP_KERNEL::Exception) |
static MEDFileMesh * | New (const char *fileName, const char *mName, int dt=-1, int it=-1) throw (INTERP_KERNEL::Exception) |
Static Public Attributes | |
static const char | DFT_FAM_NAME [] = "FAMILLE_ZERO" |
Protected Member Functions | |
MEDFileMesh () | |
void | addFamilyOnAllGroupsHaving (const char *famName, const char *otherFamName) throw (INTERP_KERNEL::Exception) |
virtual void | writeLL (med_idt fid) const =0 throw (INTERP_KERNEL::Exception) |
void | dealWithTinyInfo (const MEDCouplingMesh *m) throw (INTERP_KERNEL::Exception) |
virtual void | synchronizeTinyInfoOnLeaves () const =0 |
void | getFamilyRepr (std::ostream &oss) const |
virtual void | appendFamilyEntries (const std::set< int > &famIds, const std::vector< std::vector< int > > &fidsOfGrps, const std::vector< std::string > &grpNames) |
virtual void | changeFamilyIdArr (int oldId, int newId)=0 throw (INTERP_KERNEL::Exception) |
![]() | |
RefCountObject () | |
RefCountObject (const RefCountObject &other) | |
virtual | ~RefCountObject () |
Static Protected Member Functions | |
static void | TranslateFamilyIds (int offset, DataArrayInt *famArr, std::vector< std::vector< int > > &famIdsPerGrp) |
static std::string | CreateNameNotIn (const std::string &nameTry, const std::vector< std::string > &namesToAvoid) throw (INTERP_KERNEL::Exception) |
Protected Attributes | |
int | _order |
int | _iteration |
double | _time |
std::string | _dt_unit |
std::string | _name |
std::string | _univ_name |
std::string | _desc_name |
std::map< std::string, std::vector< std::string > > | _groups |
std::map< std::string, int > | _families |
|
protected |
|
static |
Reimplemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
References ParaMEDMEM::CARTESIAN, MEDLoader::GetMeshNames(), ParaMEDMEM::MEDFileUMesh::New(), ParaMEDMEM::MEDFileCMesh::New(), and ParaMEDMEM::UNSTRUCTURED.
Referenced by ParaMEDMEM::MEDFileField1TSWithoutDAS::getFieldAtLevel(), and ParaMEDMEM::MEDFileField1TSWithoutDAS::getFieldAtTopLevel().
|
static |
Reimplemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
References ParaMEDMEM::CARTESIAN, ParaMEDMEM::MEDFileUMesh::New(), ParaMEDMEM::MEDFileCMesh::New(), and ParaMEDMEM::UNSTRUCTURED.
|
virtual |
Reimplemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
References _desc_name, _dt_unit, _iteration, _name, _order, _time, _univ_name, areFamsEqual(), and areGrpsEqual().
Referenced by ParaMEDMEM::MEDFileUMesh::isEqual(), and ParaMEDMEM::MEDFileCMesh::isEqual().
|
virtual |
Reimplemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
void ParaMEDMEM::MEDFileMesh::setName | ( | const char * | name | ) |
const char* ParaMEDMEM::MEDFileMesh::getName | ( | ) | const |
Referenced by simpleRepr().
void ParaMEDMEM::MEDFileMesh::setUnivName | ( | const char * | name | ) |
const char* ParaMEDMEM::MEDFileMesh::getUnivName | ( | ) | const |
void ParaMEDMEM::MEDFileMesh::setDescription | ( | const char * | name | ) |
const char* ParaMEDMEM::MEDFileMesh::getDescription | ( | ) | const |
Referenced by simpleRepr().
void ParaMEDMEM::MEDFileMesh::setOrder | ( | int | order | ) |
int ParaMEDMEM::MEDFileMesh::getOrder | ( | ) | const |
void ParaMEDMEM::MEDFileMesh::setIteration | ( | int | it | ) |
int ParaMEDMEM::MEDFileMesh::getIteration | ( | ) | const |
void ParaMEDMEM::MEDFileMesh::setTimeValue | ( | double | time | ) |
void ParaMEDMEM::MEDFileMesh::setTime | ( | double | time, |
int | dt, | ||
int | it | ||
) |
double ParaMEDMEM::MEDFileMesh::getTime | ( | int & | dt, |
int & | it | ||
) |
double ParaMEDMEM::MEDFileMesh::getTimeValue | ( | ) | const |
void ParaMEDMEM::MEDFileMesh::setTimeUnit | ( | const char * | unit | ) |
const char* ParaMEDMEM::MEDFileMesh::getTimeUnit | ( | ) | const |
|
pure virtual |
Implemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
|
pure virtual |
Implemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
|
virtual |
|
virtual |
|
pure virtual |
Implemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
|
pure virtual |
Implemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
bool MEDFileMesh::areFamsEqual | ( | const MEDFileMesh * | other, |
std::string & | what | ||
) | const |
bool MEDFileMesh::areGrpsEqual | ( | const MEDFileMesh * | other, |
std::string & | what | ||
) | const |
bool MEDFileMesh::existsGroup | ( | const char * | groupName | ) | const |
References _groups.
bool MEDFileMesh::existsFamily | ( | int | famId | ) | const |
References _families.
bool MEDFileMesh::existsFamily | ( | const char * | familyName | ) | const |
References _families.
void MEDFileMesh::setFamilyId | ( | const char * | familyName, |
int | id | ||
) |
References _families.
|
virtual |
This method appends a new entry in _families attribute. An exception is thrown if either the famId is already kept by an another familyName. An exception is thrown if name 'familyName' is alreadyset with a different 'famId'.
|
virtual |
This method creates a new group called 'groupName' in 'this'. If it exists a group with the same name an INTERP_KERNEL::Exception will be thrown. If the 'meshDimRelToMaxExt' is not existing an INTERP_KERNEL::Exception will be thrown too. WARNING : This method does not garantee that 'groupName' lies only on a single level specified by 'meshDimRelToMaxExt'. in the case of a presence of one or more family id in family field at 'meshDimRelToMaxExt' level that appears in another level. If there is a risk of such case call MEDFileMesh::keepFamIdsOnlyOnLevs method before calling this method. (call to MEDFileMesh::keepFamIdsOnlyOnLevs should be done with MEDFileMesh::getFamiliesIdsOnGroup('groupName' as first input ).
References ParaMEDMEM::DataArrayInt::getDifferentValues().
|
virtual |
This method checks that family Ids in 'famIds' are not present in levels not in 'vMeshDimRelToMaxExt'. If it is the case true is returned and 'this' is not modified. If there is some levels not in 'vMeshDimRelToMaxExt' where one or more family ids in 'famIds' appear new families are created and groups are updated in consequence.
References ParaMEDMEM::DataArrayInt::getDifferentValues().
void MEDFileMesh::addFamilyOnGrp | ( | const char * | grpName, |
const char * | famName | ||
) | throw (INTERP_KERNEL::Exception) |
This method add into the family list of a group 'grpName' the family with name 'famName'. If the group 'grpName' does not exist it is created and 'famName' is added to the list. If the group 'grpName' already exists, 'famName' will be added into family list of the existing group. This method throws an INTERP_KERNEL::Exception if 'famName' does not exit.
std::string MEDFileMesh::findOrCreateAndGiveFamilyWithId | ( | int | id, |
bool & | created | ||
) | throw (INTERP_KERNEL::Exception) |
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.
void MEDFileMesh::setFamilyInfo | ( | const std::map< std::string, int > & | info | ) |
References _families.
void MEDFileMesh::setGroupInfo | ( | const std::map< std::string, std::vector< std::string > > & | info | ) |
References _groups.
void MEDFileMesh::copyFamGrpMapsFrom | ( | const MEDFileMesh & | other | ) |
const std::map<std::string,int>& ParaMEDMEM::MEDFileMesh::getFamilyInfo | ( | ) | const |
const std::map<std::string, std::vector<std::string> >& ParaMEDMEM::MEDFileMesh::getGroupInfo | ( | ) | const |
std::vector< std::string > MEDFileMesh::getFamiliesOnGroup | ( | const char * | name | ) | const throw (INTERP_KERNEL::Exception) |
std::vector< std::string > MEDFileMesh::getFamiliesOnGroups | ( | const std::vector< std::string > & | grps | ) | const throw (INTERP_KERNEL::Exception) |
std::vector< int > MEDFileMesh::getFamiliesIdsOnGroup | ( | const char * | name | ) | const throw (INTERP_KERNEL::Exception) |
void MEDFileMesh::setFamiliesOnGroup | ( | const char * | name, |
const std::vector< std::string > & | fams | ||
) | throw (INTERP_KERNEL::Exception) |
This method sets families at a corresponding groups existing or not. If it existed, it is replaced by new 'fams'. Each entry in 'fams' is checked if it is not still existing default id 0 is set.
void MEDFileMesh::setFamiliesIdsOnGroup | ( | const char * | name, |
const std::vector< int > & | famIds | ||
) | throw (INTERP_KERNEL::Exception) |
Behaves as MEDFileMesh::setFamiliesOnGroup, except that if there is presence of a family id in 'famIds' not existing an exception is thrown. If several families have same id the first one in lexical order is taken into account.
std::vector< std::string > MEDFileMesh::getGroupsOnFamily | ( | const char * | name | ) | const throw (INTERP_KERNEL::Exception) |
Referenced by assignFamilyNameWithGroupName(), and getFamilyRepr().
void MEDFileMesh::setGroupsOnFamily | ( | const char * | famName, |
const std::vector< std::string > & | grps | ||
) | throw (INTERP_KERNEL::Exception) |
This method expects that family 'famName' is already existing. If not an exception will be thrown.
std::vector< std::string > MEDFileMesh::getGroupsNames | ( | ) | const |
References _groups.
std::vector< std::string > MEDFileMesh::getFamiliesNames | ( | ) | const |
References _families.
void MEDFileMesh::assignFamilyNameWithGroupName | ( | ) | throw (INTERP_KERNEL::Exception) |
This method scans every families and for each families shared by only one group, the corresponding family takes the same name than the group.
References _families, _groups, and getGroupsOnFamily().
void MEDFileMesh::removeGroup | ( | const char * | name | ) | throw (INTERP_KERNEL::Exception) |
void MEDFileMesh::removeFamily | ( | const char * | name | ) | throw (INTERP_KERNEL::Exception) |
void MEDFileMesh::changeGroupName | ( | const char * | oldName, |
const char * | newName | ||
) | throw (INTERP_KERNEL::Exception) |
void MEDFileMesh::changeFamilyName | ( | const char * | oldName, |
const char * | newName | ||
) | throw (INTERP_KERNEL::Exception) |
void MEDFileMesh::changeFamilyId | ( | int | oldId, |
int | newId | ||
) | throw (INTERP_KERNEL::Exception) |
This method changes the family ids in 'this'. It leads to a modification into '_families' attributes and in ids stored in arrays. This method calls MEDFileMesh::changeFamilyIdArr method.
int MEDFileMesh::getFamilyId | ( | const char * | name | ) | const throw (INTERP_KERNEL::Exception) |
int MEDFileMesh::getMaxFamilyId | ( | ) | const throw (INTERP_KERNEL::Exception) |
References _families.
std::vector< int > MEDFileMesh::getFamiliesIds | ( | const std::vector< std::string > & | famNames | ) | const throw (INTERP_KERNEL::Exception) |
std::string MEDFileMesh::getFamilyNameGivenId | ( | int | id | ) | const throw (INTERP_KERNEL::Exception) |
Returns the first (in lexical order) family name having family id equal to 'id'.
|
pure virtual |
Implemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
|
virtual |
Reimplemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
References getDescription(), and getName().
|
pure virtual |
Implemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
|
virtual |
References ParaMEDMEM::DataArrayInt::MakePartition().
|
pure virtual |
Implemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
|
pure virtual |
Implemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
|
pure virtual |
Implemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
|
pure virtual |
Implemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
|
pure virtual |
Implemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
|
pure virtual |
Implemented in ParaMEDMEM::MEDFileCMesh, and ParaMEDMEM::MEDFileUMesh.
|
virtual |
|
virtual |
References ParaMEDMEM::DataArray::setName().
|
virtual |
References ParaMEDMEM::DataArray::setName().
|
virtual |
References ParaMEDMEM::DataArray::setName().
|
virtual |
|
virtual |
References ParaMEDMEM::DataArray::setName().
|
virtual |
|
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.
|
protectedpure virtual |
|
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.
|
protectedpure virtual |
|
protected |
References _families, and getGroupsOnFamily().
Referenced by ParaMEDMEM::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.
|
protectedpure virtual |
|
staticprotected |
References ParaMEDMEM::DataArrayInt::applyLin().
|
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.
|
protected |
Referenced by isEqual().
|
protected |
Referenced by isEqual().
|
protected |
Referenced by isEqual().
|
protected |
Referenced by isEqual().
|
protected |
Referenced by isEqual().
|
protected |
Referenced by isEqual().
|
protected |
Referenced by isEqual().
|
protected |
|
protected |
Referenced by appendFamilyEntries(), areFamsEqual(), assignFamilyNameWithGroupName(), copyFamGrpMapsFrom(), existsFamily(), getFamiliesNames(), getFamilyRepr(), getMaxFamilyId(), ParaMEDMEM::MEDFileUMesh::optimizeFamilies(), setFamilyId(), setFamilyInfo(), and ParaMEDMEM::MEDFileUMesh::simpleRepr().
|
static |