Version: 9.14.0
MEDCoupling::MEDCouplingCMesh Class Reference
Inheritance diagram for MEDCoupling::MEDCouplingCMesh:
Collaboration diagram for MEDCoupling::MEDCouplingCMesh:

Public Member Functions

std::string advancedRepr () const
 
MEDCouplingCurveLinearMeshbuildCurveLinear () const
 
MEDCouplingStructuredMeshbuildStructuredSubPart (const std::vector< std::pair< mcIdType, mcIdType > > &cellPart) 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
 
MEDCouplingCMeshclone (bool recDeepCpy) const
 
DataArrayDoublecomputeCellCenterOfMass () const
 
DataArrayDoublecomputeIsoBarycenterOfNodesPerCell () const
 
void copyTinyStringsFrom (const MEDCouplingMesh *other)
 
MEDCouplingCMeshdeepCopy () 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
 
DataArrayDoublegetCoordsAt (int i)
 
const DataArrayDoublegetCoordsAt (int i) const
 
const DataArrayDoublegetDirectAccessOfCoordsArrIfInStructure () const
 
std::vector< const BigMemoryObject * > getDirectChildrenWithNull () const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
MEDCouplingFieldDoublegetMeasureField (bool isAbs) const
 
MEDCouplingFieldDoublegetMeasureFieldOnNode (bool isAbs) const
 
std::vector< mcIdType > getNodeGridStructure () const
 
void getNodeGridStructure (mcIdType *res) 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 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 setCoords (const DataArrayDouble *coordsX, const DataArrayDouble *coordsY=0, const DataArrayDouble *coordsZ=0)
 
void setCoordsAt (int i, const DataArrayDouble *arr)
 
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 MEDCouplingCMeshNew ()
 
static MEDCouplingCMeshNew (const std::string &meshName)
 
- 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]

MEDCouplingCMesh * MEDCouplingCMesh::New ( const std::string &  meshName)
static

◆ getClassName()

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

Reimplemented from MEDCoupling::BigMemoryObject.

◆ deepCopy()

MEDCouplingCMesh * MEDCouplingCMesh::deepCopy ( ) const
virtual

◆ clone()

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

Implements MEDCoupling::MEDCouplingMesh.

Referenced by deepCopy().

◆ getDirectAccessOfCoordsArrIfInStructure()

const DataArrayDouble * MEDCouplingCMesh::getDirectAccessOfCoordsArrIfInStructure ( ) const
virtual

◆ buildCurveLinear()

◆ updateTime()

void MEDCouplingCMesh::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.

References MEDCoupling::TimeLabel::updateTimeWith().

Referenced by scale().

◆ getHeapMemorySizeWithoutChildren()

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

◆ getDirectChildrenWithNull()

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

◆ getType()

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

◆ copyTinyStringsFrom()

void MEDCouplingCMesh::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::DataArray::copyStringInfoFrom(), and MEDCoupling::MEDCouplingStructuredMesh::copyTinyStringsFrom().

◆ isEqualIfNotWhy()

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

◆ isEqualWithoutConsideringStr()

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

◆ checkDeepEquivalWith()

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

◆ checkDeepEquivalOnSameNodesWith()

void MEDCouplingCMesh::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::MEDCouplingCMesh instance too). The user intend that the nodes are the same, so by construction of MEDCoupling::MEDCouplingCMesh, this and other are the same !

Implements MEDCoupling::MEDCouplingMesh.

References isEqualWithoutConsideringStr().

◆ checkConsistencyLight()

◆ checkConsistency()

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

◆ getSpaceDimension()

int MEDCouplingCMesh::getSpaceDimension ( ) const
virtual

Return the space dimension of this. It only considers the arrays along X, Y and Z to deduce that. This method throws exceptions if the not null arrays defining this are not contiguously at the end. For example X!=0,Y==0,Z!=0 will throw.

Implements MEDCoupling::MEDCouplingMesh.

References getNodeGridStructure().

Referenced by buildCurveLinear(), buildStructuredSubPart(), checkConsistencyLight(), computeCellCenterOfMass(), getBoundingBox(), getCellContainingPoint(), getCoordinatesAndOwner(), getCoordinatesOfNode(), getMeasureField(), MEDCoupling::MEDFileCMesh::getSpaceDimension(), and simpleRepr().

◆ getCoordinatesOfNode()

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

◆ simpleRepr()

◆ advancedRepr()

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

Implements MEDCoupling::MEDCouplingMesh.

References simpleRepr().

◆ getCoordsAt() [1/2]

const DataArrayDouble * MEDCouplingCMesh::getCoordsAt ( int  i) const

Returns a DataArrayDouble holding positions of nodes along a given axis. For more info on Cartesian meshes, see Cartesian mesh.

Parameters
[in]i- an index of axis, a value from [0,1,2].
Returns
const DataArrayDouble * - a pointer to the data array of node coordinates referred by this mesh.
Exceptions
Ifi is not one of [0,1,2].

Here is a C++ example.
Here is a Python example.

Referenced by MEDCoupling::BlockTopology::BlockTopology(), computeCellCenterOfMass(), getBoundingBox(), getCellContainingPoint(), getCoordinatesAndOwner(), getCoordinatesOfNode(), and scale().

◆ getCoordsAt() [2/2]

DataArrayDouble * MEDCouplingCMesh::getCoordsAt ( int  i)

Returns a DataArrayDouble holding positions of nodes along a given axis. For more info on Cartesian meshes, see Cartesian mesh.

Parameters
[in]i- an index of axis, a value from [0,1,2].
Returns
const DataArrayDouble * - a pointer to the data array of node coordinates referred by this mesh.
Exceptions
Ifi is not one of [0,1,2].

Here is a C++ example.
Here is a Python example.

◆ setCoordsAt()

void MEDCouplingCMesh::setCoordsAt ( int  i,
const DataArrayDouble arr 
)

Sets node coordinates along a given axis. For more info on Cartesian meshes, see Cartesian mesh.

Parameters
[in]i- an index of axis, a value in range [0,1,2].
[in]arr- DataArrayDouble holding positions of nodes along the i-th axis. It must be an array of one component.
Exceptions
Ifarr->getNumberOfComponents() != 1.
Ifi is not one of [0,1,2].

Here is a C++ example.
Here is a Python example.

References MEDCoupling::DataArray::checkNbOfComps(), MEDCoupling::TimeLabel::declareAsNew(), and MEDCoupling::RefCountObjectOnly::incrRef().

◆ setCoords()

void MEDCouplingCMesh::setCoords ( const DataArrayDouble coordsX,
const DataArrayDouble coordsY = 0,
const DataArrayDouble coordsZ = 0 
)

Sets node coordinates along some of the tree axes. This method updates all the three node coordinates arrays at once. For more info on Cartesian meshes, see Cartesian mesh.

Parameters
[in]coordsX- DataArrayDouble holding positions of nodes along the X axis. It must be an array of one component or NULL.
[in]coordsY- DataArrayDouble holding positions of nodes along the Y axis. It must be an array of one component or NULL.
[in]coordsZ- DataArrayDouble holding positions of nodes along the Z axis. It must be an array of one component or NULL.
Exceptions
Ifcoords*->getNumberOfComponents() != 1.

Here is a C++ example.
Here is a Python example.

References MEDCoupling::DataArray::checkNbOfComps(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::RefCountObjectOnly::decrRef(), and MEDCoupling::RefCountObjectOnly::incrRef().

◆ getBoundingBox()

◆ getMeasureField()

◆ getMeasureFieldOnNode()

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

not implemented yet !

Implements MEDCoupling::MEDCouplingMesh.

◆ getCellContainingPoint()

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

◆ getCellsContainingPoint()

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

◆ rotate()

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

◆ translate()

void MEDCouplingCMesh::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::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArrayTemplate< T >::getNbOfElems(), and MEDCoupling::DataArrayTemplate< T >::getPointer().

◆ scale()

void MEDCouplingCMesh::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(), getCoordsAt(), MEDCoupling::DataArrayTemplate< T >::getNbOfElems(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and updateTime().

◆ mergeMyselfWith()

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

◆ getCoordinatesAndOwner()

DataArrayDouble * MEDCouplingCMesh::getCoordinatesAndOwner ( ) const
virtual

◆ computeCellCenterOfMass()

◆ computeIsoBarycenterOfNodesPerCell()

DataArrayDouble * MEDCouplingCMesh::computeIsoBarycenterOfNodesPerCell ( ) const
virtual

◆ renumberCells()

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

◆ getNodeGridStructure() [1/2]

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

◆ getNodeGridStructure() [2/2]

◆ buildStructuredSubPart()

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

◆ getTinySerializationInformation()

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

◆ resizeForUnserialization()

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

◆ serialize()

◆ unserialization()

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

◆ reprQuickOverview()

◆ getVTKFileExtension()

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