Version: 9.12.0
MEDCoupling::MEDCouplingStructuredMesh Class Referenceabstract
Inheritance diagram for MEDCoupling::MEDCouplingStructuredMesh:
Collaboration diagram for MEDCoupling::MEDCouplingStructuredMesh:

Public Member Functions

MEDCoupling1SGTUMeshbuild1SGTSubLevelMesh () const
 
MEDCoupling1SGTUMeshbuild1SGTUnstructured () const
 
MEDCouplingFieldDoublebuildOrthogonalField () const
 
MEDCouplingMeshbuildPart (const mcIdType *start, const mcIdType *end) const
 
MEDCouplingMeshbuildPartAndReduceNodes (const mcIdType *start, const mcIdType *end, DataArrayIdType *&arr) const
 
virtual MEDCouplingStructuredMeshbuildStructuredSubPart (const std::vector< std::pair< mcIdType, mcIdType > > &cellPart) const =0
 
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
 
virtual std::vector< mcIdType > getNodeGridStructure () const =0
 
virtual void getNodeGridStructure (mcIdType *res) const =0
 
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 std::string advancedRepr () const =0
 
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 checkConsistency (double eps=1e-12) const =0
 
virtual void checkConsistencyLight () const =0
 
virtual void checkDeepEquivalOnSameNodesWith (const MEDCouplingMesh *other, int cellCompPol, double prec, DataArrayIdType *&cellCor) const =0
 
virtual void checkDeepEquivalWith (const MEDCouplingMesh *other, int cellCompPol, double prec, DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const =0
 
virtual void checkFastEquivalWith (const MEDCouplingMesh *other, double prec) const
 
void checkGeoEquivalWith (const MEDCouplingMesh *other, int levOfCheck, double prec, DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const
 
virtual MEDCouplingMeshclone (bool recDeepCpy) const =0
 
virtual DataArrayDoublecomputeCellCenterOfMass () const =0
 
virtual DataArrayDoublecomputeIsoBarycenterOfNodesPerCell () const =0
 
virtual MCAuto< DataArrayDoublecomputeMeshCenterOfMass () const
 
virtual void copyTinyInfoFrom (const MEDCouplingMesh *other)
 
virtual MEDCouplingMeshdeepCopy () const =0
 
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 void getBoundingBox (double *bbox) const =0
 
virtual mcIdType getCellContainingPoint (const double *pos, double eps) const =0
 
virtual DataArrayIdType * getCellIdsFullyIncludedInNodeIds (const mcIdType *partBg, const mcIdType *partEnd) const
 
virtual void getCellsContainingPoint (const double *pos, double eps, std::vector< mcIdType > &elts) const =0
 
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
 
virtual DataArrayDoublegetCoordinatesAndOwner () const =0
 
virtual void getCoordinatesOfNode (mcIdType nodeId, std::vector< double > &coo) const =0
 
std::string getDescription () const
 
virtual const DataArrayDoublegetDirectAccessOfCoordsArrIfInStructure () const =0
 
virtual MEDCouplingFieldDoublegetMeasureField (bool isAbs) const =0
 
virtual MEDCouplingFieldDoublegetMeasureFieldOnNode (bool isAbs) const =0
 
std::string getName () const
 
virtual int getSpaceDimension () const =0
 
double getTime (int &iteration, int &order) const
 
std::string getTimeUnit () const
 
virtual void getTinySerializationInformation (std::vector< double > &tinyInfoD, std::vector< mcIdType > &tinyInfo, std::vector< std::string > &littleStrings) const =0
 
virtual MEDCouplingMeshType getType () const =0
 
virtual std::string getVTKFileExtension () const =0
 
std::string getVTKFileNameOf (const std::string &fileName) const
 
virtual bool isEqual (const MEDCouplingMesh *other, double prec) const
 
virtual bool isEqualWithoutConsideringStr (const MEDCouplingMesh *other, double prec) const =0
 
bool isStructured () const
 
virtual MEDCouplingMeshmergeMyselfWith (const MEDCouplingMesh *other) const =0
 
virtual void renumberCells (const mcIdType *old2NewBg, bool check=true)=0
 
virtual void reprQuickOverview (std::ostream &stream) const =0
 
virtual void resizeForUnserialization (const std::vector< mcIdType > &tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector< std::string > &littleStrings) const =0
 
virtual void rotate (const double *center, const double *vector, double angle)=0
 
virtual void scale (const double *point, double factor)=0
 
virtual void serialize (DataArrayIdType *&a1, DataArrayDouble *&a2) const =0
 
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)
 
virtual std::string simpleRepr () const =0
 
virtual void translate (const double *vector)=0
 
virtual void unserialization (const std::vector< double > &tinyInfoD, const std::vector< mcIdType > &tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2, const std::vector< std::string > &littleStrings)=0
 
std::string writeVTK (const std::string &fileName, bool isBinary=true) const
 
virtual void writeVTKLL (std::ostream &ofs, const std::string &cellData, const std::string &pointData, DataArrayByte *byteData) const =0
 
- 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
 
virtual std::string getClassName () const
 
std::vector< const BigMemoryObject * > getDirectChildren () const
 
virtual std::vector< const BigMemoryObject * > getDirectChildrenWithNull () const =0
 
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
 
virtual void updateTime () const =0
 

Static Public Member Functions

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)
 

Protected Member Functions

 MEDCouplingStructuredMesh ()
 
 MEDCouplingStructuredMesh (const MEDCouplingStructuredMesh &other, bool deepCpy)
 
 ~MEDCouplingStructuredMesh ()
 
- Protected Member Functions inherited from MEDCoupling::MEDCouplingMesh
virtual std::string getVTKDataSetType () const =0
 
 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

static int ZipNodeStructure (const mcIdType *nodeStBg, const mcIdType *nodeStEnd, mcIdType zipNodeSt[3])
 

Constructor & Destructor Documentation

◆ MEDCouplingStructuredMesh() [1/2]

MEDCouplingStructuredMesh::MEDCouplingStructuredMesh ( )
protected

◆ MEDCouplingStructuredMesh() [2/2]

MEDCouplingStructuredMesh::MEDCouplingStructuredMesh ( const MEDCouplingStructuredMesh other,
bool  deepCpy 
)
protected

◆ ~MEDCouplingStructuredMesh()

MEDCouplingStructuredMesh::~MEDCouplingStructuredMesh ( )
protected

Member Function Documentation

◆ getTypeOfCell()

◆ getAllGeoTypes()

std::set< INTERP_KERNEL::NormalizedCellType > MEDCouplingStructuredMesh::getAllGeoTypes ( ) const
virtual

◆ getNumberOfCellsWithType()

mcIdType MEDCouplingStructuredMesh::getNumberOfCellsWithType ( INTERP_KERNEL::NormalizedCellType  type) const
virtual

◆ giveCellsWithType()

DataArrayIdType * MEDCouplingStructuredMesh::giveCellsWithType ( INTERP_KERNEL::NormalizedCellType  type) const
virtual

◆ computeNbOfNodesPerCell()

DataArrayIdType * MEDCouplingStructuredMesh::computeNbOfNodesPerCell ( ) const
virtual

◆ computeNbOfFacesPerCell()

DataArrayIdType * MEDCouplingStructuredMesh::computeNbOfFacesPerCell ( ) const
virtual

◆ computeEffectiveNbOfNodesPerCell()

DataArrayIdType * MEDCouplingStructuredMesh::computeEffectiveNbOfNodesPerCell ( ) const
virtual

This method computes effective number of nodes per cell. That is to say nodes appearing several times in nodal connectivity of a cell, will be counted only once here whereas it will be counted several times in MEDCouplingMesh::computeNbOfNodesPerCell method. Here for structured mesh it returns exactly as MEDCouplingStructuredMesh::computeNbOfNodesPerCell does.

Returns
DataArrayIdType * - new object to be deallocated by the caller.

Implements MEDCoupling::MEDCouplingMesh.

References computeNbOfNodesPerCell().

◆ getLocationFromCellId()

std::vector< mcIdType > MEDCouplingStructuredMesh::getLocationFromCellId ( mcIdType  cellId) const

This method returns for a cell which id is cellId the location (locX,locY,locZ) of this cell in this.

Parameters
[in]cellIdID of the cell
Returns
- A vector of size this->getMeshDimension()
Exceptions
ifcellId not in [ 0, this->getNumberOfCells() )

References getCellGridStructure(), getMeshDimension(), GetPosFromId(), and GetSplitVectFromStruct().

◆ getLocationFromNodeId()

std::vector< mcIdType > MEDCouplingStructuredMesh::getLocationFromNodeId ( mcIdType  nodeId) const

This method returns for a node which id is nodeId the location (locX,locY,locZ) of this node in this.

Parameters
[in]nodeIdID of the node
Returns
- A vector of size this->getSpaceDimension()
Exceptions
ifcellId not in [ 0, this->getNumberOfNodes() )

References getNodeGridStructure(), GetPosFromId(), MEDCoupling::MEDCouplingMesh::getSpaceDimension(), and GetSplitVectFromStruct().

◆ GetPosFromId()

◆ GetGeoTypeGivenMeshDimension()

◆ getNodeIdsOfCell()

void MEDCouplingStructuredMesh::getNodeIdsOfCell ( mcIdType  cellId,
std::vector< mcIdType > &  conn 
) const
virtual

◆ getHeapMemorySizeWithoutChildren()

◆ copyTinyStringsFrom()

void MEDCouplingStructuredMesh::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::MEDCouplingMesh::copyTinyStringsFrom().

Referenced by MEDCoupling::MEDCouplingCMesh::copyTinyStringsFrom(), MEDCoupling::MEDCouplingCurveLinearMesh::copyTinyStringsFrom(), and MEDCoupling::MEDCouplingIMesh::copyTinyStringsFrom().

◆ isEqualIfNotWhy()

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

◆ getDistributionOfTypes()

std::vector< mcIdType > MEDCouplingStructuredMesh::getDistributionOfTypes ( ) const
virtual

◆ checkTypeConsistencyAndContig()

DataArrayIdType * MEDCouplingStructuredMesh::checkTypeConsistencyAndContig ( const std::vector< mcIdType > &  code,
const std::vector< const DataArrayIdType * > &  idsPerType 
) const
virtual

This method tries to minimize at most the number of deep copy. So if idsPerType is not empty it can be returned directly (without copy, but with ref count incremented) in return.

See MEDCouplingUMesh::checkTypeConsistencyAndContig for more information

Implements MEDCoupling::MEDCouplingMesh.

References getNumberOfCells(), and getTypeOfCell().

◆ splitProfilePerType()

void MEDCouplingStructuredMesh::splitProfilePerType ( const DataArrayIdType *  profile,
std::vector< mcIdType > &  code,
std::vector< DataArrayIdType * > &  idsInPflPerType,
std::vector< DataArrayIdType * > &  idsPerType,
bool  smartPflKiller = true 
) const
virtual

This method is the opposite of MEDCouplingUMesh::checkTypeConsistencyAndContig method. Given a list of cells in profile it returns a list of sub-profiles sorted by geo type. The result is put in the array idsPerType. In the returned parameter code, foreach i code[3*i+2] refers (if different from -1) to a location into the idsPerType. This method has 1 input profile and 3 outputs code idsInPflPerType and idsPerType.

Parameters
[out]codeis a vector of size 3*n where n is the number of different geometric type in this reduced to the profile profile. code has exactly the same semantic than in MEDCouplingUMesh::checkTypeConsistencyAndContig method.
[out]idsInPflPerTypeis a vector of size of different geometric type in the subpart defined by profile of this ( equal to code.size()/3). For each i, idsInPflPerType[i] stores the tuple ids in profile that correspond to the geometric type code[3*i+0]
[out]idsPerTypeis a vector of size of different sub profiles needed to be defined to represent the profile profile for a given geometric type. This vector can be empty in case of all geometric type cells are fully covered in ascending in the given input profile.
Warning
for performance reasons no deep copy will be performed, if profile can been used as this in output parameters idsInPflPerType and idsPerType.
Exceptions
ifprofile has not exactly one component. It throws too, if profile contains some values not in [0,getNumberOfCells()) or if this is not fully defined

Example1:

  • Before this has 3 cells profile contains [0,1,2]
  • After code contains [NORM_...,nbCells,-1], idsInPflPerType [[0,1,2]] and idsPerType is empty

Example2:

  • Before this has 3 cells profile contains [1,2]
  • After code contains [NORM_...,nbCells,0], idsInPflPerType [[0,1]] and idsPerType is [[1,2]]

Implements MEDCoupling::MEDCouplingMesh.

References getNumberOfCells(), and getTypeOfCell().

◆ build1SGTUnstructured()

MEDCoupling1SGTUMesh * MEDCouplingStructuredMesh::build1SGTUnstructured ( ) const

Creates a new unstructured mesh (MEDCoupling1SGTUMesh) from this structured one.

In the returned mesh, the nodes are ordered with the first axis varying first: (X0,Y0), (X1,Y0), ... (X0,Y1), (X1,Y1), ... and the cells are ordered with the same logic, i.e. in (i,j) notation: (0,0), (1,0), (2,0), ... (0,1), (1,1), ...

Returns
MEDCouplingUMesh * - a new instance of MEDCouplingUMesh. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis->getMeshDimension() is not among [1,2,3].

References Build1GTNodalConnectivity(), MEDCoupling::MEDCouplingMesh::getCoordinatesAndOwner(), GetGeoTypeGivenMeshDimension(), getMeshDimension(), MEDCoupling::MEDCouplingMesh::getName(), getNodeGridStructure(), getSpaceDimensionOnNodeStruct(), and MEDCoupling::MEDCoupling1SGTUMesh::New().

Referenced by buildUnstructured().

◆ buildUnstructured()

MEDCouplingUMesh * MEDCouplingStructuredMesh::buildUnstructured ( ) const
virtual

Creates a new unstructured mesh (MEDCouplingUMesh) from this structured one.

In the returned mesh, the nodes are ordered with the first axis varying first: (X0,Y0), (X1,Y0), ... (X0,Y1), (X1,Y1), ... and the cells are ordered with the same logic, i.e. in (i,j) notation: (0,0), (1,0), (2,0), ... (0,1), (1,1), ...

Returns
MEDCouplingUMesh * - a new instance of MEDCouplingUMesh. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis->getMeshDimension() is not among [1,2,3].

Implements MEDCoupling::MEDCouplingMesh.

References build1SGTUnstructured().

Referenced by buildPart(), and buildPartAndReduceNodes().

◆ buildPart()

MEDCouplingMesh * MEDCouplingStructuredMesh::buildPart ( const mcIdType *  start,
const mcIdType *  end 
) const
virtual

Creates a new MEDCouplingUMesh containing a part of cells of this mesh. The cells to include to the result mesh are specified by an array of cell ids.

Parameters
[in]start- an array of cell ids to include to the result mesh.
[in]end- specifies the end of the array start, so that the last value of start is end[ -1 ].
Returns
MEDCouplingMesh * - a new instance of MEDCouplingUMesh. The caller is to delete this mesh using decrRef() as it is no more needed.

Implements MEDCoupling::MEDCouplingMesh.

References buildUnstructured().

◆ buildPartAndReduceNodes()

MEDCouplingMesh * MEDCouplingStructuredMesh::buildPartAndReduceNodes ( const mcIdType *  start,
const mcIdType *  end,
DataArrayIdType *&  arr 
) const
virtual

◆ simplexize()

DataArrayIdType * MEDCouplingStructuredMesh::simplexize ( int  policy)
virtual

◆ buildOrthogonalField()

MEDCouplingFieldDouble * MEDCouplingStructuredMesh::buildOrthogonalField ( ) const
virtual

Returns a new MEDCouplingFieldDouble holding normal vectors to cells of this 2D mesh. The computed vectors have 3 components and are normalized.

Returns
MEDCouplingFieldDouble * - a new instance of MEDCouplingFieldDouble on cells and one time. The caller is to delete this field using decrRef() as it is no more needed.
Exceptions
Ifthis->getMeshDimension() != 2.

Implements MEDCoupling::MEDCouplingMesh.

References getMeshDimension(), getNumberOfCells(), MEDCoupling::DataArrayDouble::New(), MEDCoupling::MEDCouplingFieldDouble::New(), MEDCoupling::NO_TIME, and MEDCoupling::ON_CELLS.

◆ getReverseNodalConnectivity()

void MEDCouplingStructuredMesh::getReverseNodalConnectivity ( DataArrayIdType *  revNodal,
DataArrayIdType *  revNodalIndx 
) const
virtual

◆ build1SGTSubLevelMesh()

MEDCoupling1SGTUMesh * MEDCouplingStructuredMesh::build1SGTSubLevelMesh ( ) const

This method returns the unstructured mesh (having single geometric type) of the sub level mesh of this. This method is equivalent to computing MEDCouplingUMesh::buildDescendingConnectivity on the unstructurized this mesh.

The caller is to delete the returned mesh using decrRef() as it is no more needed.

References Build1GTNodalConnectivityOfSubLevelMesh(), MEDCoupling::MEDCouplingMesh::getCoordinatesAndOwner(), GetGeoTypeGivenMeshDimension(), getMeshDimension(), MEDCoupling::MEDCouplingMesh::getName(), getNodeGridStructure(), and MEDCoupling::MEDCoupling1SGTUMesh::New().

Referenced by MEDCoupling::MEDFileStructuredMesh::buildImplicitPart().

◆ getCellIdFromPos()

mcIdType MEDCouplingStructuredMesh::getCellIdFromPos ( mcIdType  i,
mcIdType  j,
mcIdType  k 
) const

Returns a cell id by its (i,j,k) index. The cell is located between the i-th and ( i + 1 )-th nodes along X axis etc.

Parameters
[in]i- a index of node coordinates array along X axis.
[in]j- a index of node coordinates array along Y axis.
[in]k- a index of node coordinates array along Z axis.
Returns
mcIdType - a cell id in this mesh.

References getMeshDimension(), and getSplitCellValues().

Referenced by MEDCoupling::MEDCouplingFieldDiscretizationP0::getValueOnPos().

◆ getNodeIdFromPos()

mcIdType MEDCouplingStructuredMesh::getNodeIdFromPos ( mcIdType  i,
mcIdType  j,
mcIdType  k 
) const

Returns a node id by its (i,j,k) index.

Parameters
[in]i- a index of node coordinates array along X axis.
[in]j- a index of node coordinates array along Y axis.
[in]k- a index of node coordinates array along Z axis.
Returns
mcIdType - a node id in this mesh.

References MEDCoupling::MEDCouplingMesh::getSpaceDimension(), and getSplitNodeValues().

Referenced by MEDCoupling::MEDCouplingFieldDiscretizationOnNodes::getValueOnPos().

◆ getNumberOfCells()

◆ getNumberOfNodes()

◆ getMeshDimension()

◆ getNumberOfCellsOfSubLevelMesh()

◆ getSpaceDimensionOnNodeStruct()

int MEDCouplingStructuredMesh::getSpaceDimensionOnNodeStruct ( ) const

This method returns the space dimension by only considering the node grid structure. For cartesian mesh the returned value is equal to those returned by getSpaceDimension. But for curvelinear is could be different !

References getNodeGridStructure().

Referenced by build1SGTUnstructured().

◆ getNodeGridStructure() [1/2]

virtual void MEDCoupling::MEDCouplingStructuredMesh::getNodeGridStructure ( mcIdType *  res) const
pure virtual

◆ getSplitCellValues()

◆ getSplitNodeValues()

◆ getNodeGridStructure() [2/2]

◆ getCellGridStructure()

◆ computeSquareness()

double MEDCouplingStructuredMesh::computeSquareness ( ) const

This method returns the squareness of this (quadrature). this is expected to be with a mesh dimension equal to 2 or 3.

References getCellGridStructure().

◆ buildStructuredSubPart()

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

◆ GetSplitVectFromStruct()

std::vector< mcIdType > MEDCouplingStructuredMesh::GetSplitVectFromStruct ( const std::vector< mcIdType > &  strct)
static

Given a struct strct it returns a split vector [1,strct[0],strct[0]*strct[1]...] This decomposition allows to quickly find i,j,k given a global id.

Referenced by getLocationFromCellId(), getLocationFromNodeId(), getSplitCellValues(), and getSplitNodeValues().

◆ IsPartStructured()

bool MEDCouplingStructuredMesh::IsPartStructured ( const mcIdType *  startIds,
const mcIdType *  stopIds,
const std::vector< mcIdType > &  st,
std::vector< std::pair< mcIdType, mcIdType > > &  partCompactFormat 
)
static

This method states if given part ids [ startIds, stopIds) and a structure st returns if it can be considered as a structured dataset. If true is returned partCompactFormat will contain the information to build the corresponding part.

See also
MEDCouplingStructuredMesh::BuildExplicitIdsFrom, MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt

References GetPosFromId().

Referenced by buildPartAndReduceNodes().

◆ GetDimensionsFromCompactFrmt()

std::vector< mcIdType > MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt ( const std::vector< std::pair< mcIdType, mcIdType > > &  partCompactFormat)
static

◆ GetCompactFrmtFromDimensions()

std::vector< std::pair< mcIdType, mcIdType > > MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions ( const std::vector< mcIdType > &  dims)
static

◆ IntersectRanges()

std::vector< std::pair< mcIdType, mcIdType > > MEDCouplingStructuredMesh::IntersectRanges ( const std::vector< std::pair< mcIdType, mcIdType > > &  r1,
const std::vector< std::pair< mcIdType, mcIdType > > &  r2 
)
static

This method returns the intersection zone of two ranges (in compact format) r1 and r2. This method will throw exception if on one axis the intersection is empty.

See also
AreRangesIntersect

◆ AreRangesIntersect()

bool MEDCouplingStructuredMesh::AreRangesIntersect ( const std::vector< std::pair< mcIdType, mcIdType > > &  r1,
const std::vector< std::pair< mcIdType, mcIdType > > &  r2 
)
static

This method states if r1 and r2 do overlap of not. If yes you can call IntersectRanges to know the intersection area.

See also
IntersectRanges

◆ SwitchOnIdsFrom()

void MEDCouplingStructuredMesh::SwitchOnIdsFrom ( const std::vector< mcIdType > &  st,
const std::vector< std::pair< mcIdType, mcIdType > > &  partCompactFormat,
std::vector< bool > &  vectToSwitchOn 
)
static

This method is close to BuildExplicitIdsFrom except that instead of returning a DataArrayIdType instance containing explicit ids it enable elems in the vector of booleans (for performance reasons). As it is method for performance, this method is not available in python.

Parameters
[in]stThe entity structure.
[in]partCompactFormatThe compact subpart to be enabled.
[in,out]vectToSwitchOnVector which fetched items are enabled.
See also
MEDCouplingStructuredMesh::BuildExplicitIdsFrom, ExtractFieldOfBoolFrom

References DeduceNumberOfGivenStructure(), and GetDimensionsFromCompactFrmt().

Referenced by MEDCoupling::MEDCouplingCartesianAMRMeshGen::buildCellFieldOnRecurseWithoutOverlapWithoutGhost(), and MEDCoupling::MEDCouplingCartesianAMRMeshGen::buildUnstructured().

◆ ExtractFieldOfBoolFrom()

void MEDCouplingStructuredMesh::ExtractFieldOfBoolFrom ( const std::vector< mcIdType > &  st,
const std::vector< bool > &  fieldOfBool,
const std::vector< std::pair< mcIdType, mcIdType > > &  partCompactFormat,
std::vector< bool > &  fieldOut 
)
static

Obviously this method is NOT wrapped in python. This method is close to SwitchOnIdsFrom except that here, a sub field fieldOut is built starting from the input field fieldOfBool having the structure st. The extraction is defined by partCompactFormat.

Parameters
[in]stThe entity structure.
[in]fieldOfBoolfield of booleans having the size equal to MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(st).
[in]partCompactFormatThe compact subpart to be enabled.
[out]fieldOutthe result of the extraction.
See also
MEDCouplingStructuredMesh::BuildExplicitIdsFrom, SwitchOnIdsFrom, ExtractFieldOfDoubleFrom

References DeduceNumberOfGivenStructure(), and GetDimensionsFromCompactFrmt().

Referenced by FindMinimalPartOf().

◆ ExtractFieldOfDoubleFrom()

DataArrayDouble * MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom ( const std::vector< mcIdType > &  st,
const DataArrayDouble fieldOfDbl,
const std::vector< std::pair< mcIdType, mcIdType > > &  partCompactFormat 
)
static

This method is close to SwitchOnIdsFrom except that here, a sub field fieldOut is built starting from the input field fieldOfDbl having the structure st. The extraction is defined by partCompactFormat.

Parameters
[in]stThe entity structure.
[in]fieldOfDblfield of doubles having a number of tuples equal to MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(st).
[in]partCompactFormatThe compact subpart to be enabled.
Returns
DataArrayDouble * -the result of the extraction.
See also
MEDCouplingStructuredMesh::BuildExplicitIdsFrom, SwitchOnIdsFrom, ExtractFieldOfBoolFrom

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

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

◆ AssignPartOfFieldOfDoubleUsing()

void MEDCouplingStructuredMesh::AssignPartOfFieldOfDoubleUsing ( const std::vector< mcIdType > &  st,
DataArrayDouble fieldOfDbl,
const std::vector< std::pair< mcIdType, mcIdType > > &  partCompactFormat,
const DataArrayDouble other 
)
static

This method assign a part of values in fieldOfDbl using entirely values of other.

Parameters
[in]st- the structure of fieldOfDbl.
[in,out]fieldOfDbl- the array that will be partially filled using other.
[in]partCompactFormat- the specification of the part.
[in]other- the array that will be used to fill fieldOfDbl.

References MEDCoupling::MEDCouplingIMesh::CondenseFineToCoarse().

◆ ChangeReferenceFromGlobalOfCompactFrmt()

void MEDCouplingStructuredMesh::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

This method changes the reference of a part of structured mesh partOfBigInAbs define in absolute reference to a new reference bigInAbs. So this method only performs a translation by doing partOfBigRelativeToBig = partOfBigInAbs - bigInAbs This method also checks (if check=true) that partOfBigInAbs is included in bigInAbs. This method is useful to extract a part from a field lying on a big mesh.

See also
ChangeReferenceToGlobalOfCompactFrmt, BuildExplicitIdsFrom, SwitchOnIdsFrom, ExtractFieldOfBoolFrom, ExtractFieldOfDoubleFrom

◆ ChangeReferenceToGlobalOfCompactFrmt()

void MEDCouplingStructuredMesh::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

◆ TranslateCompactFrmt()

std::vector< std::pair< mcIdType, mcIdType > > MEDCouplingStructuredMesh::TranslateCompactFrmt ( const std::vector< std::pair< mcIdType, mcIdType > > &  part,
const std::vector< mcIdType > &  translation 
)
static

This method performs a translation (defined by translation) of part and returns the result of translated part.

See also
FindTranslationFrom

◆ FindTranslationFrom()

std::vector< mcIdType > MEDCouplingStructuredMesh::FindTranslationFrom ( const std::vector< std::pair< mcIdType, mcIdType > > &  startingFrom,
const std::vector< std::pair< mcIdType, mcIdType > > &  goingTo 
)
static

◆ BuildExplicitIdsFrom()

DataArrayIdType * MEDCouplingStructuredMesh::BuildExplicitIdsFrom ( const std::vector< mcIdType > &  st,
const std::vector< std::pair< mcIdType, mcIdType > > &  partCompactFormat 
)
static

This method builds the explicit entity array from the structure in st and the range in partCompactFormat. If the range contains invalid values regarding structure an exception will be thrown.

Returns
DataArrayIdType * - a new object.
See also
MEDCouplingStructuredMesh::IsPartStructured, MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt, SwitchOnIdsFrom, ExtractFieldOfBoolFrom, ExtractFieldOfDoubleFrom, MultiplyPartOf

Referenced by buildPartAndReduceNodes(), and MEDCoupling::MEDCouplingCurveLinearMesh::buildStructuredSubPart().

◆ MultiplyPartOf()

void MEDCouplingStructuredMesh::MultiplyPartOf ( const std::vector< mcIdType > &  st,
const std::vector< std::pair< mcIdType, mcIdType > > &  part,
double  factor,
DataArrayDouble da 
)
static

This method multiplies by factor values in tuples located by part in da.

Parameters
[in]st- the structure of grid ( without considering ghost cells).
[in]part- the part in the structure ( without considering ghost cells) contained in grid whose structure is defined by st.
[in]factor- the factor, the tuples in da will be multiply by.
[in,out]da- The DataArray in which only tuples specified by part will be modified.
See also
BuildExplicitIdsFrom

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

Referenced by MEDCoupling::MEDCouplingCartesianAMRMeshGen::fillCellFieldComingFromPatch(), and MultiplyPartOfByGhost().

◆ MultiplyPartOfByGhost()

void MEDCouplingStructuredMesh::MultiplyPartOfByGhost ( const std::vector< mcIdType > &  st,
const std::vector< std::pair< mcIdType, mcIdType > > &  part,
mcIdType  ghostSize,
double  factor,
DataArrayDouble da 
)
static

This method multiplies by factor values in tuples located by part in da.

Parameters
[in]st- the structure of grid ( without considering ghost cells).
[in]part- the part in the structure ( without considering ghost cells) contained in grid whose structure is defined by st.
[in]ghostSize- ghostSize must be >= 0.
[in]factor- the factor, the tuples in da will be multiply by.
[in,out]da- The DataArray in which only tuples specified by part will be modified.
See also
MultiplyPartOf, PutInGhostFormat

References MultiplyPartOf(), and PutInGhostFormat().

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

◆ PutInGhostFormat()

void MEDCouplingStructuredMesh::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

This method multiplies by factor values in tuples located by part in da.

Parameters
[in]st- the structure of grid ( without considering ghost cells).
[in]part- the part in the structure ( without considering ghost cells) contained in grid whose structure is defined by st.
[in]ghostSize- ghostSize must be >= 0.
[out]stWithGhost- the structure considering ghost cells.
[out]partWithGhost- the part considering the ghost cells.
See also
MultiplyPartOf, PutInGhostFormat

References ApplyGhostOnCompactFrmt().

Referenced by MultiplyPartOfByGhost().

◆ ApplyGhostOnCompactFrmt()

void MEDCouplingStructuredMesh::ApplyGhostOnCompactFrmt ( std::vector< std::pair< mcIdType, mcIdType > > &  partBeforeFact,
mcIdType  ghostSize 
)
static
Parameters
[in,out]partBeforeFact- the part of a image mesh in compact format that will be put in ghost reference.
[in]ghostSize- the ghost size of zone for all axis.

Referenced by MEDCoupling::MEDCouplingAMRAttribute::buildCellFieldOnWithoutGhost(), MEDCoupling::MEDCouplingCartesianAMRMeshGen::extractGhostFrom(), PutInGhostFormat(), and MEDCoupling::MEDCouplingAMRAttribute::writeVTHB().

◆ Build1GTNodalConnectivity()

DataArrayIdType * MEDCouplingStructuredMesh::Build1GTNodalConnectivity ( const mcIdType *  nodeStBg,
const mcIdType *  nodeStEnd 
)
static
Returns
DataArrayIdType * - newly allocated instance of nodal connectivity compatible for MEDCoupling1SGTMesh instance

References ZipNodeStructure().

Referenced by build1SGTUnstructured().

◆ Build1GTNodalConnectivityOfSubLevelMesh()

DataArrayIdType * MEDCouplingStructuredMesh::Build1GTNodalConnectivityOfSubLevelMesh ( const mcIdType *  nodeStBg,
const mcIdType *  nodeStEnd 
)
static

Referenced by build1SGTSubLevelMesh().

◆ ComputeCornersGhost()

DataArrayIdType * MEDCouplingStructuredMesh::ComputeCornersGhost ( const std::vector< mcIdType > &  st,
mcIdType  ghostLev 
)
static

This method returns the list of ids sorted ascendingly of entities that are in the corner in ghost zone. The ids are returned in a newly created DataArrayIdType having a single component.

Parameters
[in]st- The structure without ghost cells.
[in]ghostLev- The size of the ghost zone (>=0)
Returns
DataArrayIdType * - The DataArray containing all the ids the caller is to deallocate.

◆ DeduceNumberOfGivenRangeInCompactFrmt()

mcIdType MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt ( const std::vector< std::pair< mcIdType, mcIdType > > &  partCompactFormat)
static

This method retrieves the number of entities (it can be cells or nodes) given a range in compact standard format used in methods like BuildExplicitIdsFrom,IsPartStructured.

See also
BuildExplicitIdsFrom,IsPartStructured

Referenced by MEDCoupling::MEDCouplingIMesh::CondenseFineToCoarse(), and MEDCoupling::MEDCouplingIMesh::SpreadCoarseToFine().

◆ DeduceNumberOfGivenStructure()

◆ FindTheWidestAxisOfGivenRangeInCompactFrmt()

void MEDCouplingStructuredMesh::FindTheWidestAxisOfGivenRangeInCompactFrmt ( const std::vector< std::pair< mcIdType, mcIdType > > &  partCompactFormat,
int &  axisId,
mcIdType &  sizeOfRange 
)
static

◆ FindMinimalPartOf()

mcIdType MEDCouplingStructuredMesh::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

This method is NOT wrapped in python because it has no sense in python (for performance reasons). This method starts from a structured mesh with structure st on which a boolean field crit is set. This method find for such minimalist information of mesh and field which is the part of the mesh, given by the range per axis in output parameter partCompactFormat that contains all the True in crit. The returned vector of boolean is the field reduced to that part. So the number of True is equal in st and in returned vector of boolean.

Parameters
[in]minPatchLgth- minimum length that the patch may have for all directions.
[in]st- The structure per axis of the structured mesh considered.
[in]crit- The field of boolean (for performance reasons) lying on the mesh defined by st.
[out]partCompactFormat- The minimal part of st containing all the true of crit.
[out]reducedCrit- The reduction of criterion on partCompactFormat.
Returns
- The number of True in st (that is equal to those in reducedCrit)

References DeduceNumberOfGivenStructure(), ExtractFieldOfBoolFrom(), and GetDimensionsFromCompactFrmt().

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

◆ ComputeSignaturePerAxisOf()

std::vector< std::vector< mcIdType > > MEDCouplingStructuredMesh::ComputeSignaturePerAxisOf ( const std::vector< mcIdType > &  st,
const std::vector< bool > &  crit 
)
static

This method is NOT wrapped in python. This method considers crit input parameter as a matrix having dimensions specified by st. This method returns for each axis the signature, that is to say the number of elems equal to true in crit along this axis.

◆ ZipNodeStructure()

int MEDCouplingStructuredMesh::ZipNodeStructure ( const mcIdType *  nodeStBg,
const mcIdType *  nodeStEnd,
mcIdType  zipNodeSt[3] 
)
staticprotected

This method computes given the nodal structure defined by [ nodeStBg , nodeStEnd ) the zipped form. std::distance( nodeStBg, nodeStEnd ) is equal to the space dimension. The returned value is equal to the meshDimension (or the zipped spaceDimension).

Parameters
[out]zipNodeSt- The zipped node structure
Returns
mcIdType - the

Referenced by Build1GTNodalConnectivity().