Version: 6.3.1
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes

ParaMEDMEM.MEDFileMesh Class Reference

#include <MEDFileMesh.hxx>

Inheritance diagram for ParaMEDMEM.MEDFileMesh:
Inheritance graph

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< intgetFamiliesIdsOnGroup (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< intgetFamiliesIds (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)
const char* ParaMEDMEM.MEDFileMesh.getName ( ) const
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
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
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
bool MEDFileMesh::areGrpsEqual ( const MEDFileMesh other,
std::string &  what 
) const
bool MEDFileMesh::existsFamily ( int  famId) const
bool MEDFileMesh::existsFamily ( const char *  familyName) const
void MEDFileMesh::setFamilyId ( const char *  familyName,
int  id 
)
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'.

References Med_Gen_test.familyName, and Med_Gen_test.it.

void MEDFileMesh::addGrpOnFamily ( const char *  grpName,
const char *  famName 
) throw (INTERP_KERNEL::Exception)

References Med_Gen_test.it.

void MEDFileMesh::setFamilyInfo ( const std::map< std::string, int > &  info)
void MEDFileMesh::setGroupInfo ( const std::map< std::string, std::vector< std::string > > &  info)
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)

References Med_Gen_test.it.

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.

References medClient_test.name.

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.

References medClient_test.name.

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.

References Med_Gen_test.it.

std::vector< std::string > MEDFileMesh::getGroupsNames ( ) const
std::vector< std::string > MEDFileMesh::getFamiliesNames ( ) const
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)

References Med_Gen_test.it.

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

References Med_Gen_test.it.

int MEDFileMesh::getFamilyId ( const char *  name) const throw (INTERP_KERNEL::Exception)
int MEDFileMesh::getMaxFamilyId ( ) const throw (INTERP_KERNEL::Exception)
std::vector< int > MEDFileMesh::getFamiliesIds ( const std::vector< std::string > &  famNames) const throw (INTERP_KERNEL::Exception)

References Med_Gen_test.it, and testMEDMEM.ret.

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

References Med_Gen_test.it.

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.

References TestMedCorba2.m, and medClient_test.name.

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

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

Field Documentation

std::string ParaMEDMEM.MEDFileMesh._dt_unit [protected]
std::string ParaMEDMEM.MEDFileMesh._name [protected]
std::string ParaMEDMEM.MEDFileMesh._univ_name [protected]
std::string ParaMEDMEM.MEDFileMesh._desc_name [protected]
std::map<std::string, std::vector<std::string> > ParaMEDMEM.MEDFileMesh._groups [protected]
std::map<std::string,int> ParaMEDMEM.MEDFileMesh._families [protected]
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