Version: 5.1.6

ParaMEDMEM.MEDFileUMesh Class Reference

#include <MEDFileMesh.hxx>

Inheritance diagram for ParaMEDMEM.MEDFileUMesh:
Inheritance graph

Public Member Functions

 ~MEDFileUMesh ()
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 write (const char *fileName, int mode) const throw (INTERP_KERNEL::Exception)
int getFamilyId (const char *name) const throw (INTERP_KERNEL::Exception)
int getMaxFamilyId () const throw (INTERP_KERNEL::Exception)
std::vector< intgetFamiliesIds (const std::vector< std::string > &famNames) const throw (INTERP_KERNEL::Exception)
std::string getFamilyNameGivenId (int id) const throw (INTERP_KERNEL::Exception)
int getMeshDimension () const
int getSizeAtLevel (int meshDimRelToMaxExt) const throw (INTERP_KERNEL::Exception)
const DataArrayIntgetFamilyFieldAtLevel (int meshDimRelToMaxExt) const throw (INTERP_KERNEL::Exception)
const DataArrayIntgetNumberFieldAtLevel (int meshDimRelToMaxExt) const throw (INTERP_KERNEL::Exception)
const DataArrayIntgetRevNumberFieldAtLevel (int meshDimRelToMaxExt) const throw (INTERP_KERNEL::Exception)
std::vector< std::string > getFamiliesOnGroup (const char *name) const throw (INTERP_KERNEL::Exception)
std::vector< std::string > getGroupsOnFamily (const char *name) const throw (INTERP_KERNEL::Exception)
std::vector< std::string > getGroupsNames () const
std::vector< std::string > getFamiliesNames () const
std::vector< intgetNonEmptyLevels () const
std::vector< intgetNonEmptyLevelsExt () const
DataArrayDoublegetCoords () const
MEDCouplingUMeshgetGroup (int meshDimRelToMaxExt, const char *grp, bool renum=false) const throw (INTERP_KERNEL::Exception)
DataArrayIntgetGroupArr (int meshDimRelToMaxExt, const char *grp, bool renum=false) const throw (INTERP_KERNEL::Exception)
MEDCouplingUMeshgetGroups (int meshDimRelToMaxExt, const std::vector< std::string > &grps, bool renum=false) const throw (INTERP_KERNEL::Exception)
DataArrayIntgetGroupsArr (int meshDimRelToMaxExt, const std::vector< std::string > &grps, bool renum=false) const throw (INTERP_KERNEL::Exception)
MEDCouplingUMeshgetFamily (int meshDimRelToMaxExt, const char *fam, bool renum=false) const throw (INTERP_KERNEL::Exception)
DataArrayIntgetFamilyArr (int meshDimRelToMaxExt, const char *fam, bool renum=false) const throw (INTERP_KERNEL::Exception)
MEDCouplingUMeshgetFamilies (int meshDimRelToMaxExt, const std::vector< std::string > &fams, bool renum=false) const throw (INTERP_KERNEL::Exception)
DataArrayIntgetFamiliesArr (int meshDimRelToMaxExt, const std::vector< std::string > &fams, bool renum=false) const throw (INTERP_KERNEL::Exception)
DataArrayIntgetNodeGroupArr (const char *grp, bool renum=false) const throw (INTERP_KERNEL::Exception)
DataArrayIntgetNodeGroupsArr (const std::vector< std::string > &grps, bool renum=false) const throw (INTERP_KERNEL::Exception)
DataArrayIntgetNodeFamilyArr (const char *fam, bool renum=false) const throw (INTERP_KERNEL::Exception)
DataArrayIntgetNodeFamiliesArr (const std::vector< std::string > &fams, bool renum=false) const throw (INTERP_KERNEL::Exception)
MEDCouplingUMeshgetMeshAtLevel (int meshDimRelToMaxExt, bool renum=false) const throw (INTERP_KERNEL::Exception)
MEDCouplingUMeshgetLevel0Mesh (bool renum=false) const throw (INTERP_KERNEL::Exception)
MEDCouplingUMeshgetLevelM1Mesh (bool renum=false) const throw (INTERP_KERNEL::Exception)
MEDCouplingUMeshgetLevelM2Mesh (bool renum=false) const throw (INTERP_KERNEL::Exception)
MEDCouplingUMeshgetLevelM3Mesh (bool renum=false) const throw (INTERP_KERNEL::Exception)
const std::map< std::string,
int > & 
getFamilyInfo () const
const std::map< std::string,
std::vector< std::string > > & 
getGroupInfo () const
bool existsFamily (int famId) const
bool existsFamily (const char *familyName) const
void copyFamGrpMapsFrom (const MEDFileUMesh &other)
void setFamilyInfo (const std::map< std::string, int > &info)
void setGroupInfo (const std::map< std::string, std::vector< std::string > > &info)
void setFamilyNameAttachedOnId (int id, const std::string &newFamName) throw (INTERP_KERNEL::Exception)
void setCoords (DataArrayDouble *coords) throw (INTERP_KERNEL::Exception)
void setGroupsAtLevel (int meshDimRelToMaxExt, const std::vector< const DataArrayInt * > &grps, bool renum=false) throw (INTERP_KERNEL::Exception)
void eraseGroupsAtLevel (int meshDimRelToMaxExt) throw (INTERP_KERNEL::Exception)
void setFamilyField (DataArrayInt *arr, const std::vector< std::vector< int > > &userfids, const std::vector< std::string > &grpNames, bool renum=false) throw (INTERP_KERNEL::Exception)
void setFamilyArr (int meshDimRelToMaxExt, DataArrayInt *famArr)
void setRenumArr (int meshDimRelToMaxExt, DataArrayInt *renumArr)
void addNodeGroup (const std::string &name, const std::vector< int > &ids) throw (INTERP_KERNEL::Exception)
void setMeshAtLevel (int meshDimRelToMax, MEDCouplingUMesh *m) throw (INTERP_KERNEL::Exception)
void setMeshAtLevelOld (int meshDimRelToMax, MEDCouplingUMesh *m) throw (INTERP_KERNEL::Exception)
void setMeshAtLevelGen (int meshDimRelToMax, MEDCouplingUMesh *m, bool newOrOld) throw (INTERP_KERNEL::Exception)
void setGroupsFromScratch (int meshDimRelToMax, const std::vector< const MEDCouplingUMesh * > &ms) throw (INTERP_KERNEL::Exception)
void setGroupsOnSetMesh (int meshDimRelToMax, const std::vector< const MEDCouplingUMesh * > &ms, bool renum) throw (INTERP_KERNEL::Exception)
void optimizeFamilies () throw (INTERP_KERNEL::Exception)
void addFamily (int famId, const char *familyName) throw (INTERP_KERNEL::Exception)
 MEDFileUMesh ()
 MEDFileUMesh (const char *fileName, const char *mName) throw (INTERP_KERNEL::Exception)
const MEDFileUMeshSplitL1getMeshAtLevSafe (int meshDimRelToMaxExt) const throw (INTERP_KERNEL::Exception)
MEDFileUMeshSplitL1getMeshAtLevSafe (int meshDimRelToMaxExt) throw (INTERP_KERNEL::Exception)
void checkMeshDimCoherency (int meshDim, int meshDimRelToMax) const throw (INTERP_KERNEL::Exception)
DataArrayDoublecheckMultiMesh (const std::vector< const MEDCouplingUMesh * > &ms) const throw (INTERP_KERNEL::Exception)
void appendFamilyEntries (const std::set< int > &famIds, const std::vector< std::vector< int > > &fidsOfGrps, const std::vector< std::string > &grpNames)
void computeRevNum () const

Static Public Member Functions

static MEDFileUMeshNew (const char *fileName, const char *mName) throw (INTERP_KERNEL::Exception)
static MEDFileUMeshNew (const char *fileName) throw (INTERP_KERNEL::Exception)
static MEDFileUMeshNew ()
static void TranslateFamilyIds (int offset, DataArrayInt *famArr, std::vector< std::vector< int > > &famIdsPerGrp)

Data Fields

std::map< std::string,
std::vector< std::string > > 
_groups
std::map< std::string, int_families
std::vector
< MEDCouplingAutoRefCountObjectPtr
< MEDFileUMeshSplitL1 > > 
_ms
MEDCouplingAutoRefCountObjectPtr
< DataArrayDouble
_coords
MEDCouplingAutoRefCountObjectPtr
< DataArrayInt
_fam_coords
MEDCouplingAutoRefCountObjectPtr
< DataArrayInt
_num_coords
MEDCouplingAutoRefCountObjectPtr
< DataArrayInt
_rev_num_coords
int _too_long_str
int _zipconn_pol

Constructor & Destructor Documentation

MEDFileUMesh::~MEDFileUMesh (  ) 
MEDFileUMesh::MEDFileUMesh (  ) 
MEDFileUMesh::MEDFileUMesh ( const char *  fileName,
const char *  mName 
) throw (INTERP_KERNEL::Exception)

Member Function Documentation

MEDFileUMesh * MEDFileUMesh::New ( const char *  fileName,
const char *  mName 
) throw (INTERP_KERNEL::Exception) [static]

Reimplemented from ParaMEDMEM.MEDFileMesh.

References Med_Gen_test.fileName.

MEDFileUMesh * MEDFileUMesh::New ( const char *  fileName  )  throw (INTERP_KERNEL::Exception) [static]
MEDFileUMesh * MEDFileUMesh::New (  )  [static]
void MEDFileUMesh::removeGroup ( const char *  name  )  throw (INTERP_KERNEL::Exception)
void MEDFileUMesh::removeFamily ( const char *  name  )  throw (INTERP_KERNEL::Exception)
void MEDFileUMesh::changeGroupName ( const char *  oldName,
const char *  newName 
) throw (INTERP_KERNEL::Exception)

References Med_Gen_test.it.

void MEDFileUMesh::changeFamilyName ( const char *  oldName,
const char *  newName 
) throw (INTERP_KERNEL::Exception)

References Med_Gen_test.it.

void MEDFileUMesh::write ( const char *  fileName,
int  mode 
) const throw (INTERP_KERNEL::Exception)
int MEDFileUMesh::getFamilyId ( const char *  name  )  const throw (INTERP_KERNEL::Exception)
int MEDFileUMesh::getMaxFamilyId (  )  const throw (INTERP_KERNEL::Exception)
std::vector< int > MEDFileUMesh::getFamiliesIds ( const std::vector< std::string > &  famNames  )  const throw (INTERP_KERNEL::Exception)

References Med_Gen_test.it.

std::string MEDFileUMesh::getFamilyNameGivenId ( int  id  )  const throw (INTERP_KERNEL::Exception)

References Med_Gen_test.it.

int MEDFileUMesh::getMeshDimension (  )  const
int MEDFileUMesh::getSizeAtLevel ( int  meshDimRelToMaxExt  )  const throw (INTERP_KERNEL::Exception)
const DataArrayInt * MEDFileUMesh::getFamilyFieldAtLevel ( int  meshDimRelToMaxExt  )  const throw (INTERP_KERNEL::Exception)
const DataArrayInt * MEDFileUMesh::getNumberFieldAtLevel ( int  meshDimRelToMaxExt  )  const throw (INTERP_KERNEL::Exception)
const DataArrayInt * MEDFileUMesh::getRevNumberFieldAtLevel ( int  meshDimRelToMaxExt  )  const throw (INTERP_KERNEL::Exception)
std::vector< std::string > MEDFileUMesh::getFamiliesOnGroup ( const char *  name  )  const throw (INTERP_KERNEL::Exception)
std::vector< std::string > MEDFileUMesh::getGroupsOnFamily ( const char *  name  )  const throw (INTERP_KERNEL::Exception)
std::vector< std::string > MEDFileUMesh::getGroupsNames (  )  const
std::vector< std::string > MEDFileUMesh::getFamiliesNames (  )  const
std::vector< int > MEDFileUMesh::getNonEmptyLevels (  )  const
std::vector< int > MEDFileUMesh::getNonEmptyLevelsExt (  )  const
DataArrayDouble * MEDFileUMesh::getCoords (  )  const
MEDCouplingUMesh * MEDFileUMesh::getGroup ( int  meshDimRelToMaxExt,
const char *  grp,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception)
DataArrayInt * MEDFileUMesh::getGroupArr ( int  meshDimRelToMaxExt,
const char *  grp,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception)
MEDCouplingUMesh * MEDFileUMesh::getGroups ( int  meshDimRelToMaxExt,
const std::vector< std::string > &  grps,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception)

References Med_Gen_test.it.

DataArrayInt * MEDFileUMesh::getGroupsArr ( int  meshDimRelToMaxExt,
const std::vector< std::string > &  grps,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception)

References Med_Gen_test.it.

MEDCouplingUMesh * MEDFileUMesh::getFamily ( int  meshDimRelToMaxExt,
const char *  fam,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception)
DataArrayInt * MEDFileUMesh::getFamilyArr ( int  meshDimRelToMaxExt,
const char *  fam,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception)
MEDCouplingUMesh * MEDFileUMesh::getFamilies ( int  meshDimRelToMaxExt,
const std::vector< std::string > &  fams,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception)
DataArrayInt * MEDFileUMesh::getFamiliesArr ( int  meshDimRelToMaxExt,
const std::vector< std::string > &  fams,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception)
DataArrayInt * MEDFileUMesh::getNodeGroupArr ( const char *  grp,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception)
DataArrayInt * MEDFileUMesh::getNodeGroupsArr ( const std::vector< std::string > &  grps,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception)
DataArrayInt * MEDFileUMesh::getNodeFamilyArr ( const char *  fam,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception)
DataArrayInt * MEDFileUMesh::getNodeFamiliesArr ( const std::vector< std::string > &  fams,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception)
MEDCouplingUMesh * MEDFileUMesh::getMeshAtLevel ( int  meshDimRelToMaxExt,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception)
MEDCouplingUMesh * MEDFileUMesh::getLevel0Mesh ( bool  renum = false  )  const throw (INTERP_KERNEL::Exception)
MEDCouplingUMesh * MEDFileUMesh::getLevelM1Mesh ( bool  renum = false  )  const throw (INTERP_KERNEL::Exception)
MEDCouplingUMesh * MEDFileUMesh::getLevelM2Mesh ( bool  renum = false  )  const throw (INTERP_KERNEL::Exception)
MEDCouplingUMesh * MEDFileUMesh::getLevelM3Mesh ( bool  renum = false  )  const throw (INTERP_KERNEL::Exception)
const std::map<std::string,int>& ParaMEDMEM.MEDFileUMesh.getFamilyInfo (  )  const
const std::map<std::string, std::vector<std::string> >& ParaMEDMEM.MEDFileUMesh.getGroupInfo (  )  const
bool MEDFileUMesh::existsFamily ( int  famId  )  const
bool MEDFileUMesh::existsFamily ( const char *  familyName  )  const
void MEDFileUMesh::copyFamGrpMapsFrom ( const MEDFileUMesh other  ) 
void MEDFileUMesh::setFamilyInfo ( const std::map< std::string, int > &  info  ) 
void MEDFileUMesh::setGroupInfo ( const std::map< std::string, std::vector< std::string > > &  info  ) 
void MEDFileUMesh::setFamilyNameAttachedOnId ( int  id,
const std::string &  newFamName 
) throw (INTERP_KERNEL::Exception)

References testRenumbering.id.

void MEDFileUMesh::setCoords ( DataArrayDouble coords  )  throw (INTERP_KERNEL::Exception)
void MEDFileUMesh::setGroupsAtLevel ( int  meshDimRelToMaxExt,
const std::vector< const DataArrayInt * > &  grps,
bool  renum = false 
) throw (INTERP_KERNEL::Exception)
void MEDFileUMesh::eraseGroupsAtLevel ( int  meshDimRelToMaxExt  )  throw (INTERP_KERNEL::Exception)
void MEDFileUMesh::setFamilyField ( DataArrayInt arr,
const std::vector< std::vector< int > > &  userfids,
const std::vector< std::string > &  grpNames,
bool  renum = false 
) throw (INTERP_KERNEL::Exception)
void MEDFileUMesh::setFamilyArr ( int  meshDimRelToMaxExt,
DataArrayInt famArr 
)
void MEDFileUMesh::setRenumArr ( int  meshDimRelToMaxExt,
DataArrayInt renumArr 
)
void MEDFileUMesh::addNodeGroup ( const std::string &  name,
const std::vector< int > &  ids 
) throw (INTERP_KERNEL::Exception)
void MEDFileUMesh::setMeshAtLevel ( int  meshDimRelToMax,
MEDCouplingUMesh m 
) throw (INTERP_KERNEL::Exception)

References TestMedCorba2.m.

void MEDFileUMesh::setMeshAtLevelOld ( int  meshDimRelToMax,
MEDCouplingUMesh m 
) throw (INTERP_KERNEL::Exception)

References TestMedCorba2.m.

void MEDFileUMesh::setMeshAtLevelGen ( int  meshDimRelToMax,
MEDCouplingUMesh m,
bool  newOrOld 
) throw (INTERP_KERNEL::Exception)
void MEDFileUMesh::setGroupsFromScratch ( int  meshDimRelToMax,
const std::vector< const MEDCouplingUMesh * > &  ms 
) throw (INTERP_KERNEL::Exception)
void MEDFileUMesh::setGroupsOnSetMesh ( int  meshDimRelToMax,
const std::vector< const MEDCouplingUMesh * > &  ms,
bool  renum 
) throw (INTERP_KERNEL::Exception)
void MEDFileUMesh::optimizeFamilies (  )  throw (INTERP_KERNEL::Exception)
void MEDFileUMesh::addFamily ( int  famId,
const char *  familyName 
) throw (INTERP_KERNEL::Exception)

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'.

References Med_Gen_test.familyName, and Med_Gen_test.it.

const MEDFileUMeshSplitL1 * MEDFileUMesh::getMeshAtLevSafe ( int  meshDimRelToMaxExt  )  const throw (INTERP_KERNEL::Exception)
MEDFileUMeshSplitL1 * MEDFileUMesh::getMeshAtLevSafe ( int  meshDimRelToMaxExt  )  throw (INTERP_KERNEL::Exception)
void MEDFileUMesh::checkMeshDimCoherency ( int  meshDim,
int  meshDimRelToMax 
) const throw (INTERP_KERNEL::Exception)
DataArrayDouble * MEDFileUMesh::checkMultiMesh ( const std::vector< const MEDCouplingUMesh * > &  ms  )  const throw (INTERP_KERNEL::Exception)

References testMEDMEM.ret.

void MEDFileUMesh::appendFamilyEntries ( const std::set< int > &  famIds,
const std::vector< std::vector< int > > &  fidsOfGrps,
const std::vector< std::string > &  grpNames 
)

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 ParaMEDMEM.MEDFileUMesh._families, ParaMEDMEM.MEDFileUMesh._groups, and Med_Gen_test.it.

void MEDFileUMesh::computeRevNum (  )  const
void MEDFileUMesh::TranslateFamilyIds ( int  offset,
DataArrayInt famArr,
std::vector< std::vector< int > > &  famIdsPerGrp 
) [static]

Field Documentation

std::map<std::string, std::vector<std::string> > ParaMEDMEM.MEDFileUMesh._groups
std::map<std::string,int> ParaMEDMEM.MEDFileUMesh._families