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

Public Member Functions

std::string advancedRepr () const
 
MEDCouplingIMeshasSingleCell () const
 
MEDCouplingStructuredMeshbuildStructuredSubPart (const std::vector< std::pair< mcIdType, mcIdType > > &cellPart) const
 
MEDCouplingIMeshbuildWithGhost (mcIdType ghostLev) const
 
void checkConsistency (double eps=1e-12) const
 
void checkConsistencyLight () const
 
void checkDeepEquivalOnSameNodesWith (const MEDCouplingMesh *other, int cellCompPol, double prec, DataArrayIdType *&cellCor) const
 
void checkDeepEquivalWith (const MEDCouplingMesh *other, int cellCompPol, double prec, DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const
 
MEDCouplingIMeshclone (bool recDeepCpy) const
 
DataArrayDoublecomputeCellCenterOfMass () const
 
DataArrayDoublecomputeIsoBarycenterOfNodesPerCell () const
 
MEDCouplingCMeshconvertToCartesian () const
 
void copyTinyStringsFrom (const MEDCouplingMesh *other)
 
MEDCouplingIMeshdeepCopy () const
 
std::string getAxisUnit () const
 
void getBoundingBox (double *bbox) const
 
mcIdType getCellContainingPoint (const double *pos, double eps) const
 
void getCellsContainingPoint (const double *pos, double eps, std::vector< mcIdType > &elts) const
 
std::string getClassName () const override
 
DataArrayDoublegetCoordinatesAndOwner () const
 
void getCoordinatesOfNode (mcIdType nodeId, std::vector< double > &coo) const
 
const DataArrayDoublegetDirectAccessOfCoordsArrIfInStructure () const
 
std::vector< const BigMemoryObject * > getDirectChildrenWithNull () const
 
std::vector< double > getDXYZ () const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
MEDCouplingFieldDoublegetMeasureField (bool isAbs) const
 
MEDCouplingFieldDoublegetMeasureFieldOnNode (bool isAbs) const
 
double getMeasureOfAnyCell () const
 
std::vector< mcIdType > getNodeGridStructure () const
 
void getNodeGridStructure (mcIdType *res) const
 
std::vector< mcIdType > getNodeStruct () const
 
std::vector< double > getOrigin () const
 
int getSpaceDimension () const
 
void getTinySerializationInformation (std::vector< double > &tinyInfoD, std::vector< mcIdType > &tinyInfo, std::vector< std::string > &littleStrings) const
 
MEDCouplingMeshType getType () const
 
std::string getVTKFileExtension () const
 
bool isEqualIfNotWhy (const MEDCouplingMesh *other, double prec, std::string &reason) const
 
bool isEqualWithoutConsideringStr (const MEDCouplingMesh *other, double prec) const
 
MEDCouplingMeshmergeMyselfWith (const MEDCouplingMesh *other) const
 
void refineWithFactor (const std::vector< mcIdType > &factors)
 
void renumberCells (const mcIdType *old2NewBg, bool check=true)
 
void reprQuickOverview (std::ostream &stream) const
 
void resizeForUnserialization (const std::vector< mcIdType > &tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector< std::string > &littleStrings) const
 
void rotate (const double *center, const double *vector, double angle)
 
void scale (const double *point, double factor)
 
void serialize (DataArrayIdType *&a1, DataArrayDouble *&a2) const
 
void setAxisUnit (const std::string &unitName)
 
void setDXYZ (const double *dxyzStart, const double *dxyzStop)
 
void setNodeStruct (const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop)
 
void setOrigin (const double *originStart, const double *originStop)
 
void setSpaceDimension (int spaceDim)
 
std::string simpleRepr () const
 
void translate (const double *vector)
 
void unserialization (const std::vector< double > &tinyInfoD, const std::vector< mcIdType > &tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2, const std::vector< std::string > &littleStrings)
 
void updateTime () const
 
- Public Member Functions inherited from MEDCoupling::MEDCouplingStructuredMesh
MEDCoupling1SGTUMeshbuild1SGTSubLevelMesh () const
 
MEDCoupling1SGTUMeshbuild1SGTUnstructured () const
 
MEDCouplingFieldDoublebuildOrthogonalField () const
 
MEDCouplingMeshbuildPart (const mcIdType *start, const mcIdType *end) const
 
MEDCouplingMeshbuildPartAndReduceNodes (const mcIdType *start, const mcIdType *end, DataArrayIdType *&arr) const
 
MEDCouplingUMeshbuildUnstructured () const
 
DataArrayIdType * checkTypeConsistencyAndContig (const std::vector< mcIdType > &code, const std::vector< const DataArrayIdType * > &idsPerType) const
 
DataArrayIdType * computeEffectiveNbOfNodesPerCell () const
 
DataArrayIdType * computeNbOfFacesPerCell () const
 
DataArrayIdType * computeNbOfNodesPerCell () const
 
double computeSquareness () const
 
void copyTinyStringsFrom (const MEDCouplingMesh *other)
 
std::set< INTERP_KERNEL::NormalizedCellType > getAllGeoTypes () const
 
std::vector< mcIdType > getCellGridStructure () const
 
mcIdType getCellIdFromPos (mcIdType i, mcIdType j, mcIdType k) const
 
std::vector< mcIdType > getDistributionOfTypes () const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
std::vector< mcIdType > getLocationFromCellId (mcIdType cellId) const
 
std::vector< mcIdType > getLocationFromNodeId (mcIdType nodeId) const
 
int getMeshDimension () const
 
mcIdType getNodeIdFromPos (mcIdType i, mcIdType j, mcIdType k) const
 
void getNodeIdsOfCell (mcIdType cellId, std::vector< mcIdType > &conn) const
 
mcIdType getNumberOfCells () const
 
mcIdType getNumberOfCellsOfSubLevelMesh () const
 
mcIdType getNumberOfCellsWithType (INTERP_KERNEL::NormalizedCellType type) const
 
mcIdType getNumberOfNodes () const
 
void getReverseNodalConnectivity (DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const
 
int getSpaceDimensionOnNodeStruct () const
 
virtual void getSplitCellValues (mcIdType *res) const
 
virtual void getSplitNodeValues (mcIdType *res) const
 
INTERP_KERNEL::NormalizedCellType getTypeOfCell (mcIdType cellId) const
 
DataArrayIdType * giveCellsWithType (INTERP_KERNEL::NormalizedCellType type) const
 
bool isEqualIfNotWhy (const MEDCouplingMesh *other, double prec, std::string &reason) const
 
DataArrayIdType * simplexize (int policy)
 
void splitProfilePerType (const DataArrayIdType *profile, std::vector< mcIdType > &code, std::vector< DataArrayIdType * > &idsInPflPerType, std::vector< DataArrayIdType * > &idsPerType, bool smartPflKiller=true) const
 
- Public Member Functions inherited from MEDCoupling::MEDCouplingMesh
virtual bool areCompatibleForMerge (const MEDCouplingMesh *other) const
 
virtual MEDCouplingMeshbuildPartRange (mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const
 
virtual MEDCouplingMeshbuildPartRangeAndReduceNodes (mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType &beginOut, mcIdType &endOut, mcIdType &stepOut, DataArrayIdType *&arr) const
 
virtual void checkFastEquivalWith (const MEDCouplingMesh *other, double prec) const
 
void checkGeoEquivalWith (const MEDCouplingMesh *other, int levOfCheck, double prec, DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const
 
virtual MCAuto< DataArrayDoublecomputeMeshCenterOfMass () const
 
virtual void copyTinyInfoFrom (const MEDCouplingMesh *other)
 
virtual MEDCouplingFieldDoublefillFromAnalytic (TypeOfField t, int nbOfComp, const std::string &func) const
 
virtual MEDCouplingFieldDoublefillFromAnalytic (TypeOfField t, int nbOfComp, FunctionToEvaluate func) const
 
virtual MEDCouplingFieldDoublefillFromAnalyticCompo (TypeOfField t, int nbOfComp, const std::string &func) const
 
virtual MEDCouplingFieldDoublefillFromAnalyticNamedCompo (TypeOfField t, int nbOfComp, const std::vector< std::string > &varsOrder, const std::string &func) const
 
virtual DataArrayIdType * getCellIdsFullyIncludedInNodeIds (const mcIdType *partBg, const mcIdType *partEnd) const
 
virtual void getCellsContainingPoints (const double *pos, mcIdType nbOfPoints, double eps, MCAuto< DataArrayIdType > &elts, MCAuto< DataArrayIdType > &eltsIndex) const
 
virtual void getCellsContainingPointsLinearPartOnlyOnNonDynType (const double *pos, mcIdType nbOfPoints, double eps, MCAuto< DataArrayIdType > &elts, MCAuto< DataArrayIdType > &eltsIndex) const
 
std::string getDescription () const
 
std::string getName () const
 
double getTime (int &iteration, int &order) const
 
std::string getTimeUnit () const
 
std::string getVTKFileNameOf (const std::string &fileName) const
 
virtual bool isEqual (const MEDCouplingMesh *other, double prec) const
 
bool isStructured () const
 
void setDescription (const std::string &descr)
 
void setName (const std::string &name)
 
void setTime (double val, int iteration, int order)
 
void setTimeUnit (const std::string &unit)
 
std::string writeVTK (const std::string &fileName, bool isBinary=true) const
 
- 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 ()
 
- Public Member Functions inherited from MEDCoupling::TimeLabel
void declareAsNew () const
 
std::size_t getTimeOfThis () const
 
TimeLabeloperator= (const TimeLabel &other)
 
 TimeLabel (const TimeLabel &other)=default
 

Static Public Member Functions

static void CondenseFineToCoarse (const std::vector< mcIdType > &coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair< mcIdType, mcIdType > > &fineLocInCoarse, const std::vector< mcIdType > &facts, DataArrayDouble *coarseDA)
 
static void CondenseFineToCoarseGhost (const std::vector< mcIdType > &coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair< mcIdType, mcIdType > > &fineLocInCoarse, const std::vector< mcIdType > &facts, DataArrayDouble *coarseDA, mcIdType ghostSize)
 
static MEDCouplingIMeshNew ()
 
static MEDCouplingIMeshNew (const std::string &meshName, int spaceDim, const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop, const double *originStart, const double *originStop, const double *dxyzStart, const double *dxyzStop)
 
static void SpreadCoarseToFine (const DataArrayDouble *coarseDA, const std::vector< mcIdType > &coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair< mcIdType, mcIdType > > &fineLocInCoarse, const std::vector< mcIdType > &facts)
 
static void SpreadCoarseToFineGhost (const DataArrayDouble *coarseDA, const std::vector< mcIdType > &coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair< mcIdType, mcIdType > > &fineLocInCoarse, const std::vector< mcIdType > &facts, mcIdType ghostSize)
 
static void SpreadCoarseToFineGhostZone (const DataArrayDouble *coarseDA, const std::vector< mcIdType > &coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair< mcIdType, mcIdType > > &fineLocInCoarse, const std::vector< mcIdType > &facts, mcIdType ghostSize)
 
- Static Public Member Functions inherited from MEDCoupling::MEDCouplingStructuredMesh
static void ApplyGhostOnCompactFrmt (std::vector< std::pair< mcIdType, mcIdType > > &partBeforeFact, mcIdType ghostSize)
 
static bool AreRangesIntersect (const std::vector< std::pair< mcIdType, mcIdType > > &r1, const std::vector< std::pair< mcIdType, mcIdType > > &r2)
 
static void AssignPartOfFieldOfDoubleUsing (const std::vector< mcIdType > &st, DataArrayDouble *fieldOfDbl, const std::vector< std::pair< mcIdType, mcIdType > > &partCompactFormat, const DataArrayDouble *other)
 
static DataArrayIdType * Build1GTNodalConnectivity (const mcIdType *nodeStBg, const mcIdType *nodeStEnd)
 
static DataArrayIdType * Build1GTNodalConnectivityOfSubLevelMesh (const mcIdType *nodeStBg, const mcIdType *nodeStEnd)
 
static DataArrayIdType * BuildExplicitIdsFrom (const std::vector< mcIdType > &st, const std::vector< std::pair< mcIdType, mcIdType > > &partCompactFormat)
 
static void ChangeReferenceFromGlobalOfCompactFrmt (const std::vector< std::pair< mcIdType, mcIdType > > &bigInAbs, const std::vector< std::pair< mcIdType, mcIdType > > &partOfBigInAbs, std::vector< std::pair< mcIdType, mcIdType > > &partOfBigRelativeToBig, bool check=true)
 
static void ChangeReferenceToGlobalOfCompactFrmt (const std::vector< std::pair< mcIdType, mcIdType > > &bigInAbs, const std::vector< std::pair< mcIdType, mcIdType > > &partOfBigRelativeToBig, std::vector< std::pair< mcIdType, mcIdType > > &partOfBigInAbs, bool check=true)
 
static DataArrayIdType * ComputeCornersGhost (const std::vector< mcIdType > &st, mcIdType ghostLev)
 
static std::vector< std::vector< mcIdType > > ComputeSignaturePerAxisOf (const std::vector< mcIdType > &st, const std::vector< bool > &crit)
 
static mcIdType DeduceNumberOfGivenRangeInCompactFrmt (const std::vector< std::pair< mcIdType, mcIdType > > &partCompactFormat)
 
static mcIdType DeduceNumberOfGivenStructure (const std::vector< mcIdType > &st)
 
static void ExtractFieldOfBoolFrom (const std::vector< mcIdType > &st, const std::vector< bool > &fieldOfBool, const std::vector< std::pair< mcIdType, mcIdType > > &partCompactFormat, std::vector< bool > &fieldOut)
 
static DataArrayDoubleExtractFieldOfDoubleFrom (const std::vector< mcIdType > &st, const DataArrayDouble *fieldOfDbl, const std::vector< std::pair< mcIdType, mcIdType > > &partCompactFormat)
 
static mcIdType FindMinimalPartOf (mcIdType minPatchLgth, const std::vector< mcIdType > &st, const std::vector< bool > &crit, std::vector< bool > &reducedCrit, std::vector< std::pair< mcIdType, mcIdType > > &partCompactFormat)
 
static void FindTheWidestAxisOfGivenRangeInCompactFrmt (const std::vector< std::pair< mcIdType, mcIdType > > &partCompactFormat, int &axisId, mcIdType &sizeOfRange)
 
static std::vector< mcIdType > FindTranslationFrom (const std::vector< std::pair< mcIdType, mcIdType > > &startingFrom, const std::vector< std::pair< mcIdType, mcIdType > > &goingTo)
 
static std::vector< std::pair< mcIdType, mcIdType > > GetCompactFrmtFromDimensions (const std::vector< mcIdType > &dims)
 
static std::vector< mcIdType > GetDimensionsFromCompactFrmt (const std::vector< std::pair< mcIdType, mcIdType > > &partCompactFormat)
 
static INTERP_KERNEL::NormalizedCellType GetGeoTypeGivenMeshDimension (int meshDim)
 
static void GetPosFromId (mcIdType eltId, int meshDim, const mcIdType *split, mcIdType *res)
 
static std::vector< mcIdType > GetSplitVectFromStruct (const std::vector< mcIdType > &strct)
 
static std::vector< std::pair< mcIdType, mcIdType > > IntersectRanges (const std::vector< std::pair< mcIdType, mcIdType > > &r1, const std::vector< std::pair< mcIdType, mcIdType > > &r2)
 
static bool IsPartStructured (const mcIdType *startIds, const mcIdType *stopIds, const std::vector< mcIdType > &st, std::vector< std::pair< mcIdType, mcIdType > > &partCompactFormat)
 
static void MultiplyPartOf (const std::vector< mcIdType > &st, const std::vector< std::pair< mcIdType, mcIdType > > &part, double factor, DataArrayDouble *da)
 
static void MultiplyPartOfByGhost (const std::vector< mcIdType > &st, const std::vector< std::pair< mcIdType, mcIdType > > &part, mcIdType ghostSize, double factor, DataArrayDouble *da)
 
static void PutInGhostFormat (mcIdType ghostSize, const std::vector< mcIdType > &st, const std::vector< std::pair< mcIdType, mcIdType > > &part, std::vector< mcIdType > &stWithGhost, std::vector< std::pair< mcIdType, mcIdType > > &partWithGhost)
 
static void SwitchOnIdsFrom (const std::vector< mcIdType > &st, const std::vector< std::pair< mcIdType, mcIdType > > &partCompactFormat, std::vector< bool > &vectToSwitchOn)
 
static std::vector< std::pair< mcIdType, mcIdType > > TranslateCompactFrmt (const std::vector< std::pair< mcIdType, mcIdType > > &part, const std::vector< mcIdType > &translation)
 
- Static Public Member Functions inherited from MEDCoupling::MEDCouplingMesh
static INTERP_KERNEL::NormalizedCellType GetCorrespondingPolyType (INTERP_KERNEL::NormalizedCellType type)
 
static int GetDimensionOfGeometricType (INTERP_KERNEL::NormalizedCellType type)
 
static mcIdType GetNumberOfNodesOfGeometricType (INTERP_KERNEL::NormalizedCellType type)
 
static const char * GetReprOfGeometricType (INTERP_KERNEL::NormalizedCellType type)
 
static bool IsLinearGeometricType (INTERP_KERNEL::NormalizedCellType type)
 
static bool IsStaticGeometricType (INTERP_KERNEL::NormalizedCellType type)
 
static MEDCouplingMeshMergeMeshes (const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2)
 
static MEDCouplingMeshMergeMeshes (std::vector< const MEDCouplingMesh * > &meshes)
 
- Static Public Member Functions inherited from MEDCoupling::BigMemoryObject
static std::size_t GetHeapMemorySizeOfObjs (const std::vector< const BigMemoryObject * > &objs)
 

Additional Inherited Members

- Protected Member Functions inherited from MEDCoupling::MEDCouplingStructuredMesh
 MEDCouplingStructuredMesh ()
 
 MEDCouplingStructuredMesh (const MEDCouplingStructuredMesh &other, bool deepCpy)
 
 ~MEDCouplingStructuredMesh ()
 
- Protected Member Functions inherited from MEDCoupling::MEDCouplingMesh
 MEDCouplingMesh ()
 
 MEDCouplingMesh (const MEDCouplingMesh &other)
 
virtual ~MEDCouplingMesh ()
 
- 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 ()
 
- Protected Member Functions inherited from MEDCoupling::TimeLabel
void forceTimeOfThis (const TimeLabel &other) const
 
 TimeLabel ()
 
void updateTimeWith (const TimeLabel &other) const
 
virtual ~TimeLabel ()
 
- Static Protected Member Functions inherited from MEDCoupling::MEDCouplingStructuredMesh
static int ZipNodeStructure (const mcIdType *nodeStBg, const mcIdType *nodeStEnd, mcIdType zipNodeSt[3])
 

Member Function Documentation

◆ New() [1/2]

◆ New() [2/2]

MEDCouplingIMesh * MEDCouplingIMesh::New ( const std::string &  meshName,
int  spaceDim,
const mcIdType *  nodeStrctStart,
const mcIdType *  nodeStrctStop,
const double *  originStart,
const double *  originStop,
const double *  dxyzStart,
const double *  dxyzStop 
)
static

◆ getClassName()

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

Reimplemented from MEDCoupling::BigMemoryObject.

◆ setSpaceDimension()

void MEDCouplingIMesh::setSpaceDimension ( int  spaceDim)

◆ setNodeStruct()

void MEDCouplingIMesh::setNodeStruct ( const mcIdType *  nodeStrctStart,
const mcIdType *  nodeStrctStop 
)

◆ getNodeStruct()

std::vector< mcIdType > MEDCouplingIMesh::getNodeStruct ( ) const

◆ setOrigin()

void MEDCouplingIMesh::setOrigin ( const double *  originStart,
const double *  originStop 
)

◆ getOrigin()

std::vector< double > MEDCouplingIMesh::getOrigin ( ) const

◆ setDXYZ()

void MEDCouplingIMesh::setDXYZ ( const double *  dxyzStart,
const double *  dxyzStop 
)

◆ getDXYZ()

std::vector< double > MEDCouplingIMesh::getDXYZ ( ) const

◆ setAxisUnit()

void MEDCouplingIMesh::setAxisUnit ( const std::string &  unitName)

◆ getAxisUnit()

std::string MEDCouplingIMesh::getAxisUnit ( ) const

◆ getMeasureOfAnyCell()

double MEDCouplingIMesh::getMeasureOfAnyCell ( ) const

This method returns the measure of any cell in this. This specific method of image grid mesh utilizes the fact that any cell in this have the same measure. The value returned by this method is those used to feed the returned field in the MEDCouplingIMesh::getMeasureField.

See also
getMeasureField

References checkConsistencyLight(), and getSpaceDimension().

Referenced by getMeasureField().

◆ convertToCartesian()

MEDCouplingCMesh * MEDCouplingIMesh::convertToCartesian ( ) const

This method is allows to convert this into MEDCouplingCMesh instance. This method is the middle level between MEDCouplingIMesh and the most general MEDCouplingUMesh. This method is useful for MED writers that do not have still the image grid support.

See also
MEDCouplingMesh::buildUnstructured

References checkConsistencyLight(), getSpaceDimension(), MEDCoupling::MEDCouplingCMesh::New(), and MEDCoupling::DataArrayDouble::New().

◆ refineWithFactor()

void MEDCouplingIMesh::refineWithFactor ( const std::vector< mcIdType > &  factors)

This method refines this uniformaly along all of its dimensions. In case of success the space covered by this will remain the same before the invocation except that the number of cells will be multiplied by factor ^ this->getMeshDimension(). The origin of this will be not touched only spacing and node structure will be changed. This method can be useful for AMR users.

References checkConsistencyLight(), and MEDCoupling::TimeLabel::declareAsNew().

◆ asSingleCell()

MEDCouplingIMesh * MEDCouplingIMesh::asSingleCell ( ) const

This method returns a newly created mesh containing a single cell in it. This returned cell covers exactly the space covered by this.

Returns
MEDCouplingIMesh * - A newly created object (to be managed by the caller with decrRef) containing simply one cell.
Exceptions
ifthis does not pass the checkConsistencyLight test.

References checkConsistencyLight(), MEDCoupling::MEDCouplingMesh::getName(), getSpaceDimension(), and New().

◆ CondenseFineToCoarse()

void MEDCouplingIMesh::CondenseFineToCoarse ( const std::vector< mcIdType > &  coarseSt,
const DataArrayDouble fineDA,
const std::vector< std::pair< mcIdType, mcIdType > > &  fineLocInCoarse,
const std::vector< mcIdType > &  facts,
DataArrayDouble coarseDA 
)
static

This static method is useful to condense field on cells of a MEDCouplingIMesh instance coming from a refinement ( MEDCouplingIMesh::refineWithFactor for example) to a coarse MEDCouplingIMesh instance. So this method can be seen as a specialization in P0P0 conservative interpolation non overlapping from fine image mesh to a coarse image mesh. Only tuples ( deduced from fineLocInCoarse ) of coarseDA will be modified. Other tuples of coarseDA will be let unchanged.

Parameters
[in]coarseStThe cell structure of coarse mesh.
[in]fineDAThe DataArray containing the cell field on uniformly refined mesh
[in]fineLocInCoarseThe cell localization of refined mesh into the coarse one.
[in]factsThe refinement coefficient per axis.
[in,out]coarseDAThe DataArrayDouble corresponding to the a cell field of a coarse mesh whose cell structure is defined by coarseSt.
See also
CondenseFineToCoarseGhost,SpreadCoarseToFine

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt(), MEDCoupling::MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(), MEDCoupling::MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and MEDCoupling::DataArrayTemplate< T >::isAllocated().

Referenced by MEDCoupling::MEDCouplingStructuredMesh::AssignPartOfFieldOfDoubleUsing(), and MEDCoupling::MEDCouplingCartesianAMRMeshGen::fillCellFieldComingFromPatch().

◆ CondenseFineToCoarseGhost()

void MEDCouplingIMesh::CondenseFineToCoarseGhost ( const std::vector< mcIdType > &  coarseSt,
const DataArrayDouble fineDA,
const std::vector< std::pair< mcIdType, mcIdType > > &  fineLocInCoarse,
const std::vector< mcIdType > &  facts,
DataArrayDouble coarseDA,
mcIdType  ghostSize 
)
static

This static method is useful to condense field on cells of a MEDCouplingIMesh instance coming from a refinement ( MEDCouplingIMesh::refineWithFactor for example) to a coarse MEDCouplingIMesh instance. So this method can be seen as a specialization in P0P0 conservative interpolation non overlapping from fine image mesh to a coarse image mesh. Only tuples ( deduced from fineLocInCoarse ) of coarseDA will be modified. Other tuples of coarseDA will be let unchanged.

Parameters
[in]coarseStThe cell structure of coarse mesh.
[in]fineDAThe DataArray containing the cell field on uniformly refined mesh
[in]fineLocInCoarseThe cell localization of refined mesh into the coarse one.
[in]factsThe refinement coefficient per axis.
[in,out]coarseDAThe DataArrayDouble corresponding to the a cell field of a coarse mesh whose cell structure is defined by coarseSt.
[in]ghostSize- The size of the ghost zone. The ghost zone is expected to be the same for all axis and both for coarse and fine meshes.
See also
CondenseFineToCoarse,SpreadCoarseToFineGhost

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(), MEDCoupling::MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and MEDCoupling::DataArrayTemplate< T >::isAllocated().

Referenced by MEDCoupling::MEDCouplingCartesianAMRMeshGen::fillCellFieldComingFromPatchGhost().

◆ SpreadCoarseToFine()

void MEDCouplingIMesh::SpreadCoarseToFine ( const DataArrayDouble coarseDA,
const std::vector< mcIdType > &  coarseSt,
DataArrayDouble fineDA,
const std::vector< std::pair< mcIdType, mcIdType > > &  fineLocInCoarse,
const std::vector< mcIdType > &  facts 
)
static

◆ SpreadCoarseToFineGhost()

void MEDCouplingIMesh::SpreadCoarseToFineGhost ( const DataArrayDouble coarseDA,
const std::vector< mcIdType > &  coarseSt,
DataArrayDouble fineDA,
const std::vector< std::pair< mcIdType, mcIdType > > &  fineLocInCoarse,
const std::vector< mcIdType > &  facts,
mcIdType  ghostSize 
)
static

This method spreads the values of coarse data coarseDA into fineDA.

Parameters
[in]coarseDAThe DataArrayDouble corresponding to the a cell field of a coarse mesh whose cell structure is defined by coarseSt.
[in]coarseStThe cell structure of coarse mesh.
[in,out]fineDAThe DataArray containing the cell field on uniformly refined mesh
[in]fineLocInCoarseThe cell localization of refined mesh into the coarse one.
[in]factsThe refinement coefficient per axis.
[in]ghostSize- The size of the ghost zone. The ghost zone is expected to be the same for all axis and both for coarse and fine meshes.
See also
CondenseFineToCoarse, SpreadCoarseToFineGhostZone

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(), MEDCoupling::MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and MEDCoupling::DataArrayTemplate< T >::isAllocated().

Referenced by MEDCoupling::MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchGhost().

◆ SpreadCoarseToFineGhostZone()

void MEDCouplingIMesh::SpreadCoarseToFineGhostZone ( const DataArrayDouble coarseDA,
const std::vector< mcIdType > &  coarseSt,
DataArrayDouble fineDA,
const std::vector< std::pair< mcIdType, mcIdType > > &  fineLocInCoarse,
const std::vector< mcIdType > &  facts,
mcIdType  ghostSize 
)
static

This method spreads the values of coarse data coarseDA into fineDA ONLY in the ghost zone (contrary to SpreadCoarseToFineGhost that spread the values everywhere).

Parameters
[in]coarseDAThe DataArrayDouble corresponding to the a cell field of a coarse mesh whose cell structure is defined by coarseSt.
[in]coarseStThe cell structure of coarse mesh.
[in,out]fineDAThe DataArray containing the cell field on uniformly refined mesh
[in]fineLocInCoarseThe cell localization of refined mesh into the coarse one.
[in]factsThe refinement coefficient per axis.
[in]ghostSize- The size of the ghost zone. The ghost zone is expected to be the same for all axis and both for coarse and fine meshes.
See also
SpreadCoarseToFineGhost

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(), MEDCoupling::MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and MEDCoupling::DataArrayTemplate< T >::isAllocated().

Referenced by MEDCoupling::MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchOnlyOnGhostZone().

◆ deepCopy()

◆ clone()

MEDCouplingIMesh * MEDCouplingIMesh::clone ( bool  recDeepCpy) const
virtual

Implements MEDCoupling::MEDCouplingMesh.

Referenced by deepCopy().

◆ getDirectAccessOfCoordsArrIfInStructure()

const DataArrayDouble * MEDCouplingIMesh::getDirectAccessOfCoordsArrIfInStructure ( ) const
virtual

◆ buildWithGhost()

MEDCouplingIMesh * MEDCouplingIMesh::buildWithGhost ( mcIdType  ghostLev) const

This method creates a copy of this enlarged by ghostLev cells on each axis. If ghostLev equal to 0 this method behaves as MEDCouplingIMesh::clone.

Parameters
[in]ghostLev- the ghost level expected
Returns
MEDCouplingIMesh * - a newly alloacted object to be managed by the caller.
Exceptions
ifghostLev < 0.

References checkConsistencyLight(), MEDCoupling::MEDCouplingMesh::getName(), getSpaceDimension(), and New().

Referenced by MEDCoupling::MEDCouplingAMRAttribute::buildCellFieldOnWithGhost(), MEDCoupling::MEDCouplingAMRAttribute::buildCellFieldOnWithoutGhost(), and MEDCoupling::MEDCouplingAMRAttribute::writeVTHB().

◆ updateTime()

void MEDCouplingIMesh::updateTime ( ) const
virtual

This method should be called on high level classes as Field or Mesh to take into account modifications done in aggregates objects.

Implements MEDCoupling::TimeLabel.

◆ getHeapMemorySizeWithoutChildren()

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

◆ getDirectChildrenWithNull()

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

◆ getType()

MEDCouplingMeshType MEDCoupling::MEDCouplingIMesh::getType ( ) const
virtual

◆ copyTinyStringsFrom()

void MEDCouplingIMesh::copyTinyStringsFrom ( const MEDCouplingMesh other)
virtual

This method copyies all tiny strings from other (name and components name).

Exceptions
ifother and this have not same mesh type.

Reimplemented from MEDCoupling::MEDCouplingMesh.

References MEDCoupling::MEDCouplingStructuredMesh::copyTinyStringsFrom(), and MEDCoupling::TimeLabel::declareAsNew().

◆ isEqualIfNotWhy()

bool MEDCouplingIMesh::isEqualIfNotWhy ( const MEDCouplingMesh other,
double  prec,
std::string &  reason 
) const
virtual

◆ isEqualWithoutConsideringStr()

bool MEDCouplingIMesh::isEqualWithoutConsideringStr ( const MEDCouplingMesh other,
double  prec 
) const
virtual

◆ checkDeepEquivalWith()

void MEDCouplingIMesh::checkDeepEquivalWith ( const MEDCouplingMesh other,
int  cellCompPol,
double  prec,
DataArrayIdType *&  cellCor,
DataArrayIdType *&  nodeCor 
) const
virtual

◆ checkDeepEquivalOnSameNodesWith()

void MEDCouplingIMesh::checkDeepEquivalOnSameNodesWith ( const MEDCouplingMesh other,
int  cellCompPol,
double  prec,
DataArrayIdType *&  cellCor 
) const
virtual

Nothing is done here (except to check that the other is a MEDCoupling::MEDCouplingIMesh instance too). The user intend that the nodes are the same, so by construction of MEDCoupling::MEDCouplingIMesh, this and other are the same !

Implements MEDCoupling::MEDCouplingMesh.

References isEqualWithoutConsideringStr().

◆ checkConsistencyLight()

◆ checkConsistency()

void MEDCouplingIMesh::checkConsistency ( double  eps = 1e-12) const
virtual

◆ getSpaceDimension()

◆ getCoordinatesOfNode()

void MEDCouplingIMesh::getCoordinatesOfNode ( mcIdType  nodeId,
std::vector< double > &  coo 
) const
virtual

◆ simpleRepr()

◆ advancedRepr()

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

Implements MEDCoupling::MEDCouplingMesh.

References simpleRepr().

◆ getBoundingBox()

void MEDCouplingIMesh::getBoundingBox ( double *  bbox) const
virtual

◆ getMeasureField()

MEDCouplingFieldDouble * MEDCouplingIMesh::getMeasureField ( bool  isAbs) const
virtual

◆ getMeasureFieldOnNode()

MEDCouplingFieldDouble * MEDCouplingIMesh::getMeasureFieldOnNode ( bool  isAbs) const
virtual

not implemented yet !

Implements MEDCoupling::MEDCouplingMesh.

◆ getCellContainingPoint()

mcIdType MEDCouplingIMesh::getCellContainingPoint ( const double *  pos,
double  eps 
) const
virtual

◆ getCellsContainingPoint()

void MEDCouplingIMesh::getCellsContainingPoint ( const double *  pos,
double  eps,
std::vector< mcIdType > &  elts 
) const
virtual

◆ rotate()

void MEDCouplingIMesh::rotate ( const double *  center,
const double *  vector,
double  angle 
)
virtual

◆ translate()

void MEDCouplingIMesh::translate ( const double *  vector)
virtual

Translates all nodes of this mesh by a given vector. Actually, it adds each component of the vector to all node coordinates of a corresponding axis.

Parameters
[in]vector- the translation vector whose size must be not less than this->getSpaceDimension().

Implements MEDCoupling::MEDCouplingMesh.

References MEDCoupling::TimeLabel::declareAsNew(), and getSpaceDimension().

◆ scale()

void MEDCouplingIMesh::scale ( const double *  point,
double  factor 
)
virtual

Applies scaling transformation to all nodes of this mesh.

Parameters
[in]point- coordinates of a scaling center. This array is to be of size this->getSpaceDimension() at least.
[in]factor- a scale factor.

Implements MEDCoupling::MEDCouplingMesh.

References MEDCoupling::TimeLabel::declareAsNew(), and getSpaceDimension().

◆ mergeMyselfWith()

MEDCouplingMesh * MEDCouplingIMesh::mergeMyselfWith ( const MEDCouplingMesh other) const
virtual

◆ getCoordinatesAndOwner()

DataArrayDouble * MEDCouplingIMesh::getCoordinatesAndOwner ( ) const
virtual

Returns a new DataArrayDouble holding coordinates of all nodes of this mesh.

Returns
DataArrayDouble * - a new instance of DataArrayDouble, of size this->getNumberOfNodes() tuples per this->getSpaceDimension() components. The caller is to delete this array using decrRef() as it is no more needed.

Implements MEDCoupling::MEDCouplingMesh.

References checkConsistencyLight(), MEDCoupling::MEDCouplingStructuredMesh::getNumberOfNodes(), MEDCoupling::MEDCouplingStructuredMesh::GetPosFromId(), getSpaceDimension(), MEDCoupling::MEDCouplingStructuredMesh::getSplitNodeValues(), and MEDCoupling::DataArrayDouble::New().

◆ computeCellCenterOfMass()

DataArrayDouble * MEDCouplingIMesh::computeCellCenterOfMass ( ) const
virtual

Returns a new DataArrayDouble holding barycenters of all cells. The barycenter is computed by averaging coordinates of cell nodes.

Returns
DataArrayDouble * - a new instance of DataArrayDouble, of size this->getNumberOfCells() tuples per this->getSpaceDimension() components. The caller is to delete this array using decrRef() as it is no more needed.

Implements MEDCoupling::MEDCouplingMesh.

References checkConsistencyLight(), MEDCoupling::MEDCouplingStructuredMesh::getNumberOfCells(), MEDCoupling::MEDCouplingStructuredMesh::GetPosFromId(), getSpaceDimension(), MEDCoupling::MEDCouplingStructuredMesh::getSplitCellValues(), and MEDCoupling::DataArrayDouble::New().

Referenced by computeIsoBarycenterOfNodesPerCell().

◆ computeIsoBarycenterOfNodesPerCell()

DataArrayDouble * MEDCouplingIMesh::computeIsoBarycenterOfNodesPerCell ( ) const
virtual

◆ renumberCells()

void MEDCouplingIMesh::renumberCells ( const mcIdType *  old2NewBg,
bool  check = true 
)
virtual

◆ getNodeGridStructure() [1/2]

void MEDCouplingIMesh::getNodeGridStructure ( mcIdType *  res) const
virtual

◆ getNodeGridStructure() [2/2]

std::vector< mcIdType > MEDCouplingIMesh::getNodeGridStructure ( ) const
virtual

◆ buildStructuredSubPart()

MEDCouplingStructuredMesh * MEDCouplingIMesh::buildStructuredSubPart ( const std::vector< std::pair< mcIdType, mcIdType > > &  cellPart) const
virtual

◆ getTinySerializationInformation()

void MEDCouplingIMesh::getTinySerializationInformation ( std::vector< double > &  tinyInfoD,
std::vector< mcIdType > &  tinyInfo,
std::vector< std::string > &  littleStrings 
) const
virtual

◆ resizeForUnserialization()

void MEDCouplingIMesh::resizeForUnserialization ( const std::vector< mcIdType > &  tinyInfo,
DataArrayIdType *  a1,
DataArrayDouble a2,
std::vector< std::string > &  littleStrings 
) const
virtual

◆ serialize()

void MEDCouplingIMesh::serialize ( DataArrayIdType *&  a1,
DataArrayDouble *&  a2 
) const
virtual

◆ unserialization()

void MEDCouplingIMesh::unserialization ( const std::vector< double > &  tinyInfoD,
const std::vector< mcIdType > &  tinyInfo,
const DataArrayIdType *  a1,
DataArrayDouble a2,
const std::vector< std::string > &  littleStrings 
)
virtual

◆ reprQuickOverview()

void MEDCouplingIMesh::reprQuickOverview ( std::ostream &  stream) const
virtual

◆ getVTKFileExtension()

std::string MEDCouplingIMesh::getVTKFileExtension ( ) const
virtual