Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MEDCoupling::MEDFileCMesh Class Reference
Inheritance diagram for MEDCoupling::MEDFileCMesh:
Collaboration diagram for MEDCoupling::MEDFileCMesh:

Public Member Functions

std::string advancedRepr () const
 
MEDFileMeshcartesianize () const
 
void clearNonDiscrAttributes () const
 
MEDFileMeshcreateNewEmpty () const
 
MEDFileCMeshdeepCopy () const
 
std::vector< const
BigMemoryObject * > 
getDirectChildrenWithNull () const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
const MEDCouplingCMeshgetMesh () const
 
int getMeshDimension () const
 
int getSpaceDimension () const
 
bool isEqual (const MEDFileMesh *other, double eps, std::string &what) const
 
void setMesh (MEDCouplingCMesh *m)
 
MEDFileCMeshshallowCpy () const
 
std::string simpleRepr () const
 
- Public Member Functions inherited from MEDCoupling::MEDFileStructuredMesh
void addGroup (int meshDimRelToMaxExt, const DataArrayInt *ids)
 
void addNodeGroup (const DataArrayInt *ids)
 
int buildImplicitPartIfAny (INTERP_KERNEL::NormalizedCellType gt) const
 
std::vector< int > getFamArrNonEmptyLevelsExt () const
 
DataArrayIntgetFamiliesArr (int meshDimRelToMaxExt, const std::vector< std::string > &fams, bool renum=false) const
 
const DataArrayIntgetFamilyFieldAtLevel (int meshDimRelToMaxExt) const
 
DataArrayIntgetFamilyFieldAtLevel (int meshDimRelToMaxExt)
 
std::vector< int > getFamsNonEmptyLevels (const std::vector< std::string > &fams) const
 
std::vector< int > getFamsNonEmptyLevelsExt (const std::vector< std::string > &fams) const
 
std::vector
< INTERP_KERNEL::NormalizedCellType
getGeoTypesAtLevel (int meshDimRelToMax) const
 
MEDCoupling1SGTUMeshgetImplicitFaceMesh () const
 
int getMaxAbsFamilyIdInArrays () const
 
int getMaxFamilyIdInArrays () const
 
MEDCouplingMeshgetMeshAtLevel (int meshDimRelToMax, bool renum=false) const
 
int getMinFamilyIdInArrays () const
 
std::vector< int > getNameArrNonEmptyLevelsExt () const
 
const DataArrayAsciiChargetNameFieldAtLevel (int meshDimRelToMaxExt) const
 
std::vector< int > getNonEmptyLevels () const
 
std::vector< int > getNonEmptyLevelsExt () const
 
std::vector< int > getNumArrNonEmptyLevelsExt () const
 
const DataArrayIntgetNumberFieldAtLevel (int meshDimRelToMaxExt) const
 
int getNumberOfCellsAtLevel (int meshDimRelToMaxExt) const
 
int getNumberOfCellsWithType (INTERP_KERNEL::NormalizedCellType ct) const
 
int getNumberOfNodes () const
 
const DataArrayIntgetRevNumberFieldAtLevel (int meshDimRelToMaxExt) const
 
int getSizeAtLevel (int meshDimRelToMaxExt) const
 
bool hasImplicitPart () const
 
bool presenceOfStructureElements () const
 
void releaseImplicitPartIfAny () const
 
void setFamilyFieldArr (int meshDimRelToMaxExt, DataArrayInt *famArr)
 
void setNameFieldAtLevel (int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr)
 
void setRenumFieldArr (int meshDimRelToMaxExt, DataArrayInt *renumArr)
 
bool unPolyze (std::vector< int > &oldCode, std::vector< int > &newCode, DataArrayInt *&o2nRenumCell)
 
void whichAreNodesFetched (const MEDFileField1TSStructItem &st, const MEDFileFieldGlobsReal *globs, std::vector< bool > &nodesFetched) const
 
- Public Member Functions inherited from MEDCoupling::MEDFileMesh
virtual void addFamily (const std::string &familyName, int id)
 
void addFamilyOnGrp (const std::string &grpName, const std::string &famName)
 
bool areFamsEqual (const MEDFileMesh *other, std::string &what) const
 
bool areGrpsEqual (const MEDFileMesh *other, std::string &what) const
 
void assignFamilyNameWithGroupName ()
 
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 ()
 
DataArrayIntcomputeAllFamilyIdsInUse () const
 
void copyFamGrpMapsFrom (const MEDFileMesh &other)
 
virtual void createGroupOnAll (int meshDimRelToMaxExt, const std::string &groupName)
 
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)
 
DataArrayIntgetAllFamiliesIdsReferenced () const
 
std::vector
< INTERP_KERNEL::NormalizedCellType
getAllGeoTypes () const
 
MEDCouplingAxisType getAxisType () const
 
std::string getDescription () const
 
virtual std::vector< int > getDistributionOfTypes (int meshDimRelToMax) const
 
MEDFileEquivalences * getEquivalences ()
 
const MEDFileEquivalences * getEquivalences () const
 
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 DataArrayIntgetFamilyArr (int meshDimRelToMaxExt, const std::string &fam, bool renum=false) const
 
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 DataArrayIntgetGroupArr (int meshDimRelToMaxExt, const std::string &grp, bool renum=false) const
 
const std::map< std::string,
std::vector< std::string > > & 
getGroupInfo () const
 
virtual DataArrayIntgetGroupsArr (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
 
int getIteration () const
 
MEDFileJoints * getJoints () const
 
int getMaxAbsFamilyId () const
 
int getMaxFamilyId () const
 
int getMinFamilyId () const
 
std::string getName () const
 
virtual DataArrayIntgetNodeFamiliesArr (const std::vector< std::string > &fams, bool renum=false) const
 
virtual DataArrayIntgetNodeFamilyArr (const std::string &fam, bool renum=false) const
 
virtual DataArrayIntgetNodeGroupArr (const std::string &grp, bool renum=false) const
 
virtual DataArrayIntgetNodeGroupsArr (const std::vector< std::string > &grps, bool renum=false) const
 
int getNumberOfJoints () const
 
DataArrayIntgetOrCreateAndGetFamilyFieldAtLevel (int meshDimRelToMaxExt)
 
int getOrder () const
 
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
 
void initializeEquivalences ()
 
virtual bool keepFamIdsOnlyOnLevs (const std::vector< int > &famIds, const std::vector< int > &levs)
 
void killEquivalences ()
 
virtual void killStructureElements ()
 
void normalizeFamIdsMEDFile ()
 
void normalizeFamIdsTrio ()
 
void rearrangeFamilies ()
 
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)
 
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)
 
void setOrder (int order)
 
void setTime (int dt, int it, double time)
 
void setTimeUnit (const std::string &unit)
 
void setTimeValue (double time)
 
void setUnivNameWrStatus (bool newStatus)
 
void writeLL (med_idt fid) const
 

Static Public Member Functions

static MEDFileCMeshNew ()
 
static MEDFileCMeshNew (const std::string &fileName, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileCMeshNew (med_idt fid, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileCMeshNew (DataArrayByte *db)
 
static MEDFileCMeshNew (const std::string &fileName, const std::string &mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileCMeshNew (med_idt fid, const std::string &mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0)
 

Friends

class MEDFileMesh
 

Additional Inherited Members

- Static Public Attributes inherited from MEDCoupling::MEDFileMesh
static const char DFT_FAM_NAME [] ="FAMILLE_ZERO"
 
- Protected Member Functions inherited from MEDCoupling::MEDFileStructuredMesh
void buildImplicitPart () const
 
void buildMinusOneImplicitPartIfNeeded () const
 
void changeFamilyIdArr (int oldId, int newId)
 
void deepCpyAttributes ()
 
std::list< MCAuto< DataArrayInt > > getAllNonNullFamilyIds () const
 
void loadStrMeshFromFile (MEDFileStrMeshL2 *strm, med_idt fid, const std::string &mName, int dt, int it, MEDFileMeshReadSelector *mrs)
 
void writeStructuredLL (med_idt fid, const std::string &maa) const
 
 ~MEDFileStructuredMesh ()
 
- Static Protected Member Functions inherited from MEDCoupling::MEDFileStructuredMesh
static med_geometry_type GetGeoTypeFromMeshDim (int meshDim)
 
- Protected Attributes inherited from MEDCoupling::MEDFileMesh
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
 

Member Function Documentation

MEDFileCMesh * MEDFileCMesh::New ( )
static

Returns an empty instance of MEDFileCMesh.

Returns
MEDFileCMesh * - a new instance of MEDFileCMesh. The caller is to delete this mesh using decrRef() as it is no more needed.

Referenced by MEDCoupling::MEDFileMesh::New(), New(), and MEDCoupling::WriteMesh().

MEDFileCMesh * MEDFileCMesh::New ( const std::string &  fileName,
MEDFileMeshReadSelector *  mrs = 0 
)
static

Returns a new MEDFileCMesh holding the mesh data that has been read from a given MED file. The first mesh in the file is loaded.

Parameters
[in]fileName- the name of MED file to read.
Returns
MEDFileCMesh * - a new instance of MEDFileCMesh. The caller is to delete this mesh using decrRef() as it is no more needed.
Exceptions
Ifthe file is not readable.
Ifthere is no meshes in the file.
Ifthe mesh in the file is not a Cartesian one.

References New().

MEDFileCMesh * MEDFileCMesh::New ( med_idt  fid,
MEDFileMeshReadSelector *  mrs = 0 
)
static
static MEDFileCMesh* MEDCoupling::MEDFileCMesh::New ( DataArrayByte db)
static
MEDFileCMesh * MEDFileCMesh::New ( const std::string &  fileName,
const std::string &  mName,
int  dt = -1,
int  it = -1,
MEDFileMeshReadSelector *  mrs = 0 
)
static

Returns a new MEDFileCMesh 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.

Parameters
[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.
Returns
MEDFileCMesh * - a new instance of MEDFileCMesh. The caller is to delete this mesh using decrRef() as it is no more needed.
Exceptions
Ifthe file is not readable.
Ifthere is no mesh with given attributes in the file.
Ifthe mesh in the file is not a Cartesian one.

References New().

MEDFileCMesh * MEDFileCMesh::New ( med_idt  fid,
const std::string &  mName,
int  dt = -1,
int  it = -1,
MEDFileMeshReadSelector *  mrs = 0 
)
static
std::size_t MEDFileCMesh::getHeapMemorySizeWithoutChildren ( ) const
virtual
std::vector< const BigMemoryObject * > MEDFileCMesh::getDirectChildrenWithNull ( ) const
virtual
MEDFileMesh * MEDFileCMesh::createNewEmpty ( ) const
virtual
MEDFileCMesh * MEDFileCMesh::shallowCpy ( ) const
virtual
bool MEDFileCMesh::isEqual ( const MEDFileMesh other,
double  eps,
std::string &  what 
) const
virtual

Checks if this and another mesh are equal.

Parameters
[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.
Returns
bool - true if the meshes are equal, false, else.

Reimplemented from MEDCoupling::MEDFileStructuredMesh.

References clearNonDiscrAttributes(), MEDCoupling::MEDCouplingMesh::isEqual(), and MEDCoupling::MEDFileStructuredMesh::isEqual().

int MEDFileCMesh::getMeshDimension ( ) const
virtual

Returns the dimension on cells in this mesh.

Returns
int - the mesh dimension.
Exceptions
Ifthere are no cells in this mesh.

Implements MEDCoupling::MEDFileMesh.

int MEDFileCMesh::getSpaceDimension ( ) const

Returns the dimension on nodes in this mesh.

Returns
int - the space dimension.
Exceptions
Ifthere are no cells in this mesh.
std::string MEDFileCMesh::simpleRepr ( ) const
virtual

Returns a string describing this mesh.

Returns
std::string - the mesh information string.

Reimplemented from MEDCoupling::MEDFileMesh.

References MEDCoupling::MEDFileMesh::simpleRepr().

Referenced by advancedRepr().

std::string MEDFileCMesh::advancedRepr ( ) const
virtual

Returns a full textual description of this mesh.

Returns
std::string - the string holding the mesh description.

Implements MEDCoupling::MEDFileMesh.

References simpleRepr().

void MEDFileCMesh::clearNonDiscrAttributes ( ) const
virtual

Clears redundant attributes of incorporated data arrays.

Reimplemented from MEDCoupling::MEDFileStructuredMesh.

References MEDCoupling::MEDFileStructuredMesh::clearNonDiscrAttributes().

Referenced by isEqual().

const MEDCouplingCMesh * MEDFileCMesh::getMesh ( ) const

Returns a const pointer to MEDCouplingCMesh held by this mesh.

Returns
const MEDCouplingCMesh * - a pointer to the held MEDCouplingCMesh.

Referenced by cartesianize(), and MEDCoupling::ReadMeshFromFile().

void MEDFileCMesh::setMesh ( MEDCouplingCMesh m)

Sets the MEDCouplingCMesh holding the data of this mesh.

Parameters
[in]m- the new MEDCouplingCMesh to refer to.
Exceptions
Ifthe name or the description of this mesh and m are not empty and are different.

References MEDCoupling::MEDFileMesh::dealWithTinyInfo(), and MEDCoupling::RefCountObjectOnly::incrRef().

Referenced by MEDCoupling::WriteMesh().

Friends And Related Function Documentation

friend class MEDFileMesh
friend