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

Public Member Functions

void addGroup (int meshDimRelToMaxExt, const DataArrayInt *ids)
 
void addNodeGroup (const DataArrayInt *ids)
 
std::string advancedRepr () const
 
MEDFileUMeshbuildExtrudedMesh (const MEDCouplingUMesh *m1D, int policy) const
 
int buildImplicitPartIfAny (INTERP_KERNEL::NormalizedCellType gt) const
 
void buildInnerBoundaryAlongM1Group (const std::string &grpNameM1, DataArrayInt *&nodesDuplicated, DataArrayInt *&cellsModified, DataArrayInt *&cellsNotModified)
 
MEDFileMeshcartesianize () const
 
void checkConsistency () const
 
void checkSMESHConsistency () const
 
void clearNodeAndCellNumbers ()
 
void clearNonDiscrAttributes () const
 
MEDCouplingMappedExtrudedMeshconvertToExtrudedMesh () const
 
MEDFileMeshcreateNewEmpty () const
 
DataArrayIntdeduceNodeSubPartFromCellSubPart (const std::map< int, MCAuto< DataArrayInt > > &extractDef) const
 
MEDFileUMeshdeepCopy () const
 
void eraseGroupsAtLevel (int meshDimRelToMaxExt)
 
DataArrayIntextractFamilyFieldOnGeoType (INTERP_KERNEL::NormalizedCellType gt) const
 
DataArrayIntextractNumberFieldOnGeoType (INTERP_KERNEL::NormalizedCellType gt) const
 
MEDFileUMeshextractPart (const std::map< int, MCAuto< DataArrayInt > > &extractDef) const
 
void forceComputationOfParts () const
 
const std::vector< MCAuto
< MEDFileEltStruct4Mesh > > & 
getAccessOfUndergroundEltStrs () const
 
std::vector< std::pair< int,
int > > 
getAllDistributionOfTypes () const
 
DataArrayDoublegetCoords () const
 
std::vector< const
BigMemoryObject * > 
getDirectChildrenWithNull () const
 
MEDCoupling1GTUMeshgetDirectUndergroundSingleGeoTypeMesh (INTERP_KERNEL::NormalizedCellType gt) const
 
std::vector
< MEDCoupling1GTUMesh * > 
getDirectUndergroundSingleGeoTypeMeshes (int meshDimRelToMax) const
 
std::vector< int > getDistributionOfTypes (int meshDimRelToMax) const
 
std::vector< int > getFamArrNonEmptyLevelsExt () const
 
MEDCouplingUMeshgetFamilies (int meshDimRelToMaxExt, const std::vector< std::string > &fams, bool renum=false) const
 
DataArrayIntgetFamiliesArr (int meshDimRelToMaxExt, const std::vector< std::string > &fams, bool renum=false) const
 
MEDCouplingUMeshgetFamily (int meshDimRelToMaxExt, const std::string &fam, 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
 
MEDCouplingUMeshgetGroup (int meshDimRelToMaxExt, const std::string &grp, bool renum=false) const
 
MEDCouplingUMeshgetGroups (int meshDimRelToMaxExt, const std::vector< std::string > &grps, bool renum=false) const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
MEDCouplingUMeshgetLevel0Mesh (bool renum=false) const
 
MEDCouplingUMeshgetLevelM1Mesh (bool renum=false) const
 
MEDCouplingUMeshgetLevelM2Mesh (bool renum=false) const
 
MEDCouplingUMeshgetLevelM3Mesh (bool renum=false) const
 
int getMaxAbsFamilyIdInArrays () const
 
int getMaxFamilyIdInArrays () const
 
MEDCouplingUMeshgetMeshAtLevel (int meshDimRelToMax, bool renum=false) const
 
int getMeshDimension () 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 PartDefinition * getPartDefAtLevel (int meshDimRelToMaxExt, INTERP_KERNEL::NormalizedCellType gt=INTERP_KERNEL::NORM_ERROR) const
 
int getRelativeLevOnGeoType (INTERP_KERNEL::NormalizedCellType gt) const
 
const DataArrayIntgetRevNumberFieldAtLevel (int meshDimRelToMaxExt) const
 
int getSizeAtLevel (int meshDimRelToMaxExt) const
 
int getSpaceDimension () const
 
bool hasImplicitPart () const
 
bool isEqual (const MEDFileMesh *other, double eps, std::string &what) const
 
void killStructureElements ()
 
MEDFileUMeshlinearToQuadratic (int conversionType=0, double eps=1e-12) const
 
void optimizeFamilies ()
 
bool presenceOfStructureElements () const
 
MEDFileUMeshquadraticToLinear (double eps=1e-12) const
 
void releaseImplicitPartIfAny () const
 
void removeMeshAtLevel (int meshDimRelToMax)
 
void serialize (std::vector< double > &tinyDouble, std::vector< int > &tinyInt, std::vector< std::string > &tinyStr, std::vector< MCAuto< DataArrayInt > > &bigArraysI, MCAuto< DataArrayDouble > &bigArrayD)
 
void setCoords (DataArrayDouble *coords)
 
void setCoordsForced (DataArrayDouble *coords)
 
void setFamilyFieldArr (int meshDimRelToMaxExt, DataArrayInt *famArr)
 
void setFamilyNameAttachedOnId (int id, const std::string &newFamName)
 
void setGroupsFromScratch (int meshDimRelToMax, const std::vector< const MEDCouplingUMesh * > &ms, bool renum=false)
 
void setGroupsOnSetMesh (int meshDimRelToMax, const std::vector< const MEDCouplingUMesh * > &ms, bool renum=false)
 
void setMeshAtLevel (int meshDimRelToMax, MEDCoupling1GTUMesh *m)
 
void setMeshAtLevel (int meshDimRelToMax, MEDCouplingUMesh *m, bool newOrOld=false)
 
void setMeshes (const std::vector< const MEDCouplingUMesh * > &ms, bool renum=false)
 
void setName (const std::string &name)
 
void setNameFieldAtLevel (int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr)
 
void setRenumFieldArr (int meshDimRelToMaxExt, DataArrayInt *renumArr)
 
MEDFileUMeshshallowCpy () const
 
std::string simpleRepr () const
 
MCAuto< MEDFileUMeshsymmetry3DPlane (const double point[3], const double normalVector[3]) const
 
bool unPolyze (std::vector< int > &oldCode, std::vector< int > &newCode, DataArrayInt *&o2nRenumCell)
 
void unserialize (std::vector< double > &tinyDouble, std::vector< int > &tinyInt, std::vector< std::string > &tinyStr, std::vector< MCAuto< DataArrayInt > > &bigArraysI, MCAuto< DataArrayDouble > &bigArrayD)
 
void whichAreNodesFetched (const MEDFileField1TSStructItem &st, const MEDFileFieldGlobsReal *globs, std::vector< bool > &nodesFetched) const
 
DataArrayIntzipCoords ()
 
- 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
 
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 ()
 
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)
 
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 MCAuto< MEDFileUMeshAggregate (const std::vector< const MEDFileUMesh * > &meshes)
 
static const char * GetSpeStr4ExtMesh ()
 
static MEDFileUMeshLoadPartOf (const std::string &fileName, const std::string &mName, const std::vector< INTERP_KERNEL::NormalizedCellType > &types, const std::vector< int > &slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileUMeshLoadPartOf (med_idt fid, const std::string &mName, const std::vector< INTERP_KERNEL::NormalizedCellType > &types, const std::vector< int > &slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileUMeshNew (const std::string &fileName, const std::string &mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileUMeshNew (med_idt fid, const std::string &mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileUMeshNew (const std::string &fileName, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileUMeshNew (med_idt fid, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileUMeshNew (DataArrayByte *db)
 
static MEDFileUMeshNew (const MEDCouplingMappedExtrudedMesh *mem)
 
static MEDFileUMeshNew ()
 
- Static Public Member Functions inherited from MEDCoupling::MEDFileMesh
static TypeOfField ConvertFromMEDFileEntity (med_entity_type etype)
 
static
INTERP_KERNEL::NormalizedCellType 
ConvertFromMEDFileGeoType (med_geometry_type geoType)
 
static std::string GetMagicFamilyStr ()
 
static MEDFileMeshNew (const std::string &fileName, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileMeshNew (med_idt fid, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileMeshNew (DataArrayByte *db)
 
static MEDFileMeshNew (const std::string &fileName, const std::string &mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0, MEDFileJoints *joints=0)
 
static MEDFileMeshNew (med_idt fid, const std::string &mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0, MEDFileJoints *joints=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::MEDFileMesh
void addFamilyOnAllGroupsHaving (const std::string &famName, const std::string &otherFamName)
 
void addGroupUnderground (bool isNodeGroup, const DataArrayInt *ids, DataArrayInt *famArr)
 
virtual void appendFamilyEntries (const DataArrayInt *famIds, const std::vector< std::vector< int > > &fidsOfGrps, const std::vector< std::string > &grpNames)
 
bool areEquivalencesEqual (const MEDFileMesh *other, std::string &what) const
 
void checkCartesian () const
 
void dealWithTinyInfo (const MEDCouplingMesh *m)
 
void deepCpyEquivalences (const MEDFileMesh &other)
 
void getEquivalencesRepr (std::ostream &oss) const
 
void getFamilyRepr (std::ostream &oss) const
 
void loadEquivalences (med_idt fid)
 
void loadJointsFromFile (med_idt fid, MEDFileJoints *toUseInstedOfReading=0)
 
void loadLLWithAdditionalItems (med_idt fid, const std::string &mName, int dt, int it, MEDFileMeshReadSelector *mrs)
 
 MEDFileMesh ()
 
void setUnivName (const std::string &name)
 
void writeJoints (med_idt fid) const
 
- Static Protected Member Functions inherited from MEDCoupling::MEDFileMesh
static void ChangeAllGroupsContainingFamily (std::map< std::string, std::vector< std::string > > &groups, const std::string &familyNameToChange, const std::vector< std::string > &newFamiliesNames)
 
static std::string CreateNameNotIn (const std::string &nameTry, const std::vector< std::string > &namesToAvoid)
 
static std::string FindOrCreateAndGiveFamilyWithId (std::map< std::string, int > &families, int id, bool &created)
 
static int PutInThirdComponentOfCodeOffset (std::vector< int > &code, int strt)
 
static void TranslateFamilyIds (int offset, DataArrayInt *famArr, std::vector< std::vector< int > > &famIdsPerGrp)
 
- 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

MEDFileUMesh * MEDFileUMesh::New ( const std::string &  fileName,
const std::string &  mName,
int  dt = -1,
int  it = -1,
MEDFileMeshReadSelector *  mrs = 0 
)
static

Returns a new MEDFileUMesh 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
MEDFileUMesh * - a new instance of MEDFileUMesh. 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 an unstructured one.

References New().

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

Returns a new MEDFileUMesh 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
MEDFileUMesh * - a new instance of MEDFileUMesh. 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 an unstructured one.

References New().

MEDFileUMesh * MEDFileUMesh::New ( med_idt  fid,
MEDFileMeshReadSelector *  mrs = 0 
)
static
static MEDFileUMesh* MEDCoupling::MEDFileUMesh::New ( DataArrayByte db)
static
MEDFileUMesh * MEDFileUMesh::New ( )
static
MEDFileUMesh * MEDFileUMesh::LoadPartOf ( const std::string &  fileName,
const std::string &  mName,
const std::vector< INTERP_KERNEL::NormalizedCellType > &  types,
const std::vector< int > &  slicPerTyp,
int  dt = -1,
int  it = -1,
MEDFileMeshReadSelector *  mrs = 0 
)
static

This method loads from file with name fileName the mesh called mName as New does. The difference is that here only a part of cells contained in the file will be loaded. The selection of cell is specified using the two consecutive parameters types and slicPerTyp. This method allows to load from a mesh (typically huge) in a MED file a part of cells of that mesh. The part of cells is specified using triplet (start,stop,step) for each geometric type. Only nodes lying on selected cells will be loaded to reduce at most the memory consumtion.

Parameters
[in]fileName- the name of the file.
[in]mName- the name of the mesh to be read.
[in]types- the list of the geo types of which some part will be taken. A geometric type in types must appear only once at most.
[in]slicPerType- an array of size 3 times larger than types that specifies for each type in types (in the same order) resp the start, the stop and the step.
[in]dt- the iteration, that is to say the first element of the pair that locates the asked time step.
[in]it- the order, that is to say the second element of the pair that locates the asked time step.
[in]mrs- the request for what to be loaded.
Returns
MEDFileUMesh * - a new instance of MEDFileUMesh. The caller is to delete this mesh using decrRef() as it is no more needed.

References MEDCoupling::CheckFileForRead().

MEDFileUMesh * MEDFileUMesh::LoadPartOf ( med_idt  fid,
const std::string &  mName,
const std::vector< INTERP_KERNEL::NormalizedCellType > &  types,
const std::vector< int > &  slicPerTyp,
int  dt = -1,
int  it = -1,
MEDFileMeshReadSelector *  mrs = 0 
)
static

Please refer to the other MEDFileUMesh::LoadPartOf method that has the same semantic and the same parameter (excepted the first). This method is NOT wrapped into python.

References New(), and MEDCoupling::MCAuto< T >::retn().

static const char* MEDCoupling::MEDFileUMesh::GetSpeStr4ExtMesh ( )
static

Referenced by convertToExtrudedMesh(), and New().

std::size_t MEDFileUMesh::getHeapMemorySizeWithoutChildren ( ) const
virtual
std::vector< const BigMemoryObject * > MEDFileUMesh::getDirectChildrenWithNull ( ) const
virtual
MEDFileMesh * MEDFileUMesh::createNewEmpty ( ) const
virtual
MEDFileUMesh * MEDFileUMesh::deepCopy ( ) const
virtual
MEDFileUMesh * MEDFileUMesh::shallowCpy ( ) const
virtual
bool MEDFileUMesh::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::MEDFileMesh.

References clearNonDiscrAttributes(), MEDCoupling::MEDFileMesh::isEqual(), MEDCoupling::DataArrayDouble::isEqual(), MEDCoupling::DataArrayInt::isEqual(), and MEDCoupling::DataArrayChar::isEqual().

void MEDFileUMesh::checkConsistency ( ) const

Check that the current object MEDFileUMesh is consistent. This does not check the optional renumbering of nodes and cells. This last item is important for SMESH, see checkSMESHConsistency().

Exceptions
ifany internal part (i.e. mesh sub-levels and single geometric-type meshes) are inconsistent
ifinternal family array is inconsistent
See Also
checkSMESHConsistency()

Referenced by checkSMESHConsistency().

void MEDFileUMesh::checkSMESHConsistency ( ) const

Same as checkConsistency() but also checks that optional entities (edges, faces, volumes) numbers are consistent, i.e. the numbering is either set to null for all sub-levels (thus letting SMESH numbers the entities as it likes), or non overlapping between all sub-levels.

Exceptions
ifthe condition above is not respected

References MEDCoupling::DataArrayInt::BuildIntersection(), checkConsistency(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

void MEDFileUMesh::clearNodeAndCellNumbers ( )

Reset optional node and cell numbering for all sub levels in this. This particularly useful to make sure SMESH will handle the mesh correctly, as it tries to use those numbers if given.

void MEDFileUMesh::clearNonDiscrAttributes ( ) const
virtual

Clears redundant attributes of incorporated data arrays.

Reimplemented from MEDCoupling::MEDFileMesh.

References MEDCoupling::MEDFileMesh::clearNonDiscrAttributes().

Referenced by isEqual(), and serialize().

void MEDFileUMesh::setName ( const std::string &  name)
virtual
const std::vector< MCAuto<MEDFileEltStruct4Mesh> >& MEDCoupling::MEDFileUMesh::getAccessOfUndergroundEltStrs ( ) const
int MEDFileUMesh::getMaxAbsFamilyIdInArrays ( ) const
virtual
int MEDFileUMesh::getMaxFamilyIdInArrays ( ) const
virtual
int MEDFileUMesh::getMinFamilyIdInArrays ( ) const
virtual
int MEDFileUMesh::getMeshDimension ( ) const
virtual
int MEDFileUMesh::getSpaceDimension ( ) const

Returns the space dimension of this mesh that is equal to number of components in the node coordinates array.

Returns
int - the space dimension of this mesh.
Exceptions
Ifthe node coordinates array is not available.

References MEDCoupling::DataArray::getNumberOfComponents().

Referenced by Aggregate(), and serialize().

std::string MEDFileUMesh::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().

int MEDFileUMesh::getSizeAtLevel ( int  meshDimRelToMaxExt) const
virtual

Returns number of mesh entities of a given relative dimension in this mesh.

Parameters
[in]meshDimRelToMaxExt- the relative dimension of interest.
Returns
int - the number of entities.
Exceptions
Ifno mesh entities of dimension meshDimRelToMaxExt are available in this mesh.

Implements MEDCoupling::MEDFileMesh.

const DataArrayInt * MEDFileUMesh::getFamilyFieldAtLevel ( int  meshDimRelToMaxExt) const
virtual

Returns the family field for mesh entities of a given dimension.

Parameters
[in]meshDimRelToMaxExt- the relative dimension of mesh entities.
Returns
const DataArrayInt * - the family field. It is an array of ids of families each mesh entity belongs to. It can be NULL.

Implements MEDCoupling::MEDFileMesh.

Referenced by buildInnerBoundaryAlongM1Group(), extractPart(), linearToQuadratic(), optimizeFamilies(), quadraticToLinear(), and unPolyze().

DataArrayInt * MEDFileUMesh::getFamilyFieldAtLevel ( int  meshDimRelToMaxExt)
virtual
const DataArrayInt * MEDFileUMesh::getNumberFieldAtLevel ( int  meshDimRelToMaxExt) const
virtual

Returns the optional numbers of mesh entities of a given dimension.

Parameters
[in]meshDimRelToMaxExt- the relative dimension of mesh entities.
Returns
const DataArrayInt * - the array of the entity numbers.
Exceptions
Ifthere are no mesh entities of meshDimRelToMaxExt dimension in this mesh.

Implements MEDCoupling::MEDFileMesh.

Referenced by extractPart(), MEDCoupling::ReadFieldCell(), MEDCoupling::ReadFieldGauss(), MEDCoupling::ReadFieldGaussNE(), MEDCoupling::ReadFieldsOnSameMesh(), and unPolyze().

const DataArrayInt * MEDFileUMesh::getRevNumberFieldAtLevel ( int  meshDimRelToMaxExt) const
virtual

Returns the optional numbers of mesh entities of a given dimension transformed using DataArrayInt::invertArrayN2O2O2N().

Parameters
[in]meshDimRelToMaxExt- the relative dimension of mesh entities.
Returns
const DataArrayInt * - the array of the entity numbers transformed using DataArrayInt::invertArrayN2O2O2N().
Exceptions
Ifthere are no mesh entities of meshDimRelToMaxExt dimension in this mesh.

Implements MEDCoupling::MEDFileMesh.

const DataArrayAsciiChar * MEDFileUMesh::getNameFieldAtLevel ( int  meshDimRelToMaxExt) const
virtual
const PartDefinition * MEDFileUMesh::getPartDefAtLevel ( int  meshDimRelToMaxExt,
INTERP_KERNEL::NormalizedCellType  gt = INTERP_KERNEL::NORM_ERROR 
) const

This method returns for a specified relative level meshDimRelToMaxExt the part effectively read (if the instance is the result of the read of a file).

Parameters
[in]meshDimRelToMaxExt- the extended relative level for which the part definition is requested.
[in]gt- The input geometric type for which the part definition is requested.
Returns
the part definition owned by this. So no need to deallocate the returned instance.
int MEDFileUMesh::getNumberOfCellsAtLevel ( int  meshDimRelToMaxExt) const
virtual

Implements MEDCoupling::MEDFileMesh.

Referenced by buildExtrudedMesh().

bool MEDFileUMesh::hasImplicitPart ( ) const
virtual
int MEDFileUMesh::buildImplicitPartIfAny ( INTERP_KERNEL::NormalizedCellType  gt) const
virtual
void MEDFileUMesh::releaseImplicitPartIfAny ( ) const
virtual
std::vector< INTERP_KERNEL::NormalizedCellType > MEDFileUMesh::getGeoTypesAtLevel ( int  meshDimRelToMax) const
virtual

Given a relative level meshDimRelToMax it returns the sorted vector of geometric types present in this.

Exceptions
ifthe reqsuested meshDimRelToMax does not exist.

Implements MEDCoupling::MEDFileMesh.

Referenced by getAllDistributionOfTypes().

int MEDFileUMesh::getNumberOfCellsWithType ( INTERP_KERNEL::NormalizedCellType  ct) const
virtual
bool MEDFileUMesh::presenceOfStructureElements ( ) const
virtual
void MEDFileUMesh::killStructureElements ( )
virtual

Reimplemented from MEDCoupling::MEDFileMesh.

std::vector< int > MEDFileUMesh::getNonEmptyLevels ( ) const
virtual

Returns relative dimensions of mesh entities (excluding nodes) present in this mesh.

Returns
std::vector<int> - a sequence of the relative dimensions.

Implements MEDCoupling::MEDFileMesh.

Referenced by Aggregate(), buildExtrudedMesh(), buildInnerBoundaryAlongM1Group(), deduceNodeSubPartFromCellSubPart(), extractPart(), getAllDistributionOfTypes(), getFamsNonEmptyLevels(), getNonEmptyLevelsExt(), linearToQuadratic(), quadraticToLinear(), removeMeshAtLevel(), serialize(), unPolyze(), and zipCoords().

std::vector< int > MEDFileUMesh::getNonEmptyLevelsExt ( ) const
virtual

Returns relative dimensions of mesh entities (including nodes) present in this mesh.

Returns
std::vector<int> - a sequence of the relative dimensions.

Implements MEDCoupling::MEDFileMesh.

References getNonEmptyLevels().

Referenced by addGroup(), and optimizeFamilies().

std::vector< int > MEDFileUMesh::getFamArrNonEmptyLevelsExt ( ) const
virtual
std::vector< int > MEDFileUMesh::getNumArrNonEmptyLevelsExt ( ) const
virtual
std::vector< int > MEDFileUMesh::getNameArrNonEmptyLevelsExt ( ) const
virtual
std::vector< int > MEDFileUMesh::getFamsNonEmptyLevels ( const std::vector< std::string > &  fams) const
virtual

Returns all relative mesh levels (excluding nodes) where given families are defined. To include nodes, call getFamsNonEmptyLevelsExt() method.

Parameters
[in]fams- the name of the family of interest.
Returns
std::vector<int> - a sequence of the relative dimensions.

Implements MEDCoupling::MEDFileMesh.

References MEDCoupling::MEDFileMesh::getFamiliesIds(), and getNonEmptyLevels().

Referenced by getFamsNonEmptyLevelsExt().

std::vector< int > MEDFileUMesh::getFamsNonEmptyLevelsExt ( const std::vector< std::string > &  fams) const
virtual

Returns all relative mesh levels (including nodes) where given families are defined.

Parameters
[in]fams- the names of the families of interest.
Returns
std::vector<int> - a sequence of the relative dimensions.

Implements MEDCoupling::MEDFileMesh.

References MEDCoupling::MEDFileMesh::getFamiliesIds(), getFamsNonEmptyLevels(), and MEDCoupling::DataArrayInt::presenceOfValue().

DataArrayDouble * MEDFileUMesh::getCoords ( ) const

Returns a pointer to the node coordinates array of this mesh without incrementing its reference counter, thus there is no need to decrRef() it by the caller.

References MEDCoupling::MEDFileMesh::checkCartesian().

Referenced by buildInnerBoundaryAlongM1Group(), extractPart(), symmetry3DPlane(), and zipCoords().

MEDCouplingUMesh * MEDFileUMesh::getGroup ( int  meshDimRelToMaxExt,
const std::string &  grp,
bool  renum = false 
) const

Returns a new MEDCouplingUMesh corresponding to mesh entities included in a given group of this mesh. Only mesh entities of a given dimension are included in the new mesh.

Parameters
[in]meshDimRelToMaxExt- the relative dimension of mesh entities of interest.
[in]grp- the name of the group whose mesh entities are included in the new mesh.
[in]renum- if true, cells and nodes of the result mesh are permuted according to the optional numbers of entities, if available.
Returns
MEDCouplingUMesh * - a new instance of MEDCouplingUMesh. The caller is to delete this mesh using decrRef() as it is no more needed.
Exceptions
Ifthe name of a nonexistent group is specified.
Ifthere are no mesh entities of meshDimRelToMaxExt dimension in this mesh.

References MEDCoupling::MEDFileMesh::checkCartesian(), and getGroups().

Referenced by buildInnerBoundaryAlongM1Group().

MEDCouplingUMesh * MEDFileUMesh::getGroups ( int  meshDimRelToMaxExt,
const std::vector< std::string > &  grps,
bool  renum = false 
) const

Returns a new MEDCouplingUMesh corresponding to mesh entities included in given groups of this mesh. Only mesh entities of a given dimension are included in the new mesh.

Parameters
[in]meshDimRelToMaxExt- the relative dimension of mesh entities of interest.
[in]grps- a sequence of group names whose mesh entities are included in the new mesh.
[in]renum- if true, cells and nodes of the result mesh are permuted according to the optional numbers of entities, if available.
Returns
MEDCouplingUMesh * - a new instance of MEDCouplingUMesh. The caller is to delete this mesh using decrRef() as it is no more needed.
Exceptions
Ifa name of a nonexistent group is present in grps.
Ifthere are no mesh entities of meshDimRelToMaxExt dimension in this mesh.

References MEDCoupling::MEDFileMesh::checkCartesian(), getFamilies(), MEDCoupling::MEDFileMesh::getFamiliesOnGroups(), MEDCoupling::MCAuto< T >::retn(), and MEDCoupling::MEDCouplingMesh::setName().

Referenced by getGroup(), and MEDCoupling::ReadUMeshFromGroups().

MEDCouplingUMesh * MEDFileUMesh::getFamily ( int  meshDimRelToMaxExt,
const std::string &  fam,
bool  renum = false 
) const

Returns a new MEDCouplingUMesh corresponding to mesh entities included in a given family of this mesh. Only mesh entities of a given dimension are included in the new mesh.

Parameters
[in]meshDimRelToMaxExt- the relative dimension of mesh entities of interest.
[in]fam- the name of the family whose mesh entities are included in the new mesh.
[in]renum- if true, cells and nodes of the result mesh are permuted according to the optional numbers of entities, if available.
Returns
MEDCouplingUMesh * - a new instance of MEDCouplingUMesh. The caller is to delete this mesh using decrRef() as it is no more needed.
Exceptions
Ifa name of a nonexistent family is present in grps.
Ifthere are no mesh entities of meshDimRelToMaxExt dimension in this mesh.

References MEDCoupling::MEDFileMesh::checkCartesian(), and getFamilies().

MEDCouplingUMesh * MEDFileUMesh::getFamilies ( int  meshDimRelToMaxExt,
const std::vector< std::string > &  fams,
bool  renum = false 
) const

Returns a new MEDCouplingUMesh corresponding to mesh entities included in given families of this mesh. Only mesh entities of a given dimension are included in the new mesh.

Parameters
[in]meshDimRelToMaxExt- the relative dimension of mesh entities of interest.
[in]fams- a sequence of family names whose mesh entities are included in the new mesh.
[in]renum- if true, cells and nodes of the result mesh are permuted according to the optional numbers of entities, if available.
Returns
MEDCouplingUMesh * - a new instance of MEDCouplingUMesh. The caller is to delete this mesh using decrRef() as it is no more needed.
Exceptions
Ifa name of a nonexistent family is present in fams.
Ifthere are no mesh entities of meshDimRelToMaxExt dimension in this mesh.

References MEDCoupling::MEDFileMesh::checkCartesian(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), getFamiliesArr(), MEDCoupling::MEDFileMesh::getFamiliesIds(), MEDCoupling::DataArrayTemplate< T >::getNbOfElems(), MEDCoupling::MEDCouplingUMesh::New(), MEDCoupling::MCAuto< T >::retn(), MEDCoupling::MEDCouplingPointSet::setCoords(), and MEDCoupling::MEDCouplingMesh::setName().

Referenced by getFamily(), getGroups(), and MEDCoupling::ReadUMeshFromFamilies().

DataArrayInt * MEDFileUMesh::getFamiliesArr ( int  meshDimRelToMaxExt,
const std::vector< std::string > &  fams,
bool  renum = false 
) const
virtual

Returns ids of mesh entities contained in given families of a given dimension.

Parameters
[in]meshDimRelToMaxExt- a relative dimension of the mesh entities whose ids are required.
[in]fams- the names of the families of interest.
[in]renum- if true, the optional numbers of entities, if available, are returned instead of ids.
Returns
DataArrayInt * - a new instance of DataArrayInt holding either ids or numbers, if available and required, of mesh entities of the families. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthe family field is missing for meshDimRelToMaxExt.

Implements MEDCoupling::MEDFileMesh.

References MEDCoupling::MEDFileMesh::getFamiliesIds(), and MEDCoupling::MCAuto< T >::retn().

Referenced by getFamilies().

MEDCouplingUMesh * MEDFileUMesh::getMeshAtLevel ( int  meshDimRelToMaxExt,
bool  renum = false 
) const
virtual

Returns a MEDCouplingUMesh of a given relative dimension.

Warning
If meshDimRelToMaxExt == 1 (which means nodes), the returned mesh is not valid. This is a feature, because MEDLoader does not create cells that do not exist! To build a valid MEDCouplingUMesh from the returned one in this case, call MEDCouplingUMesh::Build0DMeshFromCoords().
Parameters
[in]meshDimRelToMax- the relative dimension of interest.
[in]renum- if true, the returned mesh is permuted according to the optional numbers of mesh entities.
Returns
MEDCouplingUMesh * - a pointer to MEDCouplingUMesh that the caller is to delete using decrRef() as it is no more needed.
Exceptions
Ifthere are no mesh entities of meshDimRelToMaxExt dimension in this mesh.

Implements MEDCoupling::MEDFileMesh.

References MEDCoupling::MEDFileMesh::checkCartesian(), MEDCoupling::MEDFileMesh::getName(), MEDCoupling::MEDCouplingUMesh::New(), MEDCoupling::MEDCouplingPointSet::setCoords(), and MEDCoupling::MEDCouplingMesh::setName().

Referenced by buildExtrudedMesh(), buildInnerBoundaryAlongM1Group(), convertToExtrudedMesh(), deduceNodeSubPartFromCellSubPart(), extractPart(), getLevel0Mesh(), getLevelM1Mesh(), getLevelM2Mesh(), getLevelM3Mesh(), linearToQuadratic(), quadraticToLinear(), MEDCoupling::ReadFieldsOnSameMesh(), MEDCoupling::ReadMeshFromFile(), MEDCoupling::ReadUMeshFromFile(), setGroupsOnSetMesh(), unPolyze(), and MEDCoupling::WriteField().

std::vector< int > MEDFileUMesh::getDistributionOfTypes ( int  meshDimRelToMax) const
virtual
std::vector< std::pair< int, int > > MEDFileUMesh::getAllDistributionOfTypes ( ) const

This method returns for each geo types in this number of cells with this geo type. This method returns info as a vector of pair. The first element of pair is geo type and the second the number of cells associated. This method also returns the number of nodes of this (key associated is NORM_ERROR)

See Also
getDistributionOfTypes

References getGeoTypesAtLevel(), getNonEmptyLevels(), getNumberOfCellsWithType(), getNumberOfNodes(), and INTERP_KERNEL::NORM_ERROR.

Referenced by MEDCoupling::MEDFileData::Aggregate().

MEDCouplingUMesh * MEDFileUMesh::getLevel0Mesh ( bool  renum = false) const

Returns a MEDCouplingUMesh of a relative dimension == 0.

Parameters
[in]renum- if true, the returned mesh is permuted according to the optional numbers of mesh entities.
Returns
MEDCouplingUMesh * - a pointer to MEDCouplingUMesh that the caller is to delete using decrRef() as it is no more needed.
Exceptions
Ifthere are no mesh entities of the relative dimension == 0 in this mesh.

References getMeshAtLevel().

MEDCouplingUMesh * MEDFileUMesh::getLevelM1Mesh ( bool  renum = false) const

Returns a MEDCouplingUMesh of a relative dimension == -1.

Parameters
[in]renum- if true, the returned mesh is permuted according to the optional numbers of mesh entities.
Returns
MEDCouplingUMesh * - a pointer to MEDCouplingUMesh that the caller is to delete using decrRef() as it is no more needed.
Exceptions
Ifthere are no mesh entities of the relative dimension == -1 in this mesh.

References getMeshAtLevel().

MEDCouplingUMesh * MEDFileUMesh::getLevelM2Mesh ( bool  renum = false) const

Returns a MEDCouplingUMesh of a relative dimension == -2.

Parameters
[in]renum- if true, the returned mesh is permuted according to the optional numbers of mesh entities.
Returns
MEDCouplingUMesh * - a pointer to MEDCouplingUMesh that the caller is to delete using decrRef() as it is no more needed.
Exceptions
Ifthere are no mesh entities of the relative dimension == -2 in this mesh.

References getMeshAtLevel().

MEDCouplingUMesh * MEDFileUMesh::getLevelM3Mesh ( bool  renum = false) const

Returns a MEDCouplingUMesh of a relative dimension == -3.

Parameters
[in]renum- if true, the returned mesh is permuted according to the optional numbers of mesh entities.
Returns
MEDCouplingUMesh * - a pointer to MEDCouplingUMesh that the caller is to delete using decrRef() as it is no more needed.
Exceptions
Ifthere are no mesh entities of the relative dimension == -3 in this mesh.

References getMeshAtLevel().

void MEDFileUMesh::forceComputationOfParts ( ) const

This method is for advanced users. There is two storing strategy of mesh in this. Either MEDCouplingUMesh, or vector of MEDCoupling1GTUMesh instances. When assignement is done the first one is done, which is not optimal in write mode for MED file. This method allows to switch from MEDCouplingUMesh mode to MEDCoupling1GTUMesh mode.

Referenced by serialize().

std::vector< MEDCoupling1GTUMesh * > MEDFileUMesh::getDirectUndergroundSingleGeoTypeMeshes ( int  meshDimRelToMax) const

This method returns a vector of mesh parts containing each exactly one geometric type. This method will never launch an automatic computation of split by type (an INTERP_KERNEL::Exception will be then thrown). This method is only for memory aware users. The returned pointers are NOT new object pointer. No need to mange them.

References MEDCoupling::MEDFileMesh::checkCartesian().

MEDCoupling1GTUMesh * MEDFileUMesh::getDirectUndergroundSingleGeoTypeMesh ( INTERP_KERNEL::NormalizedCellType  gt) const

This method returns the part of this having the geometric type gt. If such part is not existing an exception will be thrown. The returned pointer is NOT new object pointer. No need to mange it.

References MEDCoupling::MEDFileMesh::checkCartesian(), and getMeshDimension().

Referenced by whichAreNodesFetched().

DataArrayInt * MEDFileUMesh::extractFamilyFieldOnGeoType ( INTERP_KERNEL::NormalizedCellType  gt) const

This method extracts from whole family field ids the part relative to the input parameter gt.

Parameters
[in]gt- the geometric type for which the family field is asked.
Returns
DataArrayInt * - a pointer to DataArrayInt that the caller is to delete using decrRef() as it is no more needed.
See Also
MEDFileUMesh::extractNumberFieldOnGeoType

References getMeshDimension().

DataArrayInt * MEDFileUMesh::extractNumberFieldOnGeoType ( INTERP_KERNEL::NormalizedCellType  gt) const

This method extracts from whole number field ids the part relative to the input parameter gt.

Parameters
[in]gt- the geometric type for which the number field is asked.
Returns
DataArrayInt * - a pointer to DataArrayInt that the caller is to delete using decrRef() as it is no more needed.
See Also
MEDFileUMesh::extractFamilyFieldOnGeoType

References getMeshDimension().

int MEDFileUMesh::getRelativeLevOnGeoType ( INTERP_KERNEL::NormalizedCellType  gt) const

This method returns for specified geometric type gt the relative level to this. If the relative level is empty an exception will be thrown.

References getMeshDimension().

void MEDFileUMesh::setFamilyNameAttachedOnId ( int  id,
const std::string &  newFamName 
)

Changes a name of a family specified by its id.

Parameters
[in]id- the id of the family of interest.
[in]newFamName- the new family name.
Exceptions
Ifno family with the given id exists.

References MEDCoupling::MEDFileMesh::_families, and MEDCoupling::MEDFileMesh::getFamilyNameGivenId().

void MEDFileUMesh::setCoords ( DataArrayDouble coords)

Sets the node coordinates array of this mesh.

Parameters
[in]coords- the new node coordinates array.
Exceptions
Ifcoords == NULL.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::RefCountObjectOnly::incrRef(), and MEDCoupling::DataArrayInt::New().

Referenced by Aggregate(), and extractPart().

void MEDFileUMesh::setCoordsForced ( DataArrayDouble coords)

Change coords without changing anything concerning families and numbering on nodes.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::RefCountObjectOnly::incrRef().

Referenced by symmetry3DPlane().

void MEDFileUMesh::eraseGroupsAtLevel ( int  meshDimRelToMaxExt)

Removes all groups of a given dimension in this mesh.

Parameters
[in]meshDimRelToMaxExt- the relative dimension of interest.
Exceptions
Ifthere are no mesh entities of meshDimRelToMaxExt dimension in this mesh.

References optimizeFamilies().

void MEDFileUMesh::setFamilyFieldArr ( int  meshDimRelToMaxExt,
DataArrayInt famArr 
)
virtual

Sets the family field of a given relative dimension.

Parameters
[in]meshDimRelToMaxExt- the relative dimension of entities for which the family field is set.
[in]famArr- the array of the family field.
Exceptions
Ifthere are no mesh entities of meshDimRelToMaxExt dimension in this mesh.
IffamArr has an invalid size.

Implements MEDCoupling::MEDFileMesh.

References MEDCoupling::DataArray::checkNbOfTuplesAndComp(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::RefCountObjectOnly::incrRef().

Referenced by Aggregate(), buildInnerBoundaryAlongM1Group(), extractPart(), linearToQuadratic(), quadraticToLinear(), and unPolyze().

void MEDFileUMesh::setRenumFieldArr ( int  meshDimRelToMaxExt,
DataArrayInt renumArr 
)
virtual

Sets the optional numbers of mesh entities of a given dimension.

Parameters
[in]meshDimRelToMaxExt- the relative dimension of mesh entities.
[in]renumArr- the array of the numbers.
Exceptions
Ifthere are no mesh entities of meshDimRelToMaxExt dimension in this mesh.
IfrenumArr has an invalid size.

Implements MEDCoupling::MEDFileMesh.

References MEDCoupling::DataArray::checkNbOfTuplesAndComp(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::RefCountObjectOnly::incrRef().

Referenced by Aggregate(), and unPolyze().

void MEDFileUMesh::setNameFieldAtLevel ( int  meshDimRelToMaxExt,
DataArrayAsciiChar nameArr 
)
virtual

Sets the optional names of mesh entities of a given dimension.

Parameters
[in]meshDimRelToMaxExt- the relative dimension of mesh entities.
[in]nameArr- the array of the names.
Exceptions
Ifthere are no mesh entities of meshDimRelToMaxExt dimension in this mesh.
IfnameArr has an invalid size.

Implements MEDCoupling::MEDFileMesh.

References MEDCoupling::DataArray::checkNbOfTuplesAndComp(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::RefCountObjectOnly::incrRef().

void MEDFileUMesh::addNodeGroup ( const DataArrayInt ids)
virtual

Adds a group of nodes to this mesh.

Parameters
[in]ids- a DataArrayInt providing ids and a name of the group to add. The ids should be sorted and different each other (MED file norm).
Warning
this method can alter default "FAMILLE_ZERO" family. For users sensitive to this a call to MEDFileMesh::rearrangeFamilies will be necessary after addGroup session.
Exceptions
Ifthe node coordinates array is not set.
Ifids == NULL.
Ifids->getName() == "".
Ifids does not respect the MED file norm.
Ifa group with name ids->getName() already exists.

Implements MEDCoupling::MEDFileMesh.

References MEDCoupling::MEDFileMesh::addGroupUnderground(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::DataArrayInt::New().

Referenced by addGroup().

void MEDFileUMesh::addGroup ( int  meshDimRelToMaxExt,
const DataArrayInt ids 
)
virtual

Adds a group of nodes/cells/faces/edges to this mesh.

Parameters
[in]ids- a DataArrayInt providing ids and a name of the group to add. The ids should be sorted and different each other (MED file norm).
Warning
this method can alter default "FAMILLE_ZERO" family. For users sensitive to this a call to MEDFileMesh::rearrangeFamilies will be necessary after addGroup session.
Exceptions
Ifthe node coordinates array is not set.
Ifids == NULL.
Ifids->getName() == "".
Ifids does not respect the MED file norm.
Ifa group with name ids->getName() already exists.

Implements MEDCoupling::MEDFileMesh.

References MEDCoupling::MEDFileMesh::addGroupUnderground(), addNodeGroup(), and getNonEmptyLevelsExt().

void MEDFileUMesh::removeMeshAtLevel ( int  meshDimRelToMax)

Removes a mesh of a given dimension.

Parameters
[in]meshDimRelToMax- the relative dimension of interest.
Exceptions
Ifthere is no mesh at level meshDimRelToMax in this mesh.

References getNonEmptyLevels().

void MEDFileUMesh::setMeshAtLevel ( int  meshDimRelToMax,
MEDCoupling1GTUMesh m 
)

Sets a new MEDCoupling1GTUMesh at a given level in this mesh.

Parameters
[in]meshDimRelToMax- a relative level to set the mesh at.
[in]m- the new mesh to set.
Exceptions
Ifthe name or the description of this mesh and m are not empty and are different.
Ifthe node coordinates array is set this in mesh and m refers to another node coordinates array.
Ifthe mesh dimension of m does not correspond to meshDimRelToMax or to the existing meshes of other levels of this mesh.

Referenced by Aggregate(), buildExtrudedMesh(), buildInnerBoundaryAlongM1Group(), extractPart(), linearToQuadratic(), New(), quadraticToLinear(), setGroupsFromScratch(), setMeshes(), unPolyze(), MEDCoupling::WriteMesh(), and MEDCoupling::WriteUMesh().

void MEDFileUMesh::setMeshAtLevel ( int  meshDimRelToMax,
MEDCouplingUMesh m,
bool  newOrOld = false 
)

Sets a new MEDCouplingUMesh at a given level in this mesh.

Parameters
[in]meshDimRelToMax- a relative level to set the mesh at.
[in]m- the new mesh to set.
[in]newOrOld- if true, cells in m are sorted by type to be ready for writing this mesh in a MED file.
Exceptions
Ifthe name or the description of this mesh and m are not empty and are different.
Ifthe node coordinates array is set this in mesh and m refers to another node coordinates array.
Ifthe mesh dimension of m does not correspond to meshDimRelToMax or to the existing meshes of other levels of this mesh.
void MEDFileUMesh::setMeshes ( const std::vector< const MEDCouplingUMesh * > &  ms,
bool  renum = false 
)

This method allows to set at once the content of different levels in this. This method is equivalent to a series of call to MEDFileUMesh::setMeshAtLevel.

Parameters
[in]ms- List of unstructured meshes lying on the same coordinates and having different mesh dimesnion.
[in]renum- the parameter (set to false by default) that tells the beheviour if there is a mesh on ms that is not geo type sorted. If false, an exception ois thrown. If true the mesh is reordered automatically. It is highly recommanded to let this parameter to false.
Exceptions
Ifthere is a null pointer in ms.
See Also
MEDFileUMesh::setMeshAtLevel

References MEDCoupling::MEDCouplingPointSet::getCoords(), MEDCoupling::MEDCouplingUMesh::getMeshDimension(), MEDCoupling::MEDCouplingMesh::getName(), setMeshAtLevel(), and setName().

Referenced by MEDCoupling::WriteUMeshes().

void MEDFileUMesh::setGroupsFromScratch ( int  meshDimRelToMax,
const std::vector< const MEDCouplingUMesh * > &  ms,
bool  renum = false 
)

Creates one MEDCouplingUMesh at a given level in this mesh from a sequence of meshes each representing a group, and creates corresponding groups in this mesh. The given meshes must share the same node coordinates array.

Parameters
[in]meshDimRelToMax- the relative dimension to create the mesh and groups at.
[in]ms- the sequence of meshes. Each mesh in ms represents a group to create in this mesh.
Exceptions
Ifms is empty.
Ifdimension of meshes in ms does not correspond to meshDimRelToMax or to the existing meshes of other levels of this mesh.
Ifthe meshes in ms do not share the same node coordinates array.
Ifthe node coordinates array of this mesh (if any) is not the same as that of the given meshes.
Ifms[ i ] is not well defined (MEDCouplingUMesh::checkConsistencyLight()).
Ifnames of some meshes in ms are equal.
Ifms includes a mesh with an empty name.

References MEDCoupling::MEDCouplingUMesh::FuseUMeshesOnSameCoords(), getMeshDimension(), MEDCoupling::RefCountObjectOnly::incrRef(), MEDCoupling::MEDFileMesh::setGroupsAtLevel(), and setMeshAtLevel().

Referenced by MEDCoupling::WriteUMeshesPartition().

void MEDFileUMesh::setGroupsOnSetMesh ( int  meshDimRelToMax,
const std::vector< const MEDCouplingUMesh * > &  ms,
bool  renum = false 
)

Creates groups at a given level in this mesh from a sequence of meshes each representing a group. The given meshes must share the same node coordinates array.

Parameters
[in]meshDimRelToMax- the relative dimension to create the groups at.
[in]ms- the sequence of meshes. Each mesh in ms represents a group to create in this mesh.
[in]renum- if true, then the optional numbers of entities are taken into account.
Exceptions
Ifms is empty.
Ifdimension of meshes in ms does not correspond to meshDimRelToMax or to the existing meshes of other levels of this mesh.
Ifthe meshes in ms do not share the same node coordinates array.
Ifthe node coordinates array of this mesh (if any) is not the same as that of the given meshes.
Ifms[ i ] is not well defined (MEDCouplingUMesh::checkConsistencyLight()).
Ifnames of some meshes in ms are equal.
Ifms includes a mesh with an empty name.

References MEDCoupling::MEDCouplingUMesh::areCellsIncludedIn(), getMeshAtLevel(), getMeshDimension(), MEDCoupling::RefCountObjectOnly::incrRef(), and MEDCoupling::MEDFileMesh::setGroupsAtLevel().

void MEDFileUMesh::buildInnerBoundaryAlongM1Group ( const std::string &  grpNameM1,
DataArrayInt *&  nodesDuplicated,
DataArrayInt *&  cellsModified,
DataArrayInt *&  cellsNotModified 
)

this must be filled at level 0 and -1, typically the -1 level being (part of) the descending connectivity of the top level. This method build a "crack", or an inner boundary, in this along the group of level -1 named grpNameM1. The boundary is built according to the following method:

  • all nodes along the boundary which are not lying on an internal extremity of the (-1)-level group are duplicated (so the coordinates array is extended).
  • new (-1)-level cells are built lying on those new nodes. So the edges/faces along the group are duplicated. A new group called "<grpNameM1>_dup" containing the effectively duplicated cells is created. Note that in 3D some cells of the group might not be duplicated at all. After this operation a top-level cell bordering the group will loose some neighbors (typically the cell which is on the other side of the group is no more a neighbor)
    • finally, the connectivity of (part of) the top level-cells bordering the group is also modified so that some cells bordering the newly created boundary use the newly computed nodes. Finally note that optional cell numbers are also affected by this method and might become invalid for SMESH. Use clearNodeAndCellNumbers() afterwards to ensure a proper SMESH loading.
Parameters
[in]grpNameM1name of the (-1)-level group defining the boundary
[out]nodesDuplicatedids of the initial nodes which have been duplicated (and whose copy is put at the end of the coord array)
[out]cellsModifiedids of the cells whose connectivity has been modified (to use the newly created nodes)
[out]cellsNotModifiedids of the rest of cells bordering the new boundary whose connectivity remains unchanged.
See Also
clearNodeAndCellNumbers()

References MEDCoupling::MEDFileMesh::addFamily(), MEDCoupling::MEDFileMesh::addFamilyOnGrp(), MEDCoupling::MEDCouplingUMesh::AggregateSortedByTypeMeshesOnSameCoords(), MEDCoupling::RefCountObjectOnly::decrRef(), MEDCoupling::MEDCouplingUMesh::duplicateNodesInConn(), MEDCoupling::DataArrayInt::findIdsNotInRange(), getCoords(), getFamilyFieldAtLevel(), getGroup(), MEDCoupling::MEDFileMesh::getGroupArr(), MEDCoupling::MEDFileMesh::getMaxFamilyId(), getMeshAtLevel(), MEDCoupling::MEDFileMesh::getMinFamilyId(), MEDCoupling::MEDFileMesh::getName(), getNonEmptyLevels(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayInt::New(), MEDCoupling::DataArrayInt::selectByTupleIdSafeSlice(), setFamilyFieldArr(), setMeshAtLevel(), and MEDCoupling::DataArrayTemplate< T >::setPartOfValues1().

bool MEDFileUMesh::unPolyze ( std::vector< int > &  oldCode,
std::vector< int > &  newCode,
DataArrayInt *&  o2nRenumCell 
)
virtual

Similar to MEDCouplingUMesh::unPolyze(): converts all polygons (if this is a 2D mesh) or polyhedrons (if this is a 3D mesh) to cells of classical types. The cells remain correctly sorted by geometric type in this method.

Parameters
[out]oldCoderetrieves the distribution of types before the call if true is returned
[out]newCodeetrieves the distribution of types after the call if true is returned
[out]o2nRenumCelltells for all levels the old 2 new renumbering of cells.
Returns
false if no modification has been performed linked to the unpolyzation. Neither cell type, not cell numbers. When false is returned no need of field on cells or on gauss renumbering. Inversely, if true is returned, it means that distribution of cell by geometric type has changed and field on cell and field on gauss point must be renumbered.

Implements MEDCoupling::MEDFileMesh.

References MEDCoupling::DataArrayInt::Aggregate(), MEDCoupling::DataArrayInt::buildPermArrPerLevel(), MEDCoupling::RefCountObjectOnly::decrRef(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::MEDCouplingUMesh::getDistributionOfTypes(), getFamilyFieldAtLevel(), MEDCoupling::MEDCouplingUMesh::getLevArrPerCellTypes(), getMeshAtLevel(), getNonEmptyLevels(), getNumberFieldAtLevel(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::RefCountObjectOnly::incrRef(), MEDCoupling::DataArrayInt::isIota(), MEDCoupling::MEDFileMesh::PutInThirdComponentOfCodeOffset(), MEDCoupling::DataArrayTemplate< T >::renumber(), MEDCoupling::MEDCouplingUMesh::renumberCells(), MEDCoupling::MCAuto< T >::retn(), setFamilyFieldArr(), setMeshAtLevel(), setRenumFieldArr(), and MEDCoupling::MEDCouplingUMesh::unPolyze().

DataArrayInt * MEDFileUMesh::zipCoords ( )

Array returned is the correspondance in old to new format. The returned array is newly created and should be dealt by the caller. The maximum value stored in returned array is the number of nodes of this minus 1 after call of this method. The size of returned array is the number of nodes of the old (previous to the call of this method) number of nodes. -1 values in returned array means that the corresponding old node is no more used.

Returns
newly allocated array containing correspondance in old to new format. If all nodes in this are fetched NULL pointer is returned and nothing is modified in this.
Exceptions
Ifno coordinates are set in this or if there is in any available mesh in this a cell having a nodal connectivity containing a node id not in the range of set coordinates.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::begin(), getCoords(), getNonEmptyLevels(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), MEDCoupling::DataArrayInt::invertArrayO2N2N2OBis(), MEDCoupling::DataArrayInt::New(), MEDCoupling::MCAuto< T >::retn(), and MEDCoupling::DataArrayDouble::selectByTupleIdSafe().

DataArrayInt * MEDFileUMesh::deduceNodeSubPartFromCellSubPart ( const std::map< int, MCAuto< DataArrayInt > > &  extractDef) const

This method is a const method. It computes the minimal set of node ids covered by the cell extraction of this. The extraction of this is specified by the extractDef input map. This map tells for each level of cells, the cells kept in the extraction.

Returns
- a new reference of DataArrayInt that represents sorted node ids, the extraction is lying on.
See Also
MEDFileField1TS::extractPart, MEDFileUMesh::extractPart

References MEDCoupling::DataArrayInt::BuildListOfSwitchedOn(), MEDCoupling::MEDCouplingUMesh::buildPartOfMySelf(), MEDCoupling::MEDCouplingUMesh::computeNodeIdsAlg(), getMeshAtLevel(), getNonEmptyLevels(), and getNumberOfNodes().

MEDFileUMesh * MEDFileUMesh::buildExtrudedMesh ( const MEDCouplingUMesh m1D,
int  policy 
) const

This method performs an extrusion along a path defined by m1D. this is expected to be a mesh with max mesh dimension equal to 2. m1D is expected to be a mesh with space dimesion equal to 3 and mesh dimension equal to 1. Mesh dimensions of returned mesh is incremented by one compared to thoose in this. This method scans all levels in this and put them in the returned mesh. All groups in this are also put in the returned mesh.

Parameters
[in]m1D- the mesh defining the extrusion path.
[in]policy- defines the policy of extrusion (see MEDCouplingUMesh::buildExtrudedMesh for more details)
Returns
- a new reference on mesh (you have to deal with using decrRef). The returned mesh will have the same name than this.
See Also
MEDCouplingUMesh::buildExtrudedMesh

References MEDCoupling::DataArrayInt::Aggregate(), MEDCoupling::DataArrayInt::applyLin(), MEDCoupling::MEDCouplingUMesh::buildExtrudedMesh(), MEDCoupling::MEDCouplingPointSet::changeSpaceDimension(), MEDCoupling::MEDFileMesh::checkCartesian(), MEDCoupling::MEDCouplingUMesh::checkConsistencyLight(), MEDCoupling::MEDCouplingUMesh::clone(), MEDCoupling::MEDCouplingUMesh::deepCopy(), MEDCoupling::DataArrayInt::deepCopy(), MEDCoupling::DataArrayTemplate< T >::empty(), MEDCoupling::MEDCouplingPointSet::getCoords(), MEDCoupling::MEDFileMesh::getGroupArr(), MEDCoupling::MEDFileMesh::getGroupsNames(), getMeshAtLevel(), MEDCoupling::MEDCouplingUMesh::getMeshDimension(), getMeshDimension(), MEDCoupling::MEDFileMesh::getName(), getNonEmptyLevels(), MEDCoupling::MEDCouplingUMesh::getNumberOfCells(), getNumberOfCellsAtLevel(), MEDCoupling::MEDCouplingPointSet::getNumberOfNodes(), getNumberOfNodes(), MEDCoupling::MEDCouplingUMesh::MergeUMeshesOnSameCoords(), New(), MEDCoupling::MCAuto< T >::retn(), MEDCoupling::MEDCouplingPointSet::setCoords(), MEDCoupling::MEDFileMesh::setGroupsAtLevel(), setMeshAtLevel(), MEDCoupling::MEDCouplingMesh::setName(), MEDCoupling::DataArray::setName(), MEDCoupling::MEDCouplingUMesh::sortCellsInMEDFileFrmt(), and MEDCoupling::DataArrayInt::transformWithIndArr().

MEDFileUMesh * MEDFileUMesh::linearToQuadratic ( int  conversionType = 0,
double  eps = 1e-12 
) const

This method converts all linear cells in this into quadratic cells (following the conversionType policy). All the cells converted are put in the returned instance. This method applies all the groups and families in this to returned instance. Groups on nodes and families on nodes are copied directly to the returned instance without transformation.

Parameters
[in]conversionType- conversionType specifies the type of conversion expected. Only 0 (default) and 1 are supported presently. 0 those that creates the 'most' simple corresponding quadratic cells. 1 is those creating the 'most' complex.
[in]eps- detection threshold for coordinates.
Returns
A new instance that is the result of the conversion. The caller has the ownership of this returned instance.
See Also
MEDCouplingUMesh::convertLinearCellsToQuadratic , quadraticToLinear

References MEDCoupling::DataArrayInt::Aggregate(), MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayInt::applyLin(), MEDCoupling::DataArrayDouble::areIncludedInMe(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::MEDFileMesh::checkCartesian(), MEDCoupling::MEDCouplingUMesh::convertLinearCellsToQuadratic(), MEDCoupling::MEDFileMesh::copyFamGrpMapsFrom(), MEDCoupling::MEDCouplingUMesh::deepCopy(), MEDCoupling::DataArrayInt::deepCopy(), MEDCoupling::DataArrayInt::fillWithZero(), MEDCoupling::MEDCouplingPointSet::getCoords(), getFamilyFieldAtLevel(), getMeshAtLevel(), MEDCoupling::MEDCouplingUMesh::getMeshDimension(), getNonEmptyLevels(), MEDCoupling::MEDCouplingPointSet::getNumberOfNodes(), getNumberOfNodes(), MEDCoupling::DataArrayInt::iota(), New(), MEDCoupling::DataArrayInt::New(), MEDCoupling::MEDCouplingUMesh::renumberNodesInConn(), MEDCoupling::MCAuto< T >::retn(), MEDCoupling::DataArrayDouble::selectByTupleIdSafeSlice(), MEDCoupling::MEDCouplingPointSet::setCoords(), setFamilyFieldArr(), setMeshAtLevel(), and MEDCoupling::DataArrayTemplate< T >::setPartOfValues1().

MEDFileUMesh * MEDFileUMesh::quadraticToLinear ( double  eps = 1e-12) const

This method converts all quadratic cells in this into linear cells. All the cells converted are put in the returned instance. This method applies all the groups and families in this to returned instance. Groups on nodes and families on nodes are copied directly to the returned instance without transformation.

Parameters
[in]eps- detection threshold for coordinates.
Returns
A new instance that is the result of the conversion. The caller has the ownership of this returned instance.
See Also
MEDCouplingUMesh::convertLinearCellsToQuadratic , linearToQuadratic

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::MEDFileMesh::checkCartesian(), MEDCoupling::MEDCouplingUMesh::convertQuadraticCellsToLinear(), MEDCoupling::MEDFileMesh::copyFamGrpMapsFrom(), MEDCoupling::MEDCouplingUMesh::deepCopy(), MEDCoupling::DataArrayInt::deepCopy(), MEDCoupling::MEDCouplingPointSet::getCoords(), getFamilyFieldAtLevel(), getMeshAtLevel(), getNonEmptyLevels(), New(), MEDCoupling::MEDCouplingUMesh::renumberNodesInConn(), MEDCoupling::MCAuto< T >::retn(), MEDCoupling::DataArrayInt::selectByTupleIdSafeSlice(), MEDCoupling::MEDCouplingPointSet::setCoords(), setFamilyFieldArr(), setMeshAtLevel(), and MEDCoupling::MEDCouplingPointSet::zipCoords().

MCAuto< MEDFileUMesh > MEDFileUMesh::symmetry3DPlane ( const double  point[3],
const double  normalVector[3] 
) const

Computes the symmetry of this.

Returns
a new object.

References deepCopy(), getCoords(), setCoordsForced(), and MEDCoupling::DataArrayDouble::symmetry3DPlane().

Friends And Related Function Documentation

friend class MEDFileMesh
friend