Public Member Functions | |
void | addGroup (int meshDimRelToMaxExt, const DataArrayInt *ids) |
void | addNodeGroup (const DataArrayInt *ids) |
std::string | advancedRepr () const |
MEDFileUMesh * | buildExtrudedMesh (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) |
MEDFileMesh * | cartesianize () const |
void | checkConsistency () const |
void | checkSMESHConsistency () const |
void | clearNodeAndCellNumbers () |
void | clearNonDiscrAttributes () const |
MEDCouplingMappedExtrudedMesh * | convertToExtrudedMesh () const |
MEDFileMesh * | createNewEmpty () const |
DataArrayInt * | deduceNodeSubPartFromCellSubPart (const std::map< int, MCAuto< DataArrayInt > > &extractDef) const |
MEDFileUMesh * | deepCopy () const |
void | eraseGroupsAtLevel (int meshDimRelToMaxExt) |
DataArrayInt * | extractFamilyFieldOnGeoType (INTERP_KERNEL::NormalizedCellType gt) const |
DataArrayInt * | extractNumberFieldOnGeoType (INTERP_KERNEL::NormalizedCellType gt) const |
MEDFileUMesh * | extractPart (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 |
DataArrayDouble * | getCoords () const |
std::vector< const BigMemoryObject * > | getDirectChildrenWithNull () const |
MEDCoupling1GTUMesh * | getDirectUndergroundSingleGeoTypeMesh (INTERP_KERNEL::NormalizedCellType gt) const |
std::vector < MEDCoupling1GTUMesh * > | getDirectUndergroundSingleGeoTypeMeshes (int meshDimRelToMax) const |
std::vector< int > | getDistributionOfTypes (int meshDimRelToMax) const |
std::vector< int > | getFamArrNonEmptyLevelsExt () const |
MEDCouplingUMesh * | getFamilies (int meshDimRelToMaxExt, const std::vector< std::string > &fams, bool renum=false) const |
DataArrayInt * | getFamiliesArr (int meshDimRelToMaxExt, const std::vector< std::string > &fams, bool renum=false) const |
MEDCouplingUMesh * | getFamily (int meshDimRelToMaxExt, const std::string &fam, bool renum=false) const |
const DataArrayInt * | getFamilyFieldAtLevel (int meshDimRelToMaxExt) const |
DataArrayInt * | getFamilyFieldAtLevel (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 |
MEDCouplingUMesh * | getGroup (int meshDimRelToMaxExt, const std::string &grp, bool renum=false) const |
MEDCouplingUMesh * | getGroups (int meshDimRelToMaxExt, const std::vector< std::string > &grps, bool renum=false) const |
std::size_t | getHeapMemorySizeWithoutChildren () const |
MEDCouplingUMesh * | getLevel0Mesh (bool renum=false) const |
MEDCouplingUMesh * | getLevelM1Mesh (bool renum=false) const |
MEDCouplingUMesh * | getLevelM2Mesh (bool renum=false) const |
MEDCouplingUMesh * | getLevelM3Mesh (bool renum=false) const |
int | getMaxAbsFamilyIdInArrays () const |
int | getMaxFamilyIdInArrays () const |
MEDCouplingUMesh * | getMeshAtLevel (int meshDimRelToMax, bool renum=false) const |
int | getMeshDimension () const |
int | getMinFamilyIdInArrays () const |
std::vector< int > | getNameArrNonEmptyLevelsExt () const |
const DataArrayAsciiChar * | getNameFieldAtLevel (int meshDimRelToMaxExt) const |
std::vector< int > | getNonEmptyLevels () const |
std::vector< int > | getNonEmptyLevelsExt () const |
std::vector< int > | getNumArrNonEmptyLevelsExt () const |
const DataArrayInt * | getNumberFieldAtLevel (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 DataArrayInt * | getRevNumberFieldAtLevel (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 () |
MEDFileUMesh * | linearToQuadratic (int conversionType=0, double eps=1e-12) const |
void | optimizeFamilies () |
bool | presenceOfStructureElements () const |
MEDFileUMesh * | quadraticToLinear (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) |
MEDFileUMesh * | shallowCpy () const |
std::string | simpleRepr () const |
MCAuto< MEDFileUMesh > | symmetry3DPlane (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 |
DataArrayInt * | zipCoords () |
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 () |
DataArrayInt * | computeAllFamilyIdsInUse () 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) |
DataArrayInt * | getAllFamiliesIdsReferenced () 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 DataArrayInt * | getFamilyArr (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 DataArrayInt * | getGroupArr (int meshDimRelToMaxExt, const std::string &grp, bool renum=false) const |
const std::map< std::string, std::vector< std::string > > & | getGroupInfo () const |
virtual DataArrayInt * | 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< 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 DataArrayInt * | getNodeFamiliesArr (const std::vector< std::string > &fams, bool renum=false) const |
virtual DataArrayInt * | getNodeFamilyArr (const std::string &fam, bool renum=false) const |
virtual DataArrayInt * | getNodeGroupArr (const std::string &grp, bool renum=false) const |
virtual DataArrayInt * | getNodeGroupsArr (const std::vector< std::string > &grps, bool renum=false) const |
int | getNumberOfJoints () const |
DataArrayInt * | getOrCreateAndGetFamilyFieldAtLevel (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< MEDFileUMesh > | Aggregate (const std::vector< const MEDFileUMesh * > &meshes) |
static const char * | GetSpeStr4ExtMesh () |
static 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 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 MEDFileUMesh * | New (const std::string &fileName, const std::string &mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) |
static MEDFileUMesh * | New (med_idt fid, const std::string &mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) |
static MEDFileUMesh * | New (const std::string &fileName, MEDFileMeshReadSelector *mrs=0) |
static MEDFileUMesh * | New (med_idt fid, MEDFileMeshReadSelector *mrs=0) |
static MEDFileUMesh * | New (DataArrayByte *db) |
static MEDFileUMesh * | New (const MEDCouplingMappedExtrudedMesh *mem) |
static MEDFileUMesh * | New () |
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 MEDFileMesh * | New (const std::string &fileName, MEDFileMeshReadSelector *mrs=0) |
static MEDFileMesh * | New (med_idt fid, MEDFileMeshReadSelector *mrs=0) |
static MEDFileMesh * | New (DataArrayByte *db) |
static MEDFileMesh * | New (const std::string &fileName, const std::string &mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0, MEDFileJoints *joints=0) |
static MEDFileMesh * | New (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 |
|
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.
[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. |
If | the file is not readable. |
If | there is no mesh with given attributes in the file. |
If | the mesh in the file is not an unstructured one. |
References New().
|
static |
|
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.
[in] | fileName | - the name of MED file to read. |
If | the file is not readable. |
If | there is no meshes in the file. |
If | the mesh in the file is not an unstructured one. |
References New().
|
static |
|
static |
|
static |
WARNING this implementation is dependant from MEDCouplingMappedExtrudedMesh::buildUnstructured !
References MEDCoupling::MEDCouplingMappedExtrudedMesh::buildUnstructured(), MEDCoupling::MEDCouplingUMesh::deepCopy(), MEDCoupling::MEDCouplingMappedExtrudedMesh::get2DCellIdForExtrusion(), MEDCoupling::MEDCouplingMappedExtrudedMesh::getMesh2D(), GetSpeStr4ExtMesh(), New(), MEDCoupling::MCAuto< T >::retn(), MEDCoupling::MEDFileMesh::setFamilyId(), and setMeshAtLevel().
|
static |
Returns an empty instance of MEDFileUMesh.
Referenced by Aggregate(), buildExtrudedMesh(), extractPart(), linearToQuadratic(), LoadPartOf(), MEDCoupling::MEDFileMesh::New(), New(), quadraticToLinear(), MEDCoupling::WriteMesh(), MEDCoupling::WriteUMesh(), MEDCoupling::WriteUMeshes(), and MEDCoupling::WriteUMeshesPartition().
|
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.
[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. |
References MEDCoupling::CheckFileForRead().
|
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 |
Referenced by convertToExtrudedMesh(), and New().
|
virtual |
Reimplemented from MEDCoupling::MEDFileMesh.
References MEDCoupling::MEDFileMesh::getHeapMemorySizeWithoutChildren().
|
virtual |
Reimplemented from MEDCoupling::MEDFileMesh.
References MEDCoupling::MEDFileMesh::getDirectChildrenWithNull().
|
virtual |
Implements MEDCoupling::MEDFileMesh.
|
virtual |
Implements MEDCoupling::MEDFileMesh.
References MEDCoupling::MEDFileMesh::deepCpyEquivalences(), and MEDCoupling::MCAuto< T >::retn().
Referenced by symmetry3DPlane().
|
virtual |
Implements MEDCoupling::MEDFileMesh.
References MEDCoupling::MCAuto< T >::retn().
|
virtual |
Checks if this and another mesh are equal.
[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. |
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().
if | any internal part (i.e. mesh sub-levels and single geometric-type meshes) are inconsistent |
if | internal family array is inconsistent |
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.
if | the 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.
|
virtual |
Clears redundant attributes of incorporated data arrays.
Reimplemented from MEDCoupling::MEDFileMesh.
References MEDCoupling::MEDFileMesh::clearNonDiscrAttributes().
Referenced by isEqual(), and serialize().
|
virtual |
Reimplemented from MEDCoupling::MEDFileMesh.
References MEDCoupling::MEDFileMesh::setName().
Referenced by Aggregate(), extractPart(), setMeshes(), and MEDCoupling::WriteUMeshesPartition().
const std::vector< MCAuto<MEDFileEltStruct4Mesh> >& MEDCoupling::MEDFileUMesh::getAccessOfUndergroundEltStrs | ( | ) | const |
|
virtual |
Implements MEDCoupling::MEDFileMesh.
References MEDCoupling::DataArrayTemplate< T >::getMaxValue().
|
virtual |
Implements MEDCoupling::MEDFileMesh.
References MEDCoupling::DataArrayTemplate< T >::getMaxValue().
|
virtual |
Implements MEDCoupling::MEDFileMesh.
References MEDCoupling::DataArrayTemplate< T >::getMinValue().
|
virtual |
Returns the dimension on cells in this mesh.
If | there are no cells in this mesh. |
Implements MEDCoupling::MEDFileMesh.
Referenced by Aggregate(), buildExtrudedMesh(), convertToExtrudedMesh(), extractFamilyFieldOnGeoType(), extractNumberFieldOnGeoType(), getDirectUndergroundSingleGeoTypeMesh(), getNumberOfCellsWithType(), getRelativeLevOnGeoType(), setGroupsFromScratch(), and setGroupsOnSetMesh().
int MEDFileUMesh::getSpaceDimension | ( | ) | const |
Returns the space dimension of this mesh that is equal to number of components in the node coordinates array.
If | the node coordinates array is not available. |
References MEDCoupling::DataArray::getNumberOfComponents().
Referenced by Aggregate(), and serialize().
|
virtual |
Returns a string describing this mesh.
Reimplemented from MEDCoupling::MEDFileMesh.
References MEDCoupling::MEDFileMesh::_families, MEDCoupling::MEDFileMesh::getEquivalencesRepr(), MEDCoupling::MEDFileMesh::getFamilyRepr(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArray::getUnitsOnComponent(), MEDCoupling::DataArray::getVarsOnComponent(), and MEDCoupling::MEDFileMesh::simpleRepr().
Referenced by advancedRepr().
|
virtual |
Returns a full textual description of this mesh.
Implements MEDCoupling::MEDFileMesh.
References simpleRepr().
|
virtual |
Returns number of mesh entities of a given relative dimension in this mesh.
[in] | meshDimRelToMaxExt | - the relative dimension of interest. |
If | no mesh entities of dimension meshDimRelToMaxExt are available in this mesh. |
Implements MEDCoupling::MEDFileMesh.
|
virtual |
Returns the family field for mesh entities of a given dimension.
[in] | meshDimRelToMaxExt | - the relative dimension of mesh entities. |
NULL
. Implements MEDCoupling::MEDFileMesh.
Referenced by buildInnerBoundaryAlongM1Group(), extractPart(), linearToQuadratic(), optimizeFamilies(), quadraticToLinear(), and unPolyze().
|
virtual |
Implements MEDCoupling::MEDFileMesh.
|
virtual |
Returns the optional numbers of mesh entities of a given dimension.
[in] | meshDimRelToMaxExt | - the relative dimension of mesh entities. |
If | there 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().
|
virtual |
Returns the optional numbers of mesh entities of a given dimension transformed using DataArrayInt::invertArrayN2O2O2N().
[in] | meshDimRelToMaxExt | - the relative dimension of mesh entities. |
If | there are no mesh entities of meshDimRelToMaxExt dimension in this mesh. |
Implements MEDCoupling::MEDFileMesh.
|
virtual |
Implements MEDCoupling::MEDFileMesh.
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).
[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. |
|
virtual |
Implements MEDCoupling::MEDFileMesh.
References MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().
Referenced by buildExtrudedMesh(), deduceNodeSubPartFromCellSubPart(), getAllDistributionOfTypes(), and linearToQuadratic().
|
virtual |
Implements MEDCoupling::MEDFileMesh.
Referenced by buildExtrudedMesh().
|
virtual |
Implements MEDCoupling::MEDFileMesh.
|
virtual |
Implements MEDCoupling::MEDFileMesh.
|
virtual |
Implements MEDCoupling::MEDFileMesh.
|
virtual |
Given a relative level meshDimRelToMax it returns the sorted vector of geometric types present in this.
if | the reqsuested meshDimRelToMax does not exist. |
Implements MEDCoupling::MEDFileMesh.
Referenced by getAllDistributionOfTypes().
|
virtual |
Implements MEDCoupling::MEDFileMesh.
References getMeshDimension().
Referenced by getAllDistributionOfTypes().
|
virtual |
Implements MEDCoupling::MEDFileMesh.
References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::MEDCouplingPointSet::buildPartOfMySelf(), MEDCoupling::MEDCouplingPointSet::computeNodeIdsAlg(), MEDCoupling::DataArrayTemplate< T >::end(), getDirectUndergroundSingleGeoTypeMesh(), and MEDCoupling::MEDFileFieldGlobsReal::getProfile().
|
virtual |
|
virtual |
Implements MEDCoupling::MEDFileMesh.
|
virtual |
Reimplemented from MEDCoupling::MEDFileMesh.
|
virtual |
Returns relative dimensions of mesh entities (excluding nodes) present in this mesh.
Implements MEDCoupling::MEDFileMesh.
Referenced by Aggregate(), buildExtrudedMesh(), buildInnerBoundaryAlongM1Group(), deduceNodeSubPartFromCellSubPart(), extractPart(), getAllDistributionOfTypes(), getFamsNonEmptyLevels(), getNonEmptyLevelsExt(), linearToQuadratic(), quadraticToLinear(), removeMeshAtLevel(), serialize(), unPolyze(), and zipCoords().
|
virtual |
Returns relative dimensions of mesh entities (including nodes) present in this mesh.
Implements MEDCoupling::MEDFileMesh.
References getNonEmptyLevels().
Referenced by addGroup(), and optimizeFamilies().
|
virtual |
Implements MEDCoupling::MEDFileMesh.
|
virtual |
Implements MEDCoupling::MEDFileMesh.
|
virtual |
Implements MEDCoupling::MEDFileMesh.
|
virtual |
Returns all relative mesh levels (excluding nodes) where given families are defined. To include nodes, call getFamsNonEmptyLevelsExt() method.
[in] | fams | - the name of the family of interest. |
Implements MEDCoupling::MEDFileMesh.
References MEDCoupling::MEDFileMesh::getFamiliesIds(), and getNonEmptyLevels().
Referenced by getFamsNonEmptyLevelsExt().
|
virtual |
Returns all relative mesh levels (including nodes) where given families are defined.
[in] | fams | - the names of the families of interest. |
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.
[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. |
If | the name of a nonexistent group is specified. |
If | there 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.
[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. |
If | a name of a nonexistent group is present in grps. |
If | there 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.
[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. |
If | a name of a nonexistent family is present in grps. |
If | there 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.
[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. |
If | a name of a nonexistent family is present in fams. |
If | there 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().
|
virtual |
Returns ids of mesh entities contained in given families of a given dimension.
[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. |
If | the family field is missing for meshDimRelToMaxExt. |
Implements MEDCoupling::MEDFileMesh.
References MEDCoupling::MEDFileMesh::getFamiliesIds(), and MEDCoupling::MCAuto< T >::retn().
Referenced by getFamilies().
|
virtual |
Returns a MEDCouplingUMesh of a given relative dimension.
[in] | meshDimRelToMax | - the relative dimension of interest. |
[in] | renum | - if true , the returned mesh is permuted according to the optional numbers of mesh entities. |
If | there 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().
|
virtual |
Reimplemented from MEDCoupling::MEDFileMesh.
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)
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.
[in] | renum | - if true , the returned mesh is permuted according to the optional numbers of mesh entities. |
If | there 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.
[in] | renum | - if true , the returned mesh is permuted according to the optional numbers of mesh entities. |
If | there 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.
[in] | renum | - if true , the returned mesh is permuted according to the optional numbers of mesh entities. |
If | there 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.
[in] | renum | - if true , the returned mesh is permuted according to the optional numbers of mesh entities. |
If | there 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.
[in] | gt | - the geometric type for which the family field is asked. |
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.
[in] | gt | - the geometric type for which the number field is asked. |
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.
[in] | id | - the id of the family of interest. |
[in] | newFamName | - the new family name. |
If | no 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.
[in] | coords | - the new node coordinates array. |
If | coords == 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.
[in] | meshDimRelToMaxExt | - the relative dimension of interest. |
If | there are no mesh entities of meshDimRelToMaxExt dimension in this mesh. |
References optimizeFamilies().
|
virtual |
Sets the family field of a given relative dimension.
[in] | meshDimRelToMaxExt | - the relative dimension of entities for which the family field is set. |
[in] | famArr | - the array of the family field. |
If | there are no mesh entities of meshDimRelToMaxExt dimension in this mesh. |
If | famArr 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().
|
virtual |
Sets the optional numbers of mesh entities of a given dimension.
[in] | meshDimRelToMaxExt | - the relative dimension of mesh entities. |
[in] | renumArr | - the array of the numbers. |
If | there are no mesh entities of meshDimRelToMaxExt dimension in this mesh. |
If | renumArr has an invalid size. |
Implements MEDCoupling::MEDFileMesh.
References MEDCoupling::DataArray::checkNbOfTuplesAndComp(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::RefCountObjectOnly::incrRef().
Referenced by Aggregate(), and unPolyze().
|
virtual |
Sets the optional names of mesh entities of a given dimension.
[in] | meshDimRelToMaxExt | - the relative dimension of mesh entities. |
[in] | nameArr | - the array of the names. |
If | there are no mesh entities of meshDimRelToMaxExt dimension in this mesh. |
If | nameArr has an invalid size. |
Implements MEDCoupling::MEDFileMesh.
References MEDCoupling::DataArray::checkNbOfTuplesAndComp(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::RefCountObjectOnly::incrRef().
|
virtual |
Adds a group of nodes to this mesh.
[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). |
If | the node coordinates array is not set. |
If | ids == NULL . |
If | ids->getName() == "". |
If | ids does not respect the MED file norm. |
If | a 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().
|
virtual |
Adds a group of nodes/cells/faces/edges to this mesh.
[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). |
If | the node coordinates array is not set. |
If | ids == NULL . |
If | ids->getName() == "". |
If | ids does not respect the MED file norm. |
If | a 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.
[in] | meshDimRelToMax | - the relative dimension of interest. |
If | there 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.
[in] | meshDimRelToMax | - a relative level to set the mesh at. |
[in] | m | - the new mesh to set. |
If | the name or the description of this mesh and m are not empty and are different. |
If | the node coordinates array is set this in mesh and m refers to another node coordinates array. |
If | the 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.
[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. |
If | the name or the description of this mesh and m are not empty and are different. |
If | the node coordinates array is set this in mesh and m refers to another node coordinates array. |
If | the 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.
[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. |
If | there is a null pointer in ms. |
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.
[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. |
If | ms is empty. |
If | dimension of meshes in ms does not correspond to meshDimRelToMax or to the existing meshes of other levels of this mesh. |
If | the meshes in ms do not share the same node coordinates array. |
If | the node coordinates array of this mesh (if any) is not the same as that of the given meshes. |
If | ms[ i ] is not well defined (MEDCouplingUMesh::checkConsistencyLight()). |
If | names of some meshes in ms are equal. |
If | ms 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.
[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. |
If | ms is empty. |
If | dimension of meshes in ms does not correspond to meshDimRelToMax or to the existing meshes of other levels of this mesh. |
If | the meshes in ms do not share the same node coordinates array. |
If | the node coordinates array of this mesh (if any) is not the same as that of the given meshes. |
If | ms[ i ] is not well defined (MEDCouplingUMesh::checkConsistencyLight()). |
If | names of some meshes in ms are equal. |
If | ms includes a mesh with an empty name. |
References MEDCoupling::MEDCouplingUMesh::areCellsIncludedIn(), getMeshAtLevel(), getMeshDimension(), MEDCoupling::RefCountObjectOnly::incrRef(), and MEDCoupling::MEDFileMesh::setGroupsAtLevel().
void MEDFileUMesh::optimizeFamilies | ( | ) |
Removes all families with ids not present in the family fields of this mesh.
References MEDCoupling::MEDFileMesh::_families, MEDCoupling::MEDFileMesh::_groups, MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::end(), MEDCoupling::DataArrayInt::getDifferentValues(), getFamilyFieldAtLevel(), and getNonEmptyLevelsExt().
Referenced by eraseGroupsAtLevel().
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:
[in] | grpNameM1 | name of the (-1)-level group defining the boundary |
[out] | nodesDuplicated | ids of the initial nodes which have been duplicated (and whose copy is put at the end of the coord array) |
[out] | cellsModified | ids of the cells whose connectivity has been modified (to use the newly created nodes) |
[out] | cellsNotModified | ids of the rest of cells bordering the new boundary whose connectivity remains unchanged. |
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().
|
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.
[out] | oldCode | retrieves the distribution of types before the call if true is returned |
[out] | newCode | etrieves the distribution of types after the call if true is returned |
[out] | o2nRenumCell | tells for all levels the old 2 new renumbering of cells. |
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.
NULL
pointer is returned and nothing is modified in this. If | no 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.
References MEDCoupling::DataArrayInt::BuildListOfSwitchedOn(), MEDCoupling::MEDCouplingUMesh::buildPartOfMySelf(), MEDCoupling::MEDCouplingUMesh::computeNodeIdsAlg(), getMeshAtLevel(), getNonEmptyLevels(), and getNumberOfNodes().
MEDFileUMesh * MEDFileUMesh::extractPart | ( | const std::map< int, MCAuto< DataArrayInt > > & | extractDef | ) | const |
This method returns a new MEDFileUMesh that is the result of the extraction of cells/nodes in this.
References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::MEDCouplingUMesh::buildPartOfMySelf(), MEDCoupling::MEDFileMesh::copyFamGrpMapsFrom(), getCoords(), getFamilyFieldAtLevel(), getMeshAtLevel(), MEDCoupling::MEDFileMesh::getName(), getNonEmptyLevels(), getNumberFieldAtLevel(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), New(), MEDCoupling::MCAuto< T >::retn(), MEDCoupling::DataArrayDouble::selectByTupleIdSafe(), MEDCoupling::DataArrayInt::selectByTupleIdSafe(), setCoords(), setFamilyFieldArr(), setMeshAtLevel(), and setName().
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.
[in] | m1D | - the mesh defining the extrusion path. |
[in] | policy | - defines the policy of extrusion (see MEDCouplingUMesh::buildExtrudedMesh for more details) |
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.
[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. |
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.
[in] | eps | - detection threshold for coordinates. |
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.
References deepCopy(), getCoords(), setCoordsForced(), and MEDCoupling::DataArrayDouble::symmetry3DPlane().
|
static |
References MEDCoupling::DataArrayDouble::Aggregate(), MEDCoupling::DataArrayInt::Aggregate(), getMeshDimension(), MEDCoupling::MEDFileMesh::getName(), getNonEmptyLevels(), getSpaceDimension(), MEDCoupling::MEDCouplingUMesh::MergeUMeshes(), New(), MEDCoupling::DataArrayTemplate< T >::renumberInPlace(), MEDCoupling::MEDCouplingPointSet::setCoords(), setCoords(), setFamilyFieldArr(), MEDCoupling::MEDFileMesh::setFamilyInfo(), MEDCoupling::MEDFileMesh::setGroupInfo(), setMeshAtLevel(), MEDCoupling::MEDCouplingMesh::setName(), setName(), setRenumFieldArr(), and MEDCoupling::MEDCouplingUMesh::sortCellsInMEDFileFrmt().
Referenced by MEDCoupling::MEDFileData::Aggregate().
MEDCouplingMappedExtrudedMesh * MEDFileUMesh::convertToExtrudedMesh | ( | ) | const |
void MEDFileUMesh::serialize | ( | std::vector< double > & | tinyDouble, |
std::vector< int > & | tinyInt, | ||
std::vector< std::string > & | tinyStr, | ||
std::vector< MCAuto< DataArrayInt > > & | bigArraysI, | ||
MCAuto< DataArrayDouble > & | bigArrayD | ||
) |
References MEDCoupling::MEDFileMesh::_desc_name, MEDCoupling::MEDFileMesh::_families, MEDCoupling::MEDFileMesh::_groups, MEDCoupling::MEDFileMesh::_iteration, MEDCoupling::MEDFileMesh::_name, MEDCoupling::MEDFileMesh::_order, MEDCoupling::MEDFileMesh::_time, clearNonDiscrAttributes(), forceComputationOfParts(), MEDCoupling::MEDFileMesh::getAxisType(), getNonEmptyLevels(), and getSpaceDimension().
void MEDFileUMesh::unserialize | ( | std::vector< double > & | tinyDouble, |
std::vector< int > & | tinyInt, | ||
std::vector< std::string > & | tinyStr, | ||
std::vector< MCAuto< DataArrayInt > > & | bigArraysI, | ||
MCAuto< DataArrayDouble > & | bigArrayD | ||
) |
References MEDCoupling::MEDFileMesh::_desc_name, MEDCoupling::MEDFileMesh::_families, MEDCoupling::MEDFileMesh::_groups, MEDCoupling::MEDFileMesh::_iteration, MEDCoupling::MEDFileMesh::_name, MEDCoupling::MEDFileMesh::_order, MEDCoupling::MEDFileMesh::_time, MEDCoupling::DataArrayTemplate< T >::rearrange(), and MEDCoupling::MEDFileMesh::setAxisType().
|
friend |