Version: 9.12.0
MEDCoupling::MEDFileUMesh Class Reference
Inheritance diagram for MEDCoupling::MEDFileUMesh:
Collaboration diagram for MEDCoupling::MEDFileUMesh:

Public Member Functions

void addGroup (int meshDimRelToMaxExt, const DataArrayIdType *ids)
 
void addNodeGroup (const DataArrayIdType *ids)
 
std::string advancedRepr () const
 
MEDFileUMeshbuildExtrudedMesh (const MEDCouplingUMesh *m1D, int policy) const
 
mcIdType buildImplicitPartIfAny (INTERP_KERNEL::NormalizedCellType gt) const
 
void buildInnerBoundaryAlongM1Group (const std::string &grpNameM1, DataArrayIdType *&nodesDuplicated, DataArrayIdType *&cellsModified, DataArrayIdType *&cellsNotModified)
 
MEDFileMeshcartesianize () const
 
void checkConsistency () const
 
void checkSMESHConsistency () const
 
void clearNodeAndCellNumbers ()
 
void clearNonDiscrAttributes () const
 
DataArrayIdType * computeFetchedNodeIds () const
 
void computeRevNum () const
 
MEDCouplingMappedExtrudedMeshconvertToExtrudedMesh () const
 
MEDFileMeshcreateNewEmpty () const
 
void declarePartsUpdated () const
 
DataArrayIdType * deduceNodeSubPartFromCellSubPart (const std::map< int, MCAuto< DataArrayIdType > > &extractDef) const
 
MEDFileUMeshdeepCopy () const
 
void eraseGroupsAtLevel (int meshDimRelToMaxExt)
 
DataArrayIdType * extractFamilyFieldOnGeoType (INTERP_KERNEL::NormalizedCellType gt) const
 
DataArrayIdType * extractNumberFieldOnGeoType (INTERP_KERNEL::NormalizedCellType gt) const
 
MEDFileUMeshextractPart (const std::map< int, MCAuto< DataArrayIdType > > &extractDef) const
 
void forceComputationOfParts () const
 
const std::vector< MCAuto< MEDFileEltStruct4Mesh > > & getAccessOfUndergroundEltStrs () const
 
std::vector< std::pair< int, mcIdType > > getAllDistributionOfTypes () const
 
std::string getClassName () const override
 
DataArrayDoublegetCoords () const
 
std::vector< const BigMemoryObject * > getDirectChildrenWithNull () const
 
MEDCoupling1GTUMeshgetDirectUndergroundSingleGeoTypeMesh (INTERP_KERNEL::NormalizedCellType gt) const
 
std::vector< MEDCoupling1GTUMesh * > getDirectUndergroundSingleGeoTypeMeshes (int meshDimRelToMax) const
 
std::vector< mcIdType > getDistributionOfTypes (int meshDimRelToMax) const
 
std::vector< int > getFamArrNonEmptyLevelsExt () const
 
MEDCouplingUMeshgetFamilies (int meshDimRelToMaxExt, const std::vector< std::string > &fams, bool renum=false) const
 
DataArrayIdType * getFamiliesArr (int meshDimRelToMaxExt, const std::vector< std::string > &fams, bool renum=false) const
 
MEDCouplingUMeshgetFamily (int meshDimRelToMaxExt, const std::string &fam, bool renum=false) const
 
DataArrayIdType * getFamilyFieldAtLevel (int meshDimRelToMaxExt)
 
const DataArrayIdType * getFamilyFieldAtLevel (int meshDimRelToMaxExt) const
 
std::vector< mcIdType > getFamsNonEmptyLevels (const std::vector< std::string > &fams) const
 
std::vector< mcIdType > getFamsNonEmptyLevelsExt (const std::vector< std::string > &fams) const
 
std::vector< INTERP_KERNEL::NormalizedCellType > getGeoTypesAtLevel (int meshDimRelToMax) const
 
MCAuto< DataArrayIdType > getGlobalNumFieldAtLevel (int meshDimRelToMaxExt) 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
 
mcIdType getMaxAbsFamilyIdInArrays () const
 
mcIdType getMaxFamilyIdInArrays () const
 
MEDCouplingUMeshgetMeshAtLevel (int meshDimRelToMax, bool renum=false) const
 
int getMeshDimension () const
 
mcIdType 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 DataArrayIdType * getNumberFieldAtLevel (int meshDimRelToMaxExt) const
 
mcIdType getNumberOfCellsAtLevel (int meshDimRelToMaxExt) const
 
mcIdType getNumberOfCellsWithType (INTERP_KERNEL::NormalizedCellType ct) const
 
mcIdType getNumberOfNodes () const
 
const PartDefinition * getPartDefAtLevel (int meshDimRelToMaxExt, INTERP_KERNEL::NormalizedCellType gt=INTERP_KERNEL::NORM_ERROR) const
 
int getRelativeLevOnGeoType (INTERP_KERNEL::NormalizedCellType gt) const
 
const DataArrayIdType * getRevNumberFieldAtLevel (int meshDimRelToMaxExt) const
 
mcIdType 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< mcIdType > &tinyInt, std::vector< std::string > &tinyStr, std::vector< MCAuto< DataArrayIdType > > &bigArraysI, MCAuto< DataArrayDouble > &bigArrayD)
 
void setCoords (DataArrayDouble *coords)
 
void setCoordsForced (DataArrayDouble *coords)
 
void setFamilyFieldArr (int meshDimRelToMaxExt, DataArrayIdType *famArr)
 
void setFamilyNameAttachedOnId (mcIdType id, const std::string &newFamName)
 
void setGlobalNumFieldAtLevel (int meshDimRelToMaxExt, DataArrayIdType *globalNumArr)
 
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, DataArrayIdType *renumArr)
 
MEDFileUMeshshallowCpy () const
 
std::string simpleRepr () const
 
MCAuto< MEDFileUMeshsymmetry3DPlane (const double point[3], const double normalVector[3]) const
 
bool unPolyze (std::vector< mcIdType > &oldCode, std::vector< mcIdType > &newCode, DataArrayIdType *&o2nRenumCell)
 
void unserialize (std::vector< double > &tinyDouble, std::vector< mcIdType > &tinyInt, std::vector< std::string > &tinyStr, std::vector< MCAuto< DataArrayIdType > > &bigArraysI, MCAuto< DataArrayDouble > &bigArrayD)
 
void whichAreNodesFetched (const MEDFileField1TSStructItem &st, const MEDFileFieldGlobsReal *globs, std::vector< bool > &nodesFetched) const
 
DataArrayIdType * zipCoords ()
 
- Public Member Functions inherited from MEDCoupling::MEDFileMesh
virtual void addFamily (const std::string &familyName, mcIdType id)
 
void addFamilyOnGrp (const std::string &grpName, const std::string &famName)
 
void addGroupsAtLevel (int meshDimRelToMaxExt, const std::vector< const DataArrayIdType * > &grps)
 
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 (mcIdType oldId, mcIdType 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 ()
 
DataArrayIdType * computeAllFamilyIdsInUse () const
 
void copyFamGrpMapsFrom (const MEDFileMesh &other)
 
virtual void createGroupOnAll (int meshDimRelToMaxExt, const std::string &groupName)
 
bool ensureDifferentFamIdsPerLevel ()
 
bool existsFamily (const std::string &familyName) const
 
bool existsFamily (mcIdType famId) const
 
bool existsGroup (const std::string &groupName) const
 
std::string findOrCreateAndGiveFamilyWithId (mcIdType id, bool &created)
 
DataArrayIdType * getAllFamiliesIdsReferenced () const
 
std::vector< INTERP_KERNEL::NormalizedCellType > getAllGeoTypes () const
 
MEDCouplingAxisType getAxisType () const
 
std::string getDescription () const
 
MEDFileEquivalences * getEquivalences ()
 
const MEDFileEquivalences * getEquivalences () const
 
std::vector< mcIdType > getFamiliesIds (const std::vector< std::string > &famNames) const
 
std::vector< mcIdType > 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 DataArrayIdType * getFamilyArr (int meshDimRelToMaxExt, const std::string &fam, bool renum=false) const
 
mcIdType getFamilyId (const std::string &name) const
 
const std::map< std::string, mcIdType > & getFamilyInfo () const
 
std::string getFamilyNameGivenId (mcIdType id) const
 
std::vector< mcIdType > getFamNonEmptyLevels (const std::string &fam) const
 
std::vector< mcIdType > getFamNonEmptyLevelsExt (const std::string &fam) const
 
virtual DataArrayIdType * getGroupArr (int meshDimRelToMaxExt, const std::string &grp, bool renum=false) const
 
const std::map< std::string, std::vector< std::string > > & getGroupInfo () const
 
virtual DataArrayIdType * getGroupsArr (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< mcIdType > getGrpNonEmptyLevels (const std::string &grp) const
 
std::vector< mcIdType > getGrpNonEmptyLevelsExt (const std::string &grp) const
 
std::vector< mcIdType > getGrpsNonEmptyLevels (const std::vector< std::string > &grps) const
 
std::vector< mcIdType > getGrpsNonEmptyLevelsExt (const std::vector< std::string > &grps) const
 
int getIteration () const
 
MEDFileJoints * getJoints () const
 
mcIdType getMaxAbsFamilyId () const
 
mcIdType getMaxFamilyId () const
 
mcIdType getMinFamilyId () const
 
std::string getName () const
 
virtual DataArrayIdType * getNodeFamiliesArr (const std::vector< std::string > &fams, bool renum=false) const
 
virtual DataArrayIdType * getNodeFamilyArr (const std::string &fam, bool renum=false) const
 
virtual DataArrayIdType * getNodeGroupArr (const std::string &grp, bool renum=false) const
 
virtual DataArrayIdType * getNodeGroupsArr (const std::vector< std::string > &grps, bool renum=false) const
 
int getNumberOfJoints () const
 
DataArrayIdType * getOrCreateAndGetFamilyFieldAtLevel (int meshDimRelToMaxExt)
 
int getOrder () const
 
mcIdType getTheMaxAbsFamilyId () const
 
mcIdType getTheMaxFamilyId () const
 
mcIdType 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< mcIdType > &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)
 
void removeGroupAtLevel (int meshDimRelToMaxExt, 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< mcIdType > &famIds)
 
void setFamiliesOnGroup (const std::string &name, const std::vector< std::string > &fams)
 
void setFamilyId (const std::string &familyName, mcIdType id)
 
void setFamilyIdUnique (const std::string &familyName, mcIdType id)
 
void setFamilyInfo (const std::map< std::string, mcIdType > &info)
 
void setGroupInfo (const std::map< std::string, std::vector< std::string > > &info)
 
virtual void setGroupsAtLevel (int meshDimRelToMaxExt, const std::vector< const DataArrayIdType * > &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
 
void zipFamilies ()
 
- Public Member Functions inherited from MEDCoupling::RefCountObjectOnly
bool decrRef () const
 
int getRCValue () const
 
void incrRef () const
 
RefCountObjectOnlyoperator= (const RefCountObjectOnly &other)
 
- Public Member Functions inherited from MEDCoupling::BigMemoryObject
std::string debugHeapMemorySize () const
 
std::vector< const BigMemoryObject * > getAllTheProgeny () const
 
std::vector< const BigMemoryObject * > getDirectChildren () const
 
std::size_t getHeapMemorySize () const
 
std::string getHeapMemorySizeStr () const
 
bool isObjectInTheProgeny (const BigMemoryObject *obj) const
 
virtual ~BigMemoryObject ()
 

Static Public Member Functions

static MCAuto< MEDFileUMeshAggregate (const std::vector< const MEDFileUMesh * > &meshes)
 
static const char * GetSpeStr4ExtMesh ()
 
static MCAuto< MEDFileUMeshLoadConnectivityOnlyPartOf (const std::string &fileName, const std::string &mName, const std::vector< INTERP_KERNEL::NormalizedCellType > &types, const std::vector< mcIdType > &slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=nullptr)
 
static MCAuto< MEDFileUMeshLoadConnectivityOnlyPartOf (med_idt fid, const std::string &mName, const std::vector< INTERP_KERNEL::NormalizedCellType > &types, const std::vector< mcIdType > &slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=nullptr)
 
static void LoadPartCoords (const std::string &fileName, const std::string &mName, int dt, int it, const std::vector< std::string > &infosOnComp, mcIdType startNodeId, mcIdType stopNodeId, MCAuto< DataArrayDouble > &coords, MCAuto< PartDefinition > &partCoords, MCAuto< DataArrayIdType > &famCoords, MCAuto< DataArrayIdType > &numCoords, MCAuto< DataArrayAsciiChar > &nameCoords)
 
static MEDFileUMeshLoadPartOf (const std::string &fileName, const std::string &mName, const std::vector< INTERP_KERNEL::NormalizedCellType > &types, const std::vector< mcIdType > &slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=nullptr)
 
static MEDFileUMeshLoadPartOf (med_idt fid, const std::string &mName, const std::vector< INTERP_KERNEL::NormalizedCellType > &types, const std::vector< mcIdType > &slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=nullptr)
 
static MEDFileUMeshLoadPartOfFromUserDistrib (med_idt fid, const std::string &mName, const std::map< INTERP_KERNEL::NormalizedCellType, std::vector< mcIdType >> &distrib, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileUMeshNew ()
 
static MEDFileUMeshNew (const MEDCouplingMappedExtrudedMesh *mem)
 
static MEDFileUMeshNew (const std::string &fileName, const std::string &mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileUMeshNew (const std::string &fileName, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileUMeshNew (DataArrayByte *db)
 
static MEDFileUMeshNew (med_idt fid, const std::string &mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileUMeshNew (med_idt fid, MEDFileMeshReadSelector *mrs=0)
 
- 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 med_geometry_type ConvertToMEDFileGeoType (INTERP_KERNEL::NormalizedCellType geoType)
 
static std::string GetMagicFamilyStr ()
 
static MEDFileMeshNew (const std::string &fileName, const std::string &mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0, MEDFileJoints *joints=0)
 
static MEDFileMeshNew (const std::string &fileName, MEDFileMeshReadSelector *mrs=0)
 
static MEDFileMeshNew (DataArrayByte *db)
 
static MEDFileMeshNew (med_idt fid, const std::string &mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0, MEDFileJoints *joints=0)
 
static MEDFileMeshNew (med_idt fid, MEDFileMeshReadSelector *mrs=0)
 
- Static Public Member Functions inherited from MEDCoupling::BigMemoryObject
static std::size_t GetHeapMemorySizeOfObjs (const std::vector< const BigMemoryObject * > &objs)
 

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 DataArrayIdType *ids, DataArrayIdType *famArr)
 
virtual void appendFamilyEntries (const DataArrayIdType *famIds, const std::vector< std::vector< mcIdType > > &fidsOfGrps, const std::vector< std::string > &grpNames)
 
bool areEquivalencesEqual (const MEDFileMesh *other, std::string &what) const
 
void checkCartesian () const
 
void checkNoGroupClash (const DataArrayIdType *famArr, const std::string &grpName) 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
 
- Protected Member Functions inherited from MEDCoupling::RefCountObject
 RefCountObject ()
 
 RefCountObject (const RefCountObject &other)
 
virtual ~RefCountObject ()
 
- Protected Member Functions inherited from MEDCoupling::RefCountObjectOnly
 RefCountObjectOnly ()
 
 RefCountObjectOnly (const RefCountObjectOnly &other)
 
virtual ~RefCountObjectOnly ()
 
- 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, mcIdType > &families, mcIdType id, bool &created)
 
static mcIdType PutInThirdComponentOfCodeOffset (std::vector< mcIdType > &code, mcIdType strt)
 
static void TranslateFamilyIds (mcIdType offset, DataArrayIdType *famArr, std::vector< std::vector< mcIdType > > &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, mcIdType > _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

◆ New() [1/7]

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().

◆ New() [2/7]

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

◆ New() [3/7]

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().

◆ New() [4/7]

MEDFileUMesh * MEDFileUMesh::New ( med_idt  fid,
MEDFileMeshReadSelector *  mrs = 0 
)
static

◆ New() [5/7]

static MEDFileUMesh* MEDCoupling::MEDFileUMesh::New ( DataArrayByte db)
static

◆ New() [6/7]

◆ New() [7/7]

◆ getClassName()

std::string MEDCoupling::MEDFileUMesh::getClassName ( ) const
overridevirtual

Reimplemented from MEDCoupling::BigMemoryObject.

◆ LoadConnectivityOnlyPartOf() [1/2]

MCAuto< MEDFileUMesh > MEDFileUMesh::LoadConnectivityOnlyPartOf ( const std::string &  fileName,
const std::string &  mName,
const std::vector< INTERP_KERNEL::NormalizedCellType > &  types,
const std::vector< mcIdType > &  slicPerTyp,
int  dt = -1,
int  it = -1,
MEDFileMeshReadSelector *  mrs = nullptr 
)
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. Contrary to MEDFileUMesh::LoadPart this method does not load coordinates but only connectivities

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]slicPerTyp- 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.
See also
MEDFileUMesh::LoadPartOf

References MEDCoupling::CheckFileForRead().

◆ LoadConnectivityOnlyPartOf() [2/2]

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

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

References New().

◆ LoadPartOf() [1/2]

MEDFileUMesh * MEDFileUMesh::LoadPartOf ( const std::string &  fileName,
const std::string &  mName,
const std::vector< INTERP_KERNEL::NormalizedCellType > &  types,
const std::vector< mcIdType > &  slicPerTyp,
int  dt = -1,
int  it = -1,
MEDFileMeshReadSelector *  mrs = nullptr 
)
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]slicPerTyp- 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.
See also
MEDFileUMesh::LoadConnectivityOnlyPartOf

References MEDCoupling::CheckFileForRead().

◆ LoadPartOf() [2/2]

MEDFileUMesh * MEDFileUMesh::LoadPartOf ( med_idt  fid,
const std::string &  mName,
const std::vector< INTERP_KERNEL::NormalizedCellType > &  types,
const std::vector< mcIdType > &  slicPerTyp,
int  dt = -1,
int  it = -1,
MEDFileMeshReadSelector *  mrs = nullptr 
)
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().

◆ LoadPartOfFromUserDistrib()

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

This method loads from file with name fileName a part of the mesh called mName as MEDFileUMesh::LoadPartOf does. The difference is that here we are not limited to slice of cells, but we can potentially load a random selection of cells, defined in the distrib vector.

Parameters
[in]fid- id of the file
[in]mName- the name of the mesh to be read
[in]distrib- map defining for each geometric type, the corresponding vector of cells we want to load with c-type indexing (starting from zero).
[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 New().

◆ LoadPartCoords()

void MEDFileUMesh::LoadPartCoords ( const std::string &  fileName,
const std::string &  mName,
int  dt,
int  it,
const std::vector< std::string > &  infosOnComp,
mcIdType  startNodeId,
mcIdType  stopNodeId,
MCAuto< DataArrayDouble > &  coords,
MCAuto< PartDefinition > &  partCoords,
MCAuto< DataArrayIdType > &  famCoords,
MCAuto< DataArrayIdType > &  numCoords,
MCAuto< DataArrayAsciiChar > &  nameCoords 
)
static

This method is an helper to load only consecutive nodes chunk of data of MED file pointed by fileName. Consecutive chunk is specified classicaly by start (included) stop (excluded) format with startNodeId and stopNodeId respectively. This method returns 5 elements.

Parameters
[in]fileName- Name of file nodes to be read of.
[in]mName- Name of the mesh inside file pointed be fileName nodes to be read of.
[in]dt- Time iteration inside file pointed be fileName nodes to be read of.
[in]it- Time order inside file pointed be fileName nodes to be read of.
[in]infosOnComp- Components info of nodes to be read of. The size of string vector should be equal to space dimension of mesh to be read.
[in]startNodeId- Start Node Id (included) of chunk of data to be read
[in]stopNodeId- Start Node Id (included) of chunk of data to be read
[out]coords- output coordinates of requested chunk (DataArrayDouble)
[out]partCoords- output PartDefinition object of chunk
[out]famCoords- output family id field of requested chunk (DataArrayIdType)
[out]numCoords- output num id field of requested chunk (DataArrayIdType)
[out]nameCoords- output names on nodes of requested chunk (DataArrayAsciiChar)
See also
MEDLoaderUMesh::LoadPartOf

◆ GetSpeStr4ExtMesh()

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

Referenced by convertToExtrudedMesh(), and New().

◆ getHeapMemorySizeWithoutChildren()

std::size_t MEDFileUMesh::getHeapMemorySizeWithoutChildren ( ) const
virtual

◆ getDirectChildrenWithNull()

std::vector< const BigMemoryObject * > MEDFileUMesh::getDirectChildrenWithNull ( ) const
virtual

◆ createNewEmpty()

MEDFileMesh * MEDFileUMesh::createNewEmpty ( ) const
virtual

◆ deepCopy()

MEDFileUMesh * MEDFileUMesh::deepCopy ( ) const
virtual

Implements MEDCoupling::MEDFileMesh.

Referenced by symmetry3DPlane().

◆ shallowCpy()

MEDFileUMesh * MEDFileUMesh::shallowCpy ( ) const
virtual

◆ isEqual()

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::DataArrayDouble::isEqual(), and MEDCoupling::MEDFileMesh::isEqual().

◆ checkConsistency()

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().

◆ 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 checkConsistency().

◆ clearNodeAndCellNumbers()

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.

◆ clearNonDiscrAttributes()

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().

◆ setName()

void MEDFileUMesh::setName ( const std::string &  name)
virtual

Reimplemented from MEDCoupling::MEDFileMesh.

References MEDCoupling::MEDFileMesh::setName().

Referenced by setMeshes().

◆ getAccessOfUndergroundEltStrs()

const std::vector< MCAuto<MEDFileEltStruct4Mesh> >& MEDCoupling::MEDFileUMesh::getAccessOfUndergroundEltStrs ( ) const

◆ getMaxAbsFamilyIdInArrays()

mcIdType MEDFileUMesh::getMaxAbsFamilyIdInArrays ( ) const
virtual

◆ getMaxFamilyIdInArrays()

mcIdType MEDFileUMesh::getMaxFamilyIdInArrays ( ) const
virtual

◆ getMinFamilyIdInArrays()

mcIdType MEDFileUMesh::getMinFamilyIdInArrays ( ) const
virtual

◆ getMeshDimension()

int MEDFileUMesh::getMeshDimension ( ) const
virtual

◆ getSpaceDimension()

int MEDFileUMesh::getSpaceDimension ( ) const
virtual

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.

Implements MEDCoupling::MEDFileMesh.

References MEDCoupling::DataArray::getNumberOfComponents().

Referenced by Aggregate(), and serialize().

◆ simpleRepr()

std::string MEDFileUMesh::simpleRepr ( ) const
virtual

◆ advancedRepr()

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().

◆ getSizeAtLevel()

mcIdType 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
mcIdType - the number of entities.
Exceptions
Ifno mesh entities of dimension meshDimRelToMaxExt are available in this mesh.

Implements MEDCoupling::MEDFileMesh.

References MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

◆ getFamilyFieldAtLevel() [1/2]

const DataArrayIdType * 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 DataArrayIdType * - 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().

◆ getFamilyFieldAtLevel() [2/2]

DataArrayIdType * MEDFileUMesh::getFamilyFieldAtLevel ( int  meshDimRelToMaxExt)
virtual

◆ getNumberFieldAtLevel()

const DataArrayIdType * 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 DataArrayIdType * - 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::ReadFieldsOnSameMesh(), and unPolyze().

◆ getRevNumberFieldAtLevel()

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

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

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

Implements MEDCoupling::MEDFileMesh.

◆ getNameFieldAtLevel()

const DataArrayAsciiChar * MEDFileUMesh::getNameFieldAtLevel ( int  meshDimRelToMaxExt) const
virtual

◆ getGlobalNumFieldAtLevel()

MCAuto< DataArrayIdType > MEDFileUMesh::getGlobalNumFieldAtLevel ( int  meshDimRelToMaxExt) const
virtual

◆ getPartDefAtLevel()

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.

◆ getNumberOfNodes()

◆ getNumberOfCellsAtLevel()

mcIdType MEDFileUMesh::getNumberOfCellsAtLevel ( int  meshDimRelToMaxExt) const
virtual

Implements MEDCoupling::MEDFileMesh.

Referenced by buildExtrudedMesh().

◆ hasImplicitPart()

bool MEDFileUMesh::hasImplicitPart ( ) const
virtual

◆ buildImplicitPartIfAny()

mcIdType MEDFileUMesh::buildImplicitPartIfAny ( INTERP_KERNEL::NormalizedCellType  gt) const
virtual

◆ releaseImplicitPartIfAny()

void MEDFileUMesh::releaseImplicitPartIfAny ( ) const
virtual

◆ getGeoTypesAtLevel()

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().

◆ getNumberOfCellsWithType()

mcIdType MEDFileUMesh::getNumberOfCellsWithType ( INTERP_KERNEL::NormalizedCellType  ct) const
virtual

◆ whichAreNodesFetched()

void MEDFileUMesh::whichAreNodesFetched ( const MEDFileField1TSStructItem &  st,
const MEDFileFieldGlobsReal globs,
std::vector< bool > &  nodesFetched 
) const
virtual

◆ cartesianize()

◆ presenceOfStructureElements()

bool MEDFileUMesh::presenceOfStructureElements ( ) const
virtual

◆ killStructureElements()

void MEDFileUMesh::killStructureElements ( )
virtual

Reimplemented from MEDCoupling::MEDFileMesh.

◆ getNonEmptyLevels()

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(), computeFetchedNodeIds(), deduceNodeSubPartFromCellSubPart(), extractPart(), getAllDistributionOfTypes(), getFamsNonEmptyLevels(), getNonEmptyLevelsExt(), linearToQuadratic(), quadraticToLinear(), removeMeshAtLevel(), serialize(), unPolyze(), and zipCoords().

◆ getNonEmptyLevelsExt()

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().

◆ getFamArrNonEmptyLevelsExt()

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

◆ getNumArrNonEmptyLevelsExt()

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

◆ getNameArrNonEmptyLevelsExt()

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

◆ getFamsNonEmptyLevels()

std::vector< mcIdType > 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().

◆ getFamsNonEmptyLevelsExt()

std::vector< mcIdType > 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(), and getFamsNonEmptyLevels().

◆ getCoords()

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 MEDCoupling::MEDFileFields::aggregateFieldsOnSameMeshes(), buildInnerBoundaryAlongM1Group(), symmetry3DPlane(), and zipCoords().

◆ getGroup()

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().

◆ getGroups()

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(), and MEDCoupling::MEDFileMesh::getFamiliesOnGroups().

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

◆ getFamily()

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().

◆ 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(), getFamiliesArr(), MEDCoupling::MEDFileMesh::getFamiliesIds(), and MEDCoupling::MEDCouplingUMesh::New().

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

◆ getFamiliesArr()

DataArrayIdType * 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
DataArrayIdType * - a new instance of DataArrayIdType 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().

Referenced by getFamilies().

◆ getMeshAtLevel()

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]meshDimRelToMaxExt- 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 WriteFieldT().

◆ getDistributionOfTypes()

std::vector< mcIdType > MEDFileUMesh::getDistributionOfTypes ( int  meshDimRelToMax) const
virtual

◆ getAllDistributionOfTypes()

std::vector< std::pair< int, mcIdType > > 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(), and getNumberOfNodes().

◆ getLevel0Mesh()

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().

◆ getLevelM1Mesh()

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().

◆ getLevelM2Mesh()

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().

◆ getLevelM3Mesh()

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().

◆ declarePartsUpdated()

void MEDFileUMesh::declarePartsUpdated ( ) const

This method inform datastructure that vector of MEDCoupling1GTUMesh instances have been touched. So the version of data to take is vector of MEDCoupling1GTUMesh not MEDCouplingUMesh

◆ forceComputationOfParts()

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

See also
MEDFileUMesh::declarePartsUpdated

Referenced by serialize().

◆ computeRevNum()

void MEDFileUMesh::computeRevNum ( ) const

◆ getDirectUndergroundSingleGeoTypeMeshes()

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().

◆ getDirectUndergroundSingleGeoTypeMesh()

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().

◆ extractFamilyFieldOnGeoType()

DataArrayIdType * 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
DataArrayIdType * - a pointer to DataArrayIdType that the caller is to delete using decrRef() as it is no more needed.
See also
MEDFileUMesh::extractNumberFieldOnGeoType

References getMeshDimension().

◆ extractNumberFieldOnGeoType()

DataArrayIdType * 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
DataArrayIdType * - a pointer to DataArrayIdType that the caller is to delete using decrRef() as it is no more needed.
See also
MEDFileUMesh::extractFamilyFieldOnGeoType

References getMeshDimension().

◆ getRelativeLevOnGeoType()

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().

◆ setFamilyNameAttachedOnId()

void MEDFileUMesh::setFamilyNameAttachedOnId ( mcIdType  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().

◆ setCoords()

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(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

◆ setCoordsForced()

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().

◆ eraseGroupsAtLevel()

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().

◆ setFamilyFieldArr()

void MEDFileUMesh::setFamilyFieldArr ( int  meshDimRelToMaxExt,
DataArrayIdType *  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::DataArrayTemplate< T >::getNumberOfTuples().

Referenced by buildInnerBoundaryAlongM1Group(), and unPolyze().

◆ setRenumFieldArr()

void MEDFileUMesh::setRenumFieldArr ( int  meshDimRelToMaxExt,
DataArrayIdType *  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.

Referenced by unPolyze().

◆ setNameFieldAtLevel()

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(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

◆ setGlobalNumFieldAtLevel()

void MEDFileUMesh::setGlobalNumFieldAtLevel ( int  meshDimRelToMaxExt,
DataArrayIdType *  globalNumArr 
)
virtual

◆ addNodeGroup()

void MEDFileUMesh::addNodeGroup ( const DataArrayIdType *  ids)
virtual

Adds a group of nodes to this mesh.

Parameters
[in]ids- a DataArrayIdType 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(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

Referenced by addGroup().

◆ addGroup()

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

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

Parameters
[in]ids- a DataArrayIdType 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().

◆ removeMeshAtLevel()

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().

◆ setMeshAtLevel() [1/2]

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 buildInnerBoundaryAlongM1Group(), setGroupsFromScratch(), setMeshes(), and unPolyze().

◆ setMeshAtLevel() [2/2]

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.

◆ setMeshes()

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 is thrown. If true the mesh is reordered automatically. It is highly recommended 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().

◆ setGroupsFromScratch()

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().

◆ setGroupsOnSetMesh()

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().

◆ optimizeFamilies()

void MEDFileUMesh::optimizeFamilies ( )

Removes all families with ids not present in the family fields of this mesh.

References MEDCoupling::MEDFileMesh::_families, MEDCoupling::MEDFileMesh::_groups, getFamilyFieldAtLevel(), and getNonEmptyLevelsExt().

Referenced by eraseGroupsAtLevel().

◆ buildInnerBoundaryAlongM1Group()

void MEDFileUMesh::buildInnerBoundaryAlongM1Group ( const std::string &  grpNameM1,
DataArrayIdType *&  nodesDuplicated,
DataArrayIdType *&  cellsModified,
DataArrayIdType *&  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)
  • 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::MEDCouplingUMesh::areCellsIncludedIn(), MEDCoupling::MEDCouplingUMesh::duplicateNodesInConn(), getCoords(), getFamilyFieldAtLevel(), getGroup(), MEDCoupling::MEDFileMesh::getGroupArr(), MEDCoupling::MEDFileMesh::getMaxFamilyId(), getMeshAtLevel(), MEDCoupling::MEDFileMesh::getMinFamilyId(), MEDCoupling::MEDFileMesh::getName(), getNonEmptyLevels(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), setFamilyFieldArr(), and setMeshAtLevel().

◆ unPolyze()

bool MEDFileUMesh::unPolyze ( std::vector< mcIdType > &  oldCode,
std::vector< mcIdType > &  newCode,
DataArrayIdType *&  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]newCoderetrieves 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 getFamilyFieldAtLevel(), getMeshAtLevel(), getNonEmptyLevels(), getNumberFieldAtLevel(), MEDCoupling::MEDFileMesh::PutInThirdComponentOfCodeOffset(), setFamilyFieldArr(), setMeshAtLevel(), and setRenumFieldArr().

◆ zipCoords()

DataArrayIdType * MEDFileUMesh::zipCoords ( )

Array returned is the correspondence 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 correspondence 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 getCoords(), getNonEmptyLevels(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::DataArrayDouble::selectByTupleIdSafe().

◆ computeFetchedNodeIds()

DataArrayIdType * MEDFileUMesh::computeFetchedNodeIds ( ) const

This method is the extension of MEDCouplingUMesh::computeFetchedNodeIds. Except that here all levels are considered here.

Returns
newly allocated array containing all nodes in this that are part of nodal connectivity of at least one cell in this whatever its level.

References getNonEmptyLevels(), and getNumberOfNodes().

◆ deduceNodeSubPartFromCellSubPart()

DataArrayIdType * MEDFileUMesh::deduceNodeSubPartFromCellSubPart ( const std::map< int, MCAuto< DataArrayIdType > > &  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 DataArrayIdType that represents sorted node ids, the extraction is lying on.
See also
MEDFileField1TS::extractPart, MEDFileUMesh::extractPart

References getMeshAtLevel(), getNonEmptyLevels(), and getNumberOfNodes().

◆ extractPart()

MEDFileUMesh * MEDFileUMesh::extractPart ( const std::map< int, MCAuto< DataArrayIdType > > &  extractDef) const

◆ buildExtrudedMesh()

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::MEDFileMesh::checkCartesian(), MEDCoupling::MEDCouplingUMesh::checkConsistencyLight(), MEDCoupling::MEDCouplingUMesh::deepCopy(), MEDCoupling::MEDFileMesh::getGroupArr(), MEDCoupling::MEDFileMesh::getGroupsNames(), getMeshAtLevel(), MEDCoupling::MEDCouplingUMesh::getMeshDimension(), getMeshDimension(), MEDCoupling::MEDFileMesh::getName(), getNonEmptyLevels(), MEDCoupling::MEDCouplingUMesh::getNumberOfCells(), getNumberOfCellsAtLevel(), getNumberOfNodes(), MEDCoupling::MEDCouplingUMesh::MergeUMeshesOnSameCoords(), and New().

◆ linearToQuadratic()

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::MEDFileMesh::checkCartesian(), getFamilyFieldAtLevel(), getMeshAtLevel(), getNonEmptyLevels(), getNumberOfNodes(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), New(), and MEDCoupling::DataArrayDouble::selectByTupleIdSafeSlice().

◆ quadraticToLinear()

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::DataArrayDouble::areIncludedInMe(), MEDCoupling::MEDFileMesh::checkCartesian(), getFamilyFieldAtLevel(), getMeshAtLevel(), getNonEmptyLevels(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

◆ symmetry3DPlane()

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(), and MEDCoupling::DataArrayDouble::symmetry3DPlane().

◆ Aggregate()

MCAuto< MEDFileUMesh > MEDFileUMesh::Aggregate ( const std::vector< const MEDFileUMesh * > &  meshes)
static

Aggregate the given MEDFileUMesh objects into a single mesh. When groups are present, those are merged in such a way that the final mesh contain all of them.

Returns
a new object.

References MEDCoupling::DataArrayDouble::Aggregate(), getMeshDimension(), MEDCoupling::MEDFileMesh::getName(), getNonEmptyLevels(), getSpaceDimension(), MEDCoupling::MEDCouplingUMesh::MergeUMeshes(), and New().

◆ convertToExtrudedMesh()

◆ serialize()

void MEDFileUMesh::serialize ( std::vector< double > &  tinyDouble,
std::vector< mcIdType > &  tinyInt,
std::vector< std::string > &  tinyStr,
std::vector< MCAuto< DataArrayIdType > > &  bigArraysI,
MCAuto< DataArrayDouble > &  bigArrayD 
)

◆ unserialize()

void MEDFileUMesh::unserialize ( std::vector< double > &  tinyDouble,
std::vector< mcIdType > &  tinyInt,
std::vector< std::string > &  tinyStr,
std::vector< MCAuto< DataArrayIdType > > &  bigArraysI,
MCAuto< DataArrayDouble > &  bigArrayD 
)

Friends And Related Function Documentation

◆ MEDFileMesh

friend class MEDFileMesh
friend