Version: 6.3.1

ParaMEDMEM::MEDFileMesh Class Reference

Inheritance diagram for ParaMEDMEM::MEDFileMesh:
Collaboration diagram for ParaMEDMEM::MEDFileMesh:

List of all members.

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 void write (const char *fileName, int mode) const =0 throw (INTERP_KERNEL::Exception)
virtual int getSizeAtLevel (int meshDimRelToMaxExt) const =0 throw (INTERP_KERNEL::Exception)
virtual MEDCouplingMeshgetGenMeshAtLevel (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 existsFamily (int famId) const
bool existsFamily (const char *familyName) const
void setFamilyId (const char *familyName, int id)
void addFamily (const char *familyName, int id) throw (INTERP_KERNEL::Exception)
void addGrpOnFamily (const char *grpName, const char *famName) 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 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)
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 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 DataArrayIntgetFamilyFieldAtLevel (int meshDimRelToMaxExt) const =0 throw (INTERP_KERNEL::Exception)
virtual const DataArrayIntgetNumberFieldAtLevel (int meshDimRelToMaxExt) const =0 throw (INTERP_KERNEL::Exception)
virtual const DataArrayIntgetRevNumberFieldAtLevel (int meshDimRelToMaxExt) const =0 throw (INTERP_KERNEL::Exception)
virtual DataArrayIntgetFamiliesArr (int meshDimRelToMaxExt, const std::vector< std::string > &fams, bool renum=false) const =0 throw (INTERP_KERNEL::Exception)
virtual DataArrayIntgetGroupsArr (int meshDimRelToMaxExt, const std::vector< std::string > &grps, bool renum=false) const throw (INTERP_KERNEL::Exception)
virtual DataArrayIntgetGroupArr (int meshDimRelToMaxExt, const char *grp, bool renum=false) const throw (INTERP_KERNEL::Exception)
virtual DataArrayIntgetFamilyArr (int meshDimRelToMaxExt, const char *fam, bool renum=false) const throw (INTERP_KERNEL::Exception)
virtual DataArrayIntgetNodeGroupArr (const char *grp, bool renum=false) const throw (INTERP_KERNEL::Exception)
virtual DataArrayIntgetNodeGroupsArr (const std::vector< std::string > &grps, bool renum=false) const throw (INTERP_KERNEL::Exception)
virtual DataArrayIntgetNodeFamilyArr (const char *fam, bool renum=false) const throw (INTERP_KERNEL::Exception)
virtual DataArrayIntgetNodeFamiliesArr (const std::vector< std::string > &fams, bool renum=false) const throw (INTERP_KERNEL::Exception)

Static Public Member Functions

static MEDFileMeshNew (const char *fileName) throw (INTERP_KERNEL::Exception)
static MEDFileMeshNew (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 dealWithTinyInfo (const MEDCouplingMesh *m) throw (INTERP_KERNEL::Exception)
virtual void synchronizeTinyInfoOnLeaves () const =0
virtual void appendFamilyEntries (const std::set< int > &famIds, const std::vector< std::vector< int > > &fidsOfGrps, const std::vector< std::string > &grpNames)

Static Protected Member Functions

static void TranslateFamilyIds (int offset, DataArrayInt *famArr, std::vector< std::vector< int > > &famIdsPerGrp)

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

Constructor & Destructor Documentation

MEDFileMesh::MEDFileMesh ( ) [protected]

Member Function Documentation

MEDFileMesh * MEDFileMesh::New ( const char *  fileName) throw (INTERP_KERNEL::Exception) [static]
MEDFileMesh * MEDFileMesh::New ( const char *  fileName,
const char *  mName,
int  dt = -1,
int  it = -1 
) throw (INTERP_KERNEL::Exception) [static]
bool MEDFileMesh::isEqual ( const MEDFileMesh other,
double  eps,
std::string &  what 
) const [virtual]
void MEDFileMesh::clearNonDiscrAttributes ( ) const [virtual]
void ParaMEDMEM::MEDFileMesh::setName ( const char *  name)

References _name.

const char* ParaMEDMEM::MEDFileMesh::getName ( ) const

References _name.

void ParaMEDMEM::MEDFileMesh::setUnivName ( const char *  name)

References _univ_name.

const char* ParaMEDMEM::MEDFileMesh::getUnivName ( ) const

References _univ_name.

void ParaMEDMEM::MEDFileMesh::setDescription ( const char *  name)

References _desc_name.

const char* ParaMEDMEM::MEDFileMesh::getDescription ( ) const

References _desc_name.

void ParaMEDMEM::MEDFileMesh::setOrder ( int  order)

References _order.

int ParaMEDMEM::MEDFileMesh::getOrder ( ) const

References _order.

void ParaMEDMEM::MEDFileMesh::setIteration ( int  it)

References _iteration.

int ParaMEDMEM::MEDFileMesh::getIteration ( ) const

References _iteration.

void ParaMEDMEM::MEDFileMesh::setTimeValue ( double  time)

References _time.

void ParaMEDMEM::MEDFileMesh::setTime ( double  time,
int  dt,
int  it 
)

References _iteration, _order, and _time.

double ParaMEDMEM::MEDFileMesh::getTime ( int &  dt,
int &  it 
)

References _iteration, _order, and _time.

double ParaMEDMEM::MEDFileMesh::getTimeValue ( ) const

References _time.

void ParaMEDMEM::MEDFileMesh::setTimeUnit ( const char *  unit)

References _dt_unit.

const char* ParaMEDMEM::MEDFileMesh::getTimeUnit ( ) const

References _dt_unit.

virtual void ParaMEDMEM::MEDFileMesh::write ( const char *  fileName,
int  mode 
) const throw (INTERP_KERNEL::Exception) [pure virtual]
virtual int ParaMEDMEM::MEDFileMesh::getSizeAtLevel ( int  meshDimRelToMaxExt) const throw (INTERP_KERNEL::Exception) [pure virtual]
virtual MEDCouplingMesh* ParaMEDMEM::MEDFileMesh::getGenMeshAtLevel ( int  meshDimRelToMax,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception) [pure virtual]
bool MEDFileMesh::areFamsEqual ( const MEDFileMesh other,
std::string &  what 
) const

References _families.

Referenced by isEqual().

bool MEDFileMesh::areGrpsEqual ( const MEDFileMesh other,
std::string &  what 
) const

References _groups.

Referenced by isEqual().

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.

void MEDFileMesh::addFamily ( const char *  familyName,
int  famId 
) 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'.

void MEDFileMesh::addGrpOnFamily ( const char *  grpName,
const char *  famName 
) throw (INTERP_KERNEL::Exception)
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)

References _families, and _groups.

const std::map<std::string,int>& ParaMEDMEM::MEDFileMesh::getFamilyInfo ( ) const

References _families.

const std::map<std::string, std::vector<std::string> >& ParaMEDMEM::MEDFileMesh::getGroupInfo ( ) const

References _groups.

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

virtual int ParaMEDMEM::MEDFileMesh::getMeshDimension ( ) const throw (INTERP_KERNEL::Exception) [pure virtual]
void MEDFileMesh::setGroupsAtLevel ( int  meshDimRelToMaxExt,
const std::vector< const DataArrayInt * > &  grps,
bool  renum = false 
) throw (INTERP_KERNEL::Exception) [virtual]
virtual void ParaMEDMEM::MEDFileMesh::setFamilyFieldArr ( int  meshDimRelToMaxExt,
DataArrayInt famArr 
) throw (INTERP_KERNEL::Exception) [pure virtual]
virtual void ParaMEDMEM::MEDFileMesh::setRenumFieldArr ( int  meshDimRelToMaxExt,
DataArrayInt renumArr 
) throw (INTERP_KERNEL::Exception) [pure virtual]
virtual const DataArrayInt* ParaMEDMEM::MEDFileMesh::getFamilyFieldAtLevel ( int  meshDimRelToMaxExt) const throw (INTERP_KERNEL::Exception) [pure virtual]
virtual const DataArrayInt* ParaMEDMEM::MEDFileMesh::getNumberFieldAtLevel ( int  meshDimRelToMaxExt) const throw (INTERP_KERNEL::Exception) [pure virtual]
virtual const DataArrayInt* ParaMEDMEM::MEDFileMesh::getRevNumberFieldAtLevel ( int  meshDimRelToMaxExt) const throw (INTERP_KERNEL::Exception) [pure virtual]
virtual DataArrayInt* ParaMEDMEM::MEDFileMesh::getFamiliesArr ( int  meshDimRelToMaxExt,
const std::vector< std::string > &  fams,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception) [pure virtual]
DataArrayInt * MEDFileMesh::getGroupsArr ( int  meshDimRelToMaxExt,
const std::vector< std::string > &  grps,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception) [virtual]
DataArrayInt * MEDFileMesh::getGroupArr ( int  meshDimRelToMaxExt,
const char *  grp,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception) [virtual]
DataArrayInt * MEDFileMesh::getFamilyArr ( int  meshDimRelToMaxExt,
const char *  fam,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception) [virtual]
DataArrayInt * MEDFileMesh::getNodeGroupArr ( const char *  grp,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception) [virtual]
DataArrayInt * MEDFileMesh::getNodeGroupsArr ( const std::vector< std::string > &  grps,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception) [virtual]
DataArrayInt * MEDFileMesh::getNodeFamilyArr ( const char *  fam,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception) [virtual]
DataArrayInt * MEDFileMesh::getNodeFamiliesArr ( const std::vector< std::string > &  fams,
bool  renum = false 
) const throw (INTERP_KERNEL::Exception) [virtual]
void MEDFileMesh::dealWithTinyInfo ( const MEDCouplingMesh m) throw (INTERP_KERNEL::Exception) [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.

virtual void ParaMEDMEM::MEDFileMesh::synchronizeTinyInfoOnLeaves ( ) const [protected, pure virtual]
void MEDFileMesh::appendFamilyEntries ( const std::set< int > &  famIds,
const std::vector< std::vector< int > > &  fidsOfGrps,
const std::vector< std::string > &  grpNames 
) [protected, virtual]

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, and _groups.

void MEDFileMesh::TranslateFamilyIds ( int  offset,
DataArrayInt famArr,
std::vector< std::vector< int > > &  famIdsPerGrp 
) [static, protected]

Member Data Documentation

std::string ParaMEDMEM::MEDFileMesh::_dt_unit [protected]

Referenced by getTimeUnit(), isEqual(), and setTimeUnit().

std::string ParaMEDMEM::MEDFileMesh::_name [protected]

Referenced by getName(), isEqual(), and setName().

std::string ParaMEDMEM::MEDFileMesh::_univ_name [protected]

Referenced by getUnivName(), isEqual(), and setUnivName().

const char MEDFileMesh::DFT_FAM_NAME = "FAMILLE_ZERO" [static]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS