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

Public Member Functions

virtual bool areAllNodesFetched () const
 
bool areCellsFrom2MeshEqual (const MEDCouplingPointSet *other, mcIdType cellId, double prec) const
 
bool areCoordsEqual (const MEDCouplingPointSet &other, double prec) const
 
bool areCoordsEqualIfNotWhy (const MEDCouplingPointSet &other, double prec, std::string &reason) const
 
bool areCoordsEqualWithoutConsideringStr (const MEDCouplingPointSet &other, double prec) const
 
virtual MEDCouplingPointSetbuildBoundaryMesh (bool keepCoords) const =0
 
virtual MEDCouplingPointSetbuildFacePartOfMySelfNode (const mcIdType *start, const mcIdType *end, bool fullyIn) const =0
 
DataArrayIdType * buildNewNumberingFromCommonNodesFormat (const DataArrayIdType *comm, const DataArrayIdType *commIndex, mcIdType &newNbOfNodes) const
 
MEDCouplingMeshbuildPart (const mcIdType *start, const mcIdType *end) const
 
MEDCouplingMeshbuildPartAndReduceNodes (const mcIdType *start, const mcIdType *end, DataArrayIdType *&arr) const
 
virtual MEDCouplingPointSetbuildPartOfMySelf (const mcIdType *start, const mcIdType *end, bool keepCoords=true) const
 
virtual MEDCouplingPointSetbuildPartOfMySelfKeepCoords (const mcIdType *begin, const mcIdType *end) const =0
 
virtual MEDCouplingPointSetbuildPartOfMySelfKeepCoordsSlice (mcIdType start, mcIdType end, mcIdType step) const =0
 
virtual MEDCouplingPointSetbuildPartOfMySelfNode (const mcIdType *start, const mcIdType *end, bool fullyIn) const
 
virtual MEDCouplingPointSetbuildPartOfMySelfSlice (mcIdType start, mcIdType end, mcIdType step, bool keepCoords=true) const
 
MEDCouplingMeshbuildPartRange (mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const
 
MEDCouplingMeshbuildPartRangeAndReduceNodes (mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType &beginOut, mcIdType &endOut, mcIdType &stepOut, DataArrayIdType *&arr) const
 
DataArrayIdType * buildPermArrayForMergeNode (double precision, mcIdType limitNodeId, bool &areNodesMerged, mcIdType &newNbOfNodes) const
 
void changeSpaceDimension (int newSpaceDim, double dftVal=0.)
 
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
 
void checkFastEquivalWith (const MEDCouplingMesh *other, double prec) const
 
virtual void checkFullyDefined () const =0
 
virtual MEDCouplingFieldDoublecomputeDiameterField () const =0
 
virtual DataArrayIdType * computeFetchedNodeIds () const =0
 
virtual void computeNodeIdsAlg (std::vector< bool > &nodeIdsInUse) const =0
 
void copyTinyStringsFrom (const MEDCouplingMesh *other)
 
virtual MEDCouplingPointSetdeepCopyConnectivityOnly () const =0
 
void duplicateNodesInCoords (const mcIdType *nodeIdsToDuplicateBg, const mcIdType *nodeIdsToDuplicateEnd)
 
virtual void fillCellIdsToKeepFromNodeIds (const mcIdType *begin, const mcIdType *end, bool fullyIn, DataArrayIdType *&cellIdsKeptArr) const =0
 
virtual DataArrayIdType * findBoundaryNodes () const =0
 
virtual void findCommonCells (int compType, mcIdType startCellId, DataArrayIdType *&commonCellsArr, DataArrayIdType *&commonCellsIArr) const =0
 
void findCommonNodes (double prec, mcIdType limitNodeId, DataArrayIdType *&comm, DataArrayIdType *&commIndex) const
 
void findNodesOnLine (const double *pt, const double *vec, double eps, std::vector< mcIdType > &nodes) const
 
void findNodesOnPlane (const double *pt, const double *vec, double eps, std::vector< mcIdType > &nodes) const
 
void getBoundingBox (double *bbox) const
 
virtual DataArrayDoublegetBoundingBoxForBBTree (double arcDetEps=1e-12) const =0
 
double getCaracteristicDimension () const
 
DataArrayIdType * getCellIdsFullyIncludedInNodeIds (const mcIdType *partBg, const mcIdType *partEnd) const
 
DataArrayIdType * getCellIdsLyingOnNodes (const mcIdType *begin, const mcIdType *end, bool fullyIn) const
 
virtual DataArrayIdType * getCellsInBoundingBox (const double *bbox, double eps) const =0
 
virtual DataArrayIdType * getCellsInBoundingBox (const INTERP_KERNEL::DirectedBoundingBox &bbox, double eps)=0
 
DataArrayDoublegetCoordinatesAndOwner () const
 
void getCoordinatesOfNode (mcIdType nodeId, std::vector< double > &coo) const
 
DataArrayDoublegetCoords ()
 
const DataArrayDoublegetCoords () const
 
const DataArrayDoublegetDirectAccessOfCoordsArrIfInStructure () const
 
std::vector< const BigMemoryObject * > getDirectChildrenWithNull () const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
virtual DataArrayIdType * getNodeIdsInUse (mcIdType &nbrOfNodesInUse) const =0
 
DataArrayIdType * getNodeIdsNearPoint (const double *pos, double eps) const
 
void getNodeIdsNearPoints (const double *pos, mcIdType nbOfPoints, double eps, DataArrayIdType *&c, DataArrayIdType *&cI) const
 
mcIdType getNumberOfNodes () const
 
virtual mcIdType getNumberOfNodesInCell (mcIdType cellId) const =0
 
int getSpaceDimension () const
 
void getTinySerializationInformation (std::vector< double > &tinyInfoD, std::vector< mcIdType > &tinyInfo, std::vector< std::string > &littleStrings) const
 
virtual void invertOrientationOfAllCells ()=0
 
virtual bool isEmptyMesh (const std::vector< mcIdType > &tinyInfo) const =0
 
bool isEqualIfNotWhy (const MEDCouplingMesh *other, double prec, std::string &reason) const
 
bool isEqualWithoutConsideringStr (const MEDCouplingMesh *other, double prec) const
 
virtual MEDCouplingPointSetmergeMyselfWithOnSameCoords (const MEDCouplingPointSet *other) const =0
 
virtual DataArrayIdType * mergeNodes (double precision, bool &areNodesMerged, mcIdType &newNbOfNodes)
 
virtual DataArrayIdType * mergeNodesCenter (double precision, bool &areNodesMerged, mcIdType &newNbOfNodes)
 
void recenterForMaxPrecision (double eps)
 
virtual void renumberNodes (const mcIdType *newNodeNumbers, mcIdType newNbOfNodes)
 
virtual void renumberNodesCenter (const mcIdType *newNodeNumbers, mcIdType newNbOfNodes)
 
virtual void renumberNodesInConn (const INTERP_KERNEL::HashMap< mcIdType, mcIdType > &newNodeNumbersO2N)=0
 
virtual void renumberNodesInConn (const mcIdType *newNodeNumbersO2N)=0
 
virtual void renumberNodesInConn (const std::map< mcIdType, mcIdType > &newNodeNumbersO2N)=0
 
virtual void renumberNodesWithOffsetInConn (mcIdType offset)=0
 
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 *coords)
 
virtual void shallowCopyConnectivityFrom (const MEDCouplingPointSet *other)=0
 
void translate (const double *vector)
 
void tryToShareSameCoords (const MEDCouplingPointSet &other, double epsilon)
 
virtual void tryToShareSameCoordsPermute (const MEDCouplingPointSet &other, double epsilon)
 
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
 
virtual DataArrayIdType * zipConnectivityTraducer (int compType, mcIdType startCellId=0)
 
void zipCoords ()
 
virtual DataArrayIdType * zipCoordsTraducer ()
 
- Public Member Functions inherited from MEDCoupling::MEDCouplingMesh
virtual std::string advancedRepr () const =0
 
virtual bool areCompatibleForMerge (const MEDCouplingMesh *other) const
 
virtual MEDCouplingFieldDoublebuildOrthogonalField () const =0
 
virtual MEDCouplingUMeshbuildUnstructured () const =0
 
virtual void checkConsistency (double eps=1e-12) const =0
 
void checkGeoEquivalWith (const MEDCouplingMesh *other, int levOfCheck, double prec, DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const
 
virtual DataArrayIdType * checkTypeConsistencyAndContig (const std::vector< mcIdType > &code, const std::vector< const DataArrayIdType * > &idsPerType) const =0
 
virtual MEDCouplingMeshclone (bool recDeepCpy) const =0
 
virtual DataArrayDoublecomputeCellCenterOfMass () const =0
 
virtual DataArrayIdType * computeEffectiveNbOfNodesPerCell () const =0
 
virtual DataArrayDoublecomputeIsoBarycenterOfNodesPerCell () const =0
 
virtual MCAuto< DataArrayDoublecomputeMeshCenterOfMass () const
 
virtual DataArrayIdType * computeNbOfFacesPerCell () const =0
 
virtual DataArrayIdType * computeNbOfNodesPerCell () const =0
 
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 std::set< INTERP_KERNEL::NormalizedCellType > getAllGeoTypes () const =0
 
virtual mcIdType getCellContainingPoint (const double *pos, double eps) const =0
 
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
 
std::string getDescription () const
 
virtual std::vector< mcIdType > getDistributionOfTypes () const =0
 
virtual MEDCouplingFieldDoublegetMeasureField (bool isAbs) const =0
 
virtual MEDCouplingFieldDoublegetMeasureFieldOnNode (bool isAbs) const =0
 
virtual int getMeshDimension () const =0
 
std::string getName () const
 
virtual void getNodeIdsOfCell (mcIdType cellId, std::vector< mcIdType > &conn) const =0
 
virtual mcIdType getNumberOfCells () const =0
 
virtual mcIdType getNumberOfCellsWithType (INTERP_KERNEL::NormalizedCellType type) const =0
 
virtual void getReverseNodalConnectivity (DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const =0
 
double getTime (int &iteration, int &order) const
 
std::string getTimeUnit () const
 
virtual MEDCouplingMeshType getType () const =0
 
virtual INTERP_KERNEL::NormalizedCellType getTypeOfCell (mcIdType cellId) const =0
 
virtual std::string getVTKFileExtension () const =0
 
std::string getVTKFileNameOf (const std::string &fileName) const
 
virtual DataArrayIdType * giveCellsWithType (INTERP_KERNEL::NormalizedCellType type) const =0
 
virtual bool isEqual (const MEDCouplingMesh *other, double prec) const
 
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
 
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 DataArrayIdType * simplexize (int policy)=0
 
virtual void splitProfilePerType (const DataArrayIdType *profile, std::vector< mcIdType > &code, std::vector< DataArrayIdType * > &idsInPflPerType, std::vector< DataArrayIdType * > &idsPerType, bool smartPflKiller=true) const =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
 
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 MEDCouplingPointSetBuildInstanceFromMeshType (MEDCouplingMeshType type)
 
static DataArrayIdType * ComputeNbOfInteractionsWithSrcCells (const MEDCouplingPointSet *srcMesh, const MEDCouplingPointSet *trgMesh, double eps)
 
static DataArrayDoubleMergeNodesArray (const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2)
 
static DataArrayDoubleMergeNodesArray (const std::vector< const MEDCouplingPointSet * > &ms)
 
- 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

void checkConsistencyLight () const
 
 MEDCouplingPointSet ()
 
 MEDCouplingPointSet (const MEDCouplingPointSet &other, bool deepCpy)
 
void project2DCellOnXY (const mcIdType *startConn, const mcIdType *endConn, std::vector< double > &res) const
 
void rotate2D (const double *center, double angle)
 
void rotate3D (const double *center, const double *vect, double angle)
 
 ~MEDCouplingPointSet ()
 
- 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 bool intersectsBoundingBox (const double *bb1, const double *bb2, int dim, double eps)
 
static bool intersectsBoundingBox (const INTERP_KERNEL::DirectedBoundingBox &bb1, const double *bb2, int dim, double eps)
 
static bool isButterfly2DCell (const std::vector< double > &res, bool isQuad, double eps)
 

Protected Attributes

DataArrayDouble_coords
 

Detailed Description

This class is abstract and not instanciable. MEDCoupling::MEDCouplingUMesh class inherits from this class. This class aggregates an array '_coords' containing nodes coordinates. So all operations on coordinates are managed by this class. This is the case for example for following methods : rotation, translation, scaling, getNodeIdsNearPoint, boundingbox...

Constructor & Destructor Documentation

◆ MEDCouplingPointSet() [1/2]

MEDCouplingPointSet::MEDCouplingPointSet ( )
protected

◆ MEDCouplingPointSet() [2/2]

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

◆ ~MEDCouplingPointSet()

MEDCouplingPointSet::~MEDCouplingPointSet ( )
protected

Member Function Documentation

◆ updateTime()

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

Reimplemented in MEDCoupling::MEDCouplingUMesh.

References _coords, and MEDCoupling::TimeLabel::updateTimeWith().

Referenced by changeSpaceDimension(), recenterForMaxPrecision(), rotate(), scale(), translate(), MEDCoupling::MEDCoupling1SGTUMesh::updateTime(), MEDCoupling::MEDCoupling1DGTUMesh::updateTime(), and MEDCoupling::MEDCouplingUMesh::updateTime().

◆ getHeapMemorySizeWithoutChildren()

◆ getDirectChildrenWithNull()

◆ getNumberOfNodes()

mcIdType MEDCouplingPointSet::getNumberOfNodes ( ) const
virtual

Implements MEDCoupling::MEDCouplingMesh.

References _coords, and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

Referenced by areAllNodesFetched(), MEDCoupling::MEDCouplingUMesh::buildExtrudedMesh(), buildNewNumberingFromCommonNodesFormat(), buildPermArrayForMergeNode(), MEDCoupling::MEDCoupling1SGTUMesh::checkConsistency(), MEDCoupling::MEDCoupling1DGTUMesh::checkConsistency(), MEDCoupling::MEDCouplingUMesh::checkConsistency(), checkDeepEquivalWith(), MEDCoupling::MEDCouplingUMesh::computeCellNeighborhoodFromNodesOne(), MEDCoupling::MEDCouplingUMesh::computeEnlargedNeighborsOfNodes(), MEDCoupling::MEDCoupling1SGTUMesh::computeFetchedNodeIds(), MEDCoupling::MEDCoupling1DGTUMesh::computeFetchedNodeIds(), MEDCoupling::MEDCoupling1SGTUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCoupling1DGTUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCouplingUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCouplingUMesh::computeNeighborsOfNodes(), MEDCoupling::MEDCouplingUMesh::computePlaneEquationOf3DFaces(), MEDCoupling::MEDCouplingUMesh::duplicateNodes(), findNodesOnLine(), findNodesOnPlane(), MEDCoupling::MEDCoupling1SGTUMesh::getBoundingBoxForBBTree(), MEDCoupling::MEDCoupling1DGTUMesh::getBoundingBoxForBBTree(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTreeFast(), getCoordinatesOfNode(), MEDCoupling::MEDCouplingUMesh::getMeasureFieldOnNode(), MEDCoupling::MEDCoupling1SGTUMesh::getNodeIdsInUse(), MEDCoupling::MEDCoupling1DGTUMesh::getNodeIdsInUse(), MEDCoupling::MEDCouplingUMesh::getNodeIdsInUse(), MEDCoupling::MEDCoupling1SGTUMesh::getReverseNodalConnectivity(), MEDCoupling::MEDCoupling1DGTUMesh::getReverseNodalConnectivity(), MEDCoupling::MEDCouplingUMesh::getReverseNodalConnectivity(), getTinySerializationInformation(), MEDCoupling::MEDCouplingUMesh::project1D(), MEDCoupling::MEDCouplingFieldDouble::renumberNodes(), renumberNodesCenter(), MEDCoupling::MEDCoupling1SGTUMesh::renumberNodesInConn(), MEDCoupling::MEDCoupling1DGTUMesh::renumberNodesInConn(), rotate2D(), rotate3D(), scale(), MEDCoupling::MEDCoupling1SGTUMesh::simpleRepr(), MEDCoupling::MEDCoupling1DGTUMesh::simpleRepr(), MEDCoupling::MEDCouplingUMesh::simpleRepr(), MEDCoupling::MEDCoupling1SGTUMesh::structurizeMe(), MEDCoupling::MEDCouplingUMesh::tetrahedrize(), translate(), tryToShareSameCoordsPermute(), and MEDCoupling::MEDCouplingUMesh::writeVTKLL().

◆ getSpaceDimension()

int MEDCouplingPointSet::getSpaceDimension ( ) const
virtual

Implements MEDCoupling::MEDCouplingMesh.

References _coords, and MEDCoupling::DataArray::getNumberOfComponents().

Referenced by MEDCoupling::InterpolationMatrix::addContribution(), MEDCoupling::MEDCouplingUMesh::are2DCellsNotCorrectlyOriented(), MEDCoupling::MEDCouplingUMesh::arePolyhedronsNotCorrectlyOriented(), MEDCoupling::MEDCouplingUMesh::buildDirectionVectorField(), MEDCoupling::MEDCouplingUMesh::buildExtrudedMesh(), MEDCoupling::MEDCouplingUMesh::buildOrthogonalField(), MEDCoupling::MEDCouplingUMesh::buildPartOrthogonalField(), MEDCoupling::MEDCouplingUMesh::buildSlice3D(), MEDCoupling::MEDCouplingUMesh::buildSlice3DSurf(), MEDCoupling::MEDCouplingUMesh::buildSpreadZonesWithPoly(), MEDCoupling::MEDCouplingUMesh::buildUnionOf2DMesh(), MEDCoupling::MEDCouplingUMesh::buildUnionOf3DMesh(), changeSpaceDimension(), MEDCoupling::MEDCouplingUMesh::checkButterflyCells(), MEDCoupling::MEDCouplingUMesh::clipSingle3DCellByPlane(), MEDCoupling::MEDCouplingUMesh::colinearizeEdges(), MEDCoupling::MEDCouplingUMesh::computeCellCenterOfMass(), MEDCoupling::MEDCoupling1SGTUMesh::computeDiameterField(), MEDCoupling::MEDCouplingUMesh::computeDiameterField(), MEDCoupling::MEDCoupling1SGTUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCoupling1DGTUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCouplingUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCouplingUMesh::computePlaneEquationOf3DFaces(), MEDCoupling::MEDCoupling1SGTUMesh::computeTriangleHeight(), MEDCoupling::MEDCouplingUMesh::conformize2D(), MEDCoupling::MEDCouplingUMesh::conformize3D(), MEDCoupling::MEDCouplingUMesh::convertExtrudedPolyhedra(), MEDCoupling::MEDCouplingUMesh::convexEnvelop2D(), MEDCoupling::MEDCouplingUMesh::distanceToPoint(), MEDCoupling::MEDCouplingUMesh::distanceToPoints(), MEDCoupling::MEDCouplingUMesh::findAndCorrectBadOriented3DCells(), MEDCoupling::MEDCouplingUMesh::findAndCorrectBadOriented3DExtrudedCells(), findNodesOnLine(), findNodesOnPlane(), MEDCoupling::MEDCouplingUMesh::getAspectRatioField(), MEDCoupling::MEDCoupling1SGTUMesh::getBoundingBoxForBBTree(), MEDCoupling::MEDCoupling1DGTUMesh::getBoundingBoxForBBTree(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTreeFast(), MEDCoupling::MEDCouplingUMesh::getCellIdsCrossingPlane(), MEDCoupling::MEDCouplingUMesh::getCellsInBoundingBox(), getCoordinatesOfNode(), MEDCoupling::MEDCouplingUMesh::getEdgeRatioField(), MEDCoupling::MEDCouplingUMesh::getFastAveragePlaneOfThis(), MEDCoupling::MEDCouplingUMesh::getMeasureField(), getNodeIdsNearPoints(), MEDCoupling::MEDCouplingUMesh::getPartBarycenterAndOwner(), MEDCoupling::MEDCouplingUMesh::getPartMeasureField(), MEDCoupling::MEDCouplingUMesh::getSkewField(), getTinySerializationInformation(), MEDCoupling::MEDCouplingUMesh::getWarpField(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshes(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshWith1DLine(), MEDCoupling::MEDCouplingGaussLocalization::localizePtsInRefCooForEachCell(), MergeNodesArray(), MEDCoupling::MEDCouplingUMesh::orientCorrectly2DCells(), MEDCoupling::MEDCouplingUMesh::orientCorrectlyPolyhedrons(), MEDCoupling::MEDCouplingUMesh::project1D(), MEDCoupling::MEDCouplingMappedExtrudedMesh::Project1DMeshes(), project2DCellOnXY(), renumberNodesCenter(), rotate(), scale(), MEDCoupling::MEDCoupling1SGTUMesh::simpleRepr(), MEDCoupling::MEDCoupling1DGTUMesh::simpleRepr(), MEDCoupling::MEDCouplingUMesh::simpleRepr(), MEDCoupling::MEDCouplingUMesh::simplifyPolyhedra(), MEDCoupling::MEDCouplingUMesh::split2DCells(), MEDCoupling::MEDCoupling1SGTUMesh::structurizeMe(), MEDCoupling::MEDCouplingUMesh::tessellate2D(), MEDCoupling::MEDCouplingUMesh::tetrahedrize(), translate(), and MEDCoupling::MEDCouplingUMesh::writeVTKLL().

◆ setCoords()

◆ getCoords() [1/2]

const DataArrayDouble* MEDCoupling::MEDCouplingPointSet::getCoords ( ) const

References _coords.

Referenced by MEDCoupling::MEDCoupling1GTUMesh::AggregateOnSameCoordsToUMesh(), MEDCoupling::MEDCouplingUMesh::buildDirectionVectorField(), MEDCoupling::MEDCouplingUMesh::buildSpreadZonesWithPoly(), MEDCoupling::MEDCoupling1SGTUMesh::buildUnstructured(), MEDCoupling::MEDCoupling1DGTUMesh::buildUnstructured(), changeSpaceDimension(), MEDCoupling::MEDCouplingUMesh::colinearizeEdges(), MEDCoupling::MEDCouplingUMesh::computeCellCenterOfMass(), MEDCoupling::MEDCoupling1SGTUMesh::computeDiameterField(), MEDCoupling::MEDCouplingUMesh::computeDiameterField(), MEDCoupling::MEDCoupling1SGTUMesh::computeTriangleHeight(), MEDCoupling::MEDCouplingUMesh::conformize2D(), MEDCoupling::MEDCouplingUMesh::conformize3D(), MEDCoupling::MEDCouplingUMesh::convertIntoSingleGeoTypeMesh(), MEDCoupling::MEDCouplingUMesh::convexEnvelop2D(), MEDCoupling::MEDCoupling1DGTUMesh::copyWithNodalConnectivityPacked(), MEDCoupling::MEDCouplingUMesh::emulateMEDMEMBDC(), MEDCoupling::MEDCoupling1SGTUMesh::explodeEachHexa8To6Quad4(), MEDCoupling::MEDCouplingUMesh::explodeMeshTo(), MEDCoupling::MEDCouplingUMesh::findAndCorrectBadOriented3DExtrudedCells(), MEDCoupling::MEDCouplingUMesh::findCellIdsLyingOn(), MEDCoupling::MEDCouplingUMesh::findCellsToRenumber(), MEDCoupling::MEDCouplingUMesh::findNodesToDuplicate(), MEDCoupling::MEDCouplingUMesh::getCellsInBoundingBox(), MEDCoupling::MEDCouplingUMesh::getMeasureField(), MEDCoupling::MEDCouplingUMesh::getPartMeasureField(), getTinySerializationInformation(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshes(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshWith1DLine(), MEDCoupling::MEDCouplingGaussLocalization::localizePtsInRefCooForEachCell(), MEDCoupling::MEDCoupling1DGTUMesh::Merge1DGTUMeshes(), MEDCoupling::MEDCoupling1SGTUMesh::Merge1SGTUMeshes(), MergeNodesArray(), MEDCoupling::MEDCouplingUMesh::MergeUMeshes(), MEDCoupling::MEDCoupling1SGTUMesh::New(), MEDCoupling::MEDCoupling1DGTUMesh::New(), MEDCoupling::UMeshCoordsFunctor::operator()(), MEDCoupling::MEDCouplingUMesh::orientCorrectly2DCells(), MEDCoupling::MEDCouplingUMesh::project1D(), MEDCoupling::MEDCouplingMappedExtrudedMesh::Project1DMeshes(), serialize(), MEDCoupling::MEDFileUMesh::setMeshes(), MEDCoupling::MEDCouplingUMesh::setPartOfMySelf(), MEDCoupling::MEDCouplingUMesh::setPartOfMySelfSlice(), MEDCoupling::MEDCouplingUMesh::simplifyPolyhedra(), MEDCoupling::MEDCoupling1SGTUMesh::structurizeMe(), MEDCoupling::MEDCouplingUMesh::tetrahedrize(), tryToShareSameCoordsPermute(), unserialization(), and WriteFieldT().

◆ getCoords() [2/2]

DataArrayDouble* MEDCoupling::MEDCouplingPointSet::getCoords ( )

References _coords.

◆ getCoordinatesAndOwner()

DataArrayDouble * MEDCouplingPointSet::getCoordinatesAndOwner ( ) const
virtual

Returns a pointer to the array of point coordinates held by this.

Returns
DataArrayDouble * - the pointer to the array of point coordinates. The caller is to delete this array using decrRef() as it is no more needed.

Implements MEDCoupling::MEDCouplingMesh.

References _coords, and MEDCoupling::RefCountObjectOnly::incrRef().

◆ getDirectAccessOfCoordsArrIfInStructure()

const DataArrayDouble* MEDCoupling::MEDCouplingPointSet::getDirectAccessOfCoordsArrIfInStructure ( ) const
virtual

Implements MEDCoupling::MEDCouplingMesh.

References _coords.

◆ copyTinyStringsFrom()

void MEDCouplingPointSet::copyTinyStringsFrom ( const MEDCouplingMesh other)
virtual

Copies string attributes from an other mesh. The copied strings are

  • mesh name
  • mesh description
  • time units
  • textual data of the coordinates array (name and components info)
Parameters
[in]other- the mesh to copy string attributes from.

Reimplemented from MEDCoupling::MEDCouplingMesh.

References _coords, MEDCoupling::DataArray::copyStringInfoFrom(), and MEDCoupling::MEDCouplingMesh::copyTinyStringsFrom().

◆ isEqualIfNotWhy()

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

◆ isEqualWithoutConsideringStr()

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

Checks equality of point coordinates with coordinates of an other mesh. None textual data is considered.

Parameters
[in]other- the mesh to compare coordinates with this one.
[in]prec- precision value to compare coordinates.
Returns
bool - true if coordinates of points are equal, false else.

Implements MEDCoupling::MEDCouplingMesh.

Reimplemented in MEDCoupling::MEDCouplingUMesh.

References areCoordsEqualWithoutConsideringStr().

Referenced by MEDCoupling::MEDCoupling1GTUMesh::isEqualWithoutConsideringStr(), and MEDCoupling::MEDCouplingUMesh::isEqualWithoutConsideringStr().

◆ checkFastEquivalWith()

void MEDCouplingPointSet::checkFastEquivalWith ( const MEDCouplingMesh other,
double  prec 
) const
virtual

◆ checkDeepEquivalWith()

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

Checks if this and other meshes are geometrically equivalent, else an exception is thrown. The meshes are considered equivalent if (1) this mesh contains the same nodes as the other mesh (with a specified precision) and (2) this mesh contains the same cells as the other mesh (with use of a specified cell comparison technique). The mapping from other to this for nodes and cells is returned via out parameters.

If cellCor is null (or Py_None) it means that for all #i cell in other is equal to cell # i in this.

If nodeCor is null (or Py_None) it means that for all #i node in other is equal to node # i in this.

So null (or Py_None) returned in cellCor and/or nodeCor means identity array. This is for optimization reason to avoid building useless arrays for some levOfCheck (for example 0).

Parameters
[in]other- the mesh to compare with.
[in]cellCompPol- id [0-2] of cell comparison method. See meaning of each method in description of MEDCouplingPointSet::zipConnectivityTraducer().
[in]prec- the precision used to compare nodes of the two meshes.
[out]cellCor- a cell permutation array in "Old to New" mode. The caller is to delete this array using decrRef() as it is no more needed.
[out]nodeCor- a node permutation array in "Old to New" mode. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthe two meshes do not match.

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

Implements MEDCoupling::MEDCouplingMesh.

References MEDCoupling::MEDCouplingMesh::getNumberOfCells(), getNumberOfNodes(), and MEDCoupling::MEDCouplingMesh::mergeMyselfWith().

◆ checkDeepEquivalOnSameNodesWith()

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

Checks if this and other meshes are geometrically equivalent, else an exception is thrown. The meshes are considered equivalent if (1) they share one node coordinates array and (2) they contain the same cells (with use of a specified cell comparison technique). The mapping from cells of the other to ones of this is returned via an out parameter.

If cellCor is null (or Py_None) it means that for all #i cell in other is equal to cell # i in this.

Parameters
[in]other- the mesh to compare with.
[in]cellCompPol- id [0-2] of cell comparison method. See the meaning of each method in description of MEDCouplingPointSet::zipConnectivityTraducer().
[in]prec- a not used parameter.
[out]cellCor- the permutation array in "Old to New" mode. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthe two meshes do not match.

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

Implements MEDCoupling::MEDCouplingMesh.

References _coords, MEDCoupling::MEDCouplingMesh::getNumberOfCells(), and mergeMyselfWithOnSameCoords().

◆ areCoordsEqualIfNotWhy()

bool MEDCouplingPointSet::areCoordsEqualIfNotWhy ( const MEDCouplingPointSet other,
double  prec,
std::string &  reason 
) const

◆ areCoordsEqual()

bool MEDCouplingPointSet::areCoordsEqual ( const MEDCouplingPointSet other,
double  prec 
) const

Checks equality of point coordinates with other point coordinates. Textual data (name and components info) is compared as well.

Parameters
[in]other- the point coordinates to compare with this one.
[in]prec- precision value to compare coordinates.
Returns
bool - true if coordinates of points are equal, false else.

References areCoordsEqualIfNotWhy().

◆ areCoordsEqualWithoutConsideringStr()

bool MEDCouplingPointSet::areCoordsEqualWithoutConsideringStr ( const MEDCouplingPointSet other,
double  prec 
) const

Checks equality of point coordinates with other point coordinates. None textual data is considered.

Parameters
[in]other- the point coordinates to compare with this one.
[in]prec- precision value to compare coordinates.
Returns
bool - true if coordinates of points are equal, false else.

References _coords, and MEDCoupling::DataArrayDouble::isEqualWithoutConsideringStr().

Referenced by isEqualWithoutConsideringStr().

◆ deepCopyConnectivityOnly()

virtual MEDCouplingPointSet* MEDCoupling::MEDCouplingPointSet::deepCopyConnectivityOnly ( ) const
pure virtual

◆ shallowCopyConnectivityFrom()

virtual void MEDCoupling::MEDCouplingPointSet::shallowCopyConnectivityFrom ( const MEDCouplingPointSet other)
pure virtual

◆ mergeNodes()

DataArrayIdType * MEDCouplingPointSet::mergeNodes ( double  precision,
bool &  areNodesMerged,
mcIdType &  newNbOfNodes 
)
virtual

Merges nodes equal within precision and returns an array describing the permutation used to remove duplicate nodes.

Parameters
[in]precision- minimal absolute distance between two nodes at which they are considered not coincident.
[out]areNodesMerged- is set to true if any coincident nodes removed.
[out]newNbOfNodes- number of nodes remaining after the removal.
Returns
DataArrayIdType * - the permutation array in "Old to New" mode. For more info on "Old to New" mode see Array indexing and numbering. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthe coordinates array is not set.
Ifthe nodal connectivity of cells is not defined.

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

References buildPermArrayForMergeNode(), and renumberNodes().

Referenced by MEDCoupling::MEDCouplingUMesh::conformize2D().

◆ mergeNodesCenter()

DataArrayIdType * MEDCouplingPointSet::mergeNodesCenter ( double  precision,
bool &  areNodesMerged,
mcIdType &  newNbOfNodes 
)
virtual

Merges nodes equal within precision and returns an array describing the permutation used to remove duplicate nodes. In contrast to mergeNodes(), location of merged nodes is changed to be at their barycenter.

Parameters
[in]precision- minimal absolute distance between two nodes at which they are considered not coincident.
[out]areNodesMerged- is set to true if any coincident nodes removed.
[out]newNbOfNodes- number of nodes remaining after the removal.
Returns
DataArrayIdType * - the permutation array in "Old to New" mode. For more info on "Old to New" mode see Array indexing and numbering. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthe coordinates array is not set.
Ifthe nodal connectivity of cells is not defined.

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

References buildPermArrayForMergeNode(), and renumberNodesCenter().

◆ mergeMyselfWithOnSameCoords()

virtual MEDCouplingPointSet* MEDCoupling::MEDCouplingPointSet::mergeMyselfWithOnSameCoords ( const MEDCouplingPointSet other) const
pure virtual

◆ computeNodeIdsAlg()

virtual void MEDCoupling::MEDCouplingPointSet::computeNodeIdsAlg ( std::vector< bool > &  nodeIdsInUse) const
pure virtual

◆ getCoordinatesOfNode()

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

Returns coordinates of nodeId-th node.

Parameters
[in]nodeId- the ID of the node of interest.
[in,out]coo- the array filled with coordinates of the nodeId-th node. This array is not cleared before filling in, the coordinates are appended to its end.
Exceptions
Ifthe coordinates array is not set.
IfnodeId is not a valid index for the coordinates array.

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

Implements MEDCoupling::MEDCouplingMesh.

References _coords, MEDCoupling::DataArrayTemplate< T >::getConstPointer(), getNumberOfNodes(), and getSpaceDimension().

Referenced by areCellsFrom2MeshEqual(), and MEDCoupling::MEDCouplingMappedExtrudedMesh::Project1DMeshes().

◆ buildPermArrayForMergeNode()

DataArrayIdType * MEDCouplingPointSet::buildPermArrayForMergeNode ( double  precision,
mcIdType  limitNodeId,
bool &  areNodesMerged,
mcIdType &  newNbOfNodes 
) const

Finds nodes equal within precision and returns an array describing the permutation to remove duplicated nodes.

Parameters
[in]precision- minimal absolute distance between two nodes at which they are considered not coincident.
[in]limitNodeId- limit node id. If all nodes within a group of coincident nodes have id strictly lower than limitTupleId then they are not returned. Put -1 to this parameter to have all nodes returned.
[out]areNodesMerged- is set to true if any coincident nodes found.
[out]newNbOfNodes- returns number of unique nodes.
Returns
DataArrayIdType * - the permutation array in "Old to New" mode. For more info on "Old to New" mode see Array indexing and numbering. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthe coordinates array is not set.

References buildNewNumberingFromCommonNodesFormat(), findCommonNodes(), and getNumberOfNodes().

Referenced by mergeNodes(), mergeNodesCenter(), and tryToShareSameCoordsPermute().

◆ getNodeIdsNearPoint()

DataArrayIdType * MEDCouplingPointSet::getNodeIdsNearPoint ( const double *  pos,
double  eps 
) const

Finds nodes located at distances lower that eps from a given point.

Parameters
[in]pos- pointer to coordinates of the point. This array is expected to be of length this->getSpaceDimension() at least, else the behavior is not warranted.
[in]eps- the lowest distance between a point and a node (using infinite norm) at which the node is not returned by this method.
Returns
DataArrayIdType * - a new instance of DataArrayIdType holding ids of nodes close to the point. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthe coordinates array is not set.

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

References getNodeIdsNearPoints().

◆ getNodeIdsNearPoints()

void MEDCouplingPointSet::getNodeIdsNearPoints ( const double *  pos,
mcIdType  nbOfPoints,
double  eps,
DataArrayIdType *&  c,
DataArrayIdType *&  cI 
) const

Finds nodes located at distances lower that eps from given points.

Parameters
[in]pos- pointer to coordinates of the points. This array is expected to be of length nbOfPoints * this->getSpaceDimension() at least, else the behavior is not warranted.
[in]nbOfPoints- number of points whose coordinates are given by pos parameter.
[in]eps- the lowest distance between (using infinite norm) a point and a node at which the node is not returned by this method.
[out]c- array (Indirect indexing) returning ids of nodes located closer than eps to the given points. The caller is to delete this array using decrRef() as it is no more needed.
[out]cI- for each i-th given point, the array specifies tuples of c holding ids of nodes close to the i-th point (Indirect indexing).
The i-th value of cI is an index of tuple of c holding id of a first (if any) node close to the i-th given point. Difference between the i-th and (i+1)-th value of cI (i.e. cI[ i+1 ] - cI[ i ]) defines number of nodes close to the i-th point (that can be zero!). For example, the group of nodes close to the second point is described by following range of indices [ cI[1], cI[2] ). The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthe coordinates array is not set.

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

References _coords, MEDCoupling::DataArrayDouble::computeTupleIdsNearTuples(), MEDCoupling::CPP_DEALLOC, getSpaceDimension(), and MEDCoupling::DataArrayDouble::New().

Referenced by getNodeIdsNearPoint().

◆ findCommonNodes()

void MEDCouplingPointSet::findCommonNodes ( double  prec,
mcIdType  limitNodeId,
DataArrayIdType *&  comm,
DataArrayIdType *&  commIndex 
) const

Finds nodes coincident within prec tolerance. Ids of coincident nodes are stored in output arrays in the Indirect indexing format.

Parameters
[in]prec- minimal absolute distance (using infinite norm) between two nodes at which they are considered not coincident.
[in]limitNodeId- limit node id. If all nodes within a group of coincident nodes have id strictly lower than limitTupleId then they are not returned. Put -1 to this parameter to have all nodes treated.
[out]comm- the array holding ids of coincident nodes. comm->getNumberOfComponents() == 1. comm->getNumberOfTuples() == commIndex->back(). The caller is to delete this array using decrRef() as it is no more needed.
[out]commIndex- the array dividing all ids stored in comm into groups of (ids of) coincident nodes (Indirect indexing). Its every value is a tuple index where a next group of nodes begins. For example the second group of nodes in comm is described by following range of indices: [ commIndex[1], commIndex[2] ). commIndex->getNumberOfTuples()-1 gives the number of groups of coincident nodes. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthe coordinates array is not set.

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

References _coords, and MEDCoupling::DataArrayDouble::findCommonTuples().

Referenced by buildPermArrayForMergeNode().

◆ findCommonCells()

virtual void MEDCoupling::MEDCouplingPointSet::findCommonCells ( int  compType,
mcIdType  startCellId,
DataArrayIdType *&  commonCellsArr,
DataArrayIdType *&  commonCellsIArr 
) const
pure virtual

◆ buildNewNumberingFromCommonNodesFormat()

DataArrayIdType * MEDCouplingPointSet::buildNewNumberingFromCommonNodesFormat ( const DataArrayIdType *  comm,
const DataArrayIdType *  commIndex,
mcIdType &  newNbOfNodes 
) const
Parameters
commin param in the same format than one returned by findCommonNodes method (Indirect indexing).
commIndexin param in the same format than one returned by findCommonNodes method (Indirect indexing).
newNbOfNodesnew number of nodes
Returns
the old to new correspondence array.

References _coords, and getNumberOfNodes().

Referenced by buildPermArrayForMergeNode().

◆ getBoundingBox()

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

Computes the minimum box bounding all nodes. The edges of the box are parallel to the Cartesian coordinate axes. The bounding box is described by coordinates of its two extremum points with minimal and maximal coordinates.

Parameters
[out]bbox- array filled with coordinates of extremum points in "no interlace" mode, i.e. xMin, xMax, yMin, yMax, zMin, zMax (if in 3D). This array, of length 2 * this->getSpaceDimension() at least, is to be pre-allocated by the caller.
Exceptions
Ifthe coordinates array is not set.

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

Implements MEDCoupling::MEDCouplingMesh.

References _coords, and MEDCoupling::DataArrayDouble::getMinMaxPerComponent().

Referenced by MEDCoupling::MEDCouplingUMesh::getCellIdsCrossingPlane().

◆ zipCoords()

void MEDCouplingPointSet::zipCoords ( )

Removes "free" nodes, i.e. nodes not used to define any element.

Exceptions
Ifthe coordinates array is not set.
Ifthe elements are not defined.

References checkFullyDefined(), and zipCoordsTraducer().

◆ getCaracteristicDimension()

double MEDCouplingPointSet::getCaracteristicDimension ( ) const

Returns the carateristic dimension of this point set, that is a maximal absolute values of node coordinates.

Exceptions
Ifthe coordinates array is not set.

References _coords, MEDCoupling::DataArrayTemplate< T >::getConstPointer(), and MEDCoupling::DataArrayTemplate< T >::getNbOfElems().

Referenced by MEDCoupling::MEDCouplingUMesh::conformize3D().

◆ recenterForMaxPrecision()

void MEDCouplingPointSet::recenterForMaxPrecision ( double  eps)

This method recenter coordinates of nodes in this in order to be centered at the origin to benefit about the advantages of the precision to be around the box around origin of 'radius' 1.

Warning
this method is non const and alterates coordinates in this without modifying.
Parameters
[in]epsabsolute epsilon. under that value of delta between max and min no scale is performed.

References _coords, MEDCoupling::DataArrayDouble::recenterForMaxPrecision(), and updateTime().

◆ rotate()

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

Rotates this set of nodes by angle around either an axis (in 3D) or a point (in 2D).

Parameters
[in]center- coordinates either of an origin of rotation axis (in 3D) or of center of rotation (in 2D). This array is to be of size this->getSpaceDimension() at least.
[in]vector- 3 components of a vector defining direction of the rotation axis in 3D. In 2D this parameter is not used.
[in]angle- the rotation angle in radians.
Exceptions
Ifthe coordinates array is not set.
Ifthis->getSpaceDimension() != 2 && this->getSpaceDimension() != 3.
Ifcenter == NULL
Ifvector == NULL && this->getSpaceDimension() == 3.
IfMagnitude of vector is zero.

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

Implements MEDCoupling::MEDCouplingMesh.

References _coords, MEDCoupling::TimeLabel::declareAsNew(), getSpaceDimension(), rotate2D(), rotate3D(), and updateTime().

◆ translate()

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

Translates this set of nodes.

Parameters
[in]vector- components of a translation vector. This array is to be of size this->getSpaceDimension() at least.
Exceptions
Ifthe coordinates array is not set.
Ifvector == NULL.

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

Implements MEDCoupling::MEDCouplingMesh.

References _coords, MEDCoupling::TimeLabel::declareAsNew(), getNumberOfNodes(), MEDCoupling::DataArrayTemplate< T >::getPointer(), getSpaceDimension(), and updateTime().

◆ scale()

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

Applies scaling transformation to this set of nodes.

Parameters
[in]point- coordinates of a scaling center. This array is to be of size this->getSpaceDimension() at least.
[in]factor- a scale factor.
Exceptions
Ifthe coordinates array is not set.
Ifpoint == NULL.

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

Implements MEDCoupling::MEDCouplingMesh.

References _coords, MEDCoupling::TimeLabel::declareAsNew(), getNumberOfNodes(), MEDCoupling::DataArrayTemplate< T >::getPointer(), getSpaceDimension(), and updateTime().

◆ changeSpaceDimension()

void MEDCouplingPointSet::changeSpaceDimension ( int  newSpaceDim,
double  dftValue = 0. 
)

Converts this set of points to an other dimension by changing number of components of point coordinates. If the dimension increases, added components are filled with dftValue. If the dimension decreases, last components are lost. If the new dimension is same as this->getSpaceDimension(), nothing is done.

Parameters
[in]newSpaceDim- the new space dimension.
[in]dftValue- the value to assign to added components of point coordinates (if the dimension increases).
Exceptions
Ifthe coordinates array is not set.
IfnewSpaceDim < 1.

References MEDCoupling::DataArrayTemplate< T >::changeNbOfComponents(), MEDCoupling::RefCountObjectOnly::decrRef(), getCoords(), getSpaceDimension(), setCoords(), and updateTime().

Referenced by MEDCoupling::MEDCouplingMappedExtrudedMesh::Project1DMeshes().

◆ tryToShareSameCoords()

void MEDCouplingPointSet::tryToShareSameCoords ( const MEDCouplingPointSet other,
double  epsilon 
)

Substitutes this->_coords with other._coords provided that coordinates of the two point sets match with a specified precision, else an exception is thrown.

Parameters
[in]other- the other point set whose coordinates array will be used by this point set in case of their equality.
[in]epsilon- the precision used to compare coordinates.
Exceptions
Ifthe coordinates array of this is not set.
Ifthe coordinates array of other is not set.
Ifthe coordinates of this and other do not match.

References _coords, MEDCoupling::DataArrayDouble::isEqualWithoutConsideringStr(), and setCoords().

◆ duplicateNodesInCoords()

void MEDCouplingPointSet::duplicateNodesInCoords ( const mcIdType *  nodeIdsToDuplicateBg,
const mcIdType *  nodeIdsToDuplicateEnd 
)

This method duplicates the nodes whose ids are in [nodeIdsToDuplicateBg, nodeIdsToDuplicateEnd) and put the result of their duplication at the end of existing node ids.

Parameters
[in]nodeIdsToDuplicateBgbegin of node ids (included) to be duplicated in connectivity only
[in]nodeIdsToDuplicateEndend of node ids (excluded) to be duplicated in connectivity only

References _coords, MEDCoupling::DataArrayDouble::Aggregate(), MEDCoupling::DataArrayDouble::selectByTupleIdSafe(), and setCoords().

Referenced by MEDCoupling::MEDCouplingUMesh::duplicateNodes().

◆ tryToShareSameCoordsPermute()

void MEDCouplingPointSet::tryToShareSameCoordsPermute ( const MEDCouplingPointSet other,
double  epsilon 
)
virtual

Substitutes node coordinates array of this mesh with that of other mesh (i.e. this->_coords with other._coords) provided that coordinates of the two meshes match with a specified precision, else an exception is thrown and this remains unchanged. In case of success the nodal connectivity of this mesh is permuted according to new order of nodes. Contrary to tryToShareSameCoords() this method makes a deeper analysis of coordinates (and so more expensive) than simple equality.

Parameters
[in]other- the other mesh whose node coordinates array will be used by this mesh in case of their equality.
[in]epsilon- the precision used to compare coordinates (using infinite norm).
Exceptions
Ifthe coordinates array of this is not set.
Ifthe coordinates array of other is not set.
Ifthe coordinates of this and other do not match.

References _coords, buildPermArrayForMergeNode(), getCoords(), getNumberOfNodes(), MEDCoupling::RefCountObjectOnly::incrRef(), MergeNodesArray(), renumberNodesInConn(), and setCoords().

◆ findNodesOnPlane()

void MEDCouplingPointSet::findNodesOnPlane ( const double *  pt,
const double *  vec,
double  eps,
std::vector< mcIdType > &  nodes 
) const

Finds nodes located at distance lower that eps from a specified plane.

Parameters
[in]pt- 3 components of a point defining location of the plane.
[in]vec- 3 components of a normal vector to the plane. Vector magnitude must be greater than 10*eps.
[in]eps- maximal distance of a node from the plane at which the node is considered to lie on the plane.
[in,out]nodes- a vector returning ids of found nodes. This vector is not cleared before filling in.
Exceptions
Ifthe coordinates array is not set.
Ifpt == NULL.
Ifvec == NULL.
Ifthe magnitude of vec is zero.
Ifthis->getSpaceDimension() != 3.

References _coords, MEDCoupling::DataArrayTemplate< T >::getConstPointer(), getNumberOfNodes(), and getSpaceDimension().

Referenced by MEDCoupling::MEDCouplingUMesh::buildSlice3D(), and MEDCoupling::MEDCouplingUMesh::clipSingle3DCellByPlane().

◆ findNodesOnLine()

void MEDCouplingPointSet::findNodesOnLine ( const double *  pt,
const double *  vec,
double  eps,
std::vector< mcIdType > &  nodes 
) const

Finds nodes located at distance lower that eps from a specified line in 2D and 3D.

Parameters
[in]pt- components of coordinates of an initial point of the line. This array is to be of size this->getSpaceDimension() at least.
[in]vec- components of a vector defining the line direction. This array is to be of size this->getSpaceDimension() at least. Vector magnitude must be greater than 10*eps.
[in]eps- maximal distance of a node from the line at which the node is considered to lie on the line.
[in,out]nodes- a vector returning ids of found nodes. This vector is not cleared before filling in.
Exceptions
Ifthe coordinates array is not set.
Ifpt == NULL.
Ifvec == NULL.
Ifthe magnitude of vec is zero.
If( this->getSpaceDimension() != 3 && this->getSpaceDimension() != 2 ).

References _coords, MEDCoupling::DataArrayTemplate< T >::getConstPointer(), getNumberOfNodes(), and getSpaceDimension().

◆ MergeNodesArray() [1/2]

DataArrayDouble * MEDCouplingPointSet::MergeNodesArray ( const MEDCouplingPointSet m1,
const MEDCouplingPointSet m2 
)
static

Returns a new array of node coordinates by concatenating node coordinates of two given point sets, so that (1) the number of nodes in the result array is a sum of the number of nodes of given point sets and (2) the number of component in the result array is same as that of each of given point sets. Info on components is copied from the first of the given point set. Space dimension of the given point sets must be the same.

Parameters
[in]m1- a point set whose coordinates will be included in the result array.
[in]m2- another point set whose coordinates will be included in the result array.
Returns
DataArrayDouble * - the new instance of DataArrayDouble. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifboth m1 and m2 are NULL.
Ifm1->getSpaceDimension() != m2->getSpaceDimension().

References MEDCoupling::DataArrayDouble::Aggregate(), getCoords(), and getSpaceDimension().

Referenced by tryToShareSameCoordsPermute().

◆ MergeNodesArray() [2/2]

DataArrayDouble * MEDCouplingPointSet::MergeNodesArray ( const std::vector< const MEDCouplingPointSet * > &  ms)
static

◆ BuildInstanceFromMeshType()

MEDCouplingPointSet * MEDCouplingPointSet::BuildInstanceFromMeshType ( MEDCouplingMeshType  type)
static

◆ ComputeNbOfInteractionsWithSrcCells()

DataArrayIdType * MEDCouplingPointSet::ComputeNbOfInteractionsWithSrcCells ( const MEDCouplingPointSet srcMesh,
const MEDCouplingPointSet trgMesh,
double  eps 
)
static

This method allows to give for each cell in trgMesh, how much it interacts with cells of srcMesh. The returned array can be seen as a weighted array on the target cells of trgMesh input parameter.

Parameters
[in]srcMesh- source mesh
[in]trgMesh- target mesh
[in]eps- precision of the detection
Returns
DataArrayIdType * - An array that gives for each cell of trgMesh, how many cells in srcMesh (regarding the precision of detection eps) can interacts.
Exceptions
IfsrcMesh and trgMesh have not the same space dimension.

References getBoundingBoxForBBTree().

◆ buildPart()

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

Creates a new MEDCouplingMesh containing a part of cells of this mesh. The new mesh shares a coordinates array with this one. 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 MEDCouplingMesh. The caller is to delete this mesh using decrRef() as it is no more needed.

Implements MEDCoupling::MEDCouplingMesh.

References buildPartOfMySelf().

◆ buildPartAndReduceNodes()

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

Creates a new MEDCouplingMesh containing a part of cells of this mesh. The cells to include to the result mesh are specified by an array of cell ids.
This method additionally returns a renumbering map in "Old to New" mode which allows the caller to know the mapping between nodes in this and the result mesh.

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 ].
[out]arr- a new DataArrayIdType that is the "Old to New" renumbering map. The caller is to delete this array using decrRef() as it is no more needed.
Returns
MEDCouplingMesh * - a new instance of MEDCouplingMesh. The caller is to delete this mesh using decrRef() as it is no more needed.

Implements MEDCoupling::MEDCouplingMesh.

References buildPartOfMySelf().

◆ buildPartRange()

MEDCouplingMesh * MEDCouplingPointSet::buildPartRange ( mcIdType  beginCellIds,
mcIdType  endCellIds,
mcIdType  stepCellIds 
) const
virtual

This method specialized the MEDCouplingMesh::buildPartRange. This method is equivalent to MEDCouplingMesh::buildPart method except that here the cell ids are specified using slice beginCellIds endCellIds and stepCellIds. WARNING , there is a big difference compared to MEDCouplingMesh::buildPart method. If the input range is equal all cells in this, this is returned !

Returns
a new ref to be managed by the caller. Warning this ref can be equal to this if input slice is exactly equal to the whole cells in the same order.
See also
MEDCouplingUMesh::buildPartOfMySelfSlice

Reimplemented from MEDCoupling::MEDCouplingMesh.

References buildPartOfMySelfSlice(), MEDCoupling::MEDCouplingMesh::getNumberOfCells(), and MEDCoupling::RefCountObjectOnly::incrRef().

◆ buildPartRangeAndReduceNodes()

MEDCouplingMesh * MEDCouplingPointSet::buildPartRangeAndReduceNodes ( mcIdType  beginCellIds,
mcIdType  endCellIds,
mcIdType  stepCellIds,
mcIdType &  beginOut,
mcIdType &  endOut,
mcIdType &  stepOut,
DataArrayIdType *&  arr 
) const
virtual

This method specialized the MEDCouplingMesh::buildPartRangeAndReduceNodes

Parameters
[out]beginOutvalid only if arr not NULL !
[out]endOutvalid only if arr not NULL !
[out]stepOutvalid only if arr not NULL !
[out]arrcorrespondence old to new in node ids.
See also
MEDCouplingUMesh::buildPartOfMySelfSlice

Reimplemented from MEDCoupling::MEDCouplingMesh.

References buildPartOfMySelfSlice().

◆ getCellIdsFullyIncludedInNodeIds()

DataArrayIdType * MEDCouplingPointSet::getCellIdsFullyIncludedInNodeIds ( const mcIdType *  partBg,
const mcIdType *  partEnd 
) const
virtual

Finds cells whose all nodes are in a given array of node ids. This method is a specialization of MEDCouplingPointSet::getCellIdsLyingOnNodes (true as last input argument).

Parameters
[in]partBg- the array of node ids.
[in]partEnd- a pointer to a (last+1)-th element of partBg.
Returns
DataArrayIdType * - a new instance of DataArrayIdType holding ids of found cells. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthe coordinates array is not set.
Ifthe nodal connectivity of cells is not defined.
Ifany cell id in partBg is not valid.
See also
MEDCouplingPointSet::getCellIdsLyingOnNodes

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

Reimplemented from MEDCoupling::MEDCouplingMesh.

References getCellIdsLyingOnNodes().

◆ getCellIdsLyingOnNodes()

DataArrayIdType * MEDCouplingPointSet::getCellIdsLyingOnNodes ( const mcIdType *  begin,
const mcIdType *  end,
bool  fullyIn 
) const

Finds cells whose all or some nodes are in a given array of node ids.

Parameters
[in]begin- the array of node ids.
[in]end- a pointer to the (last+1)-th element of begin.
[in]fullyIn- if true, then cells whose all nodes are in the array begin are returned only, else cells whose any node is in the array begin are returned.
Returns
DataArrayIdType * - a new instance of DataArrayIdType holding ids of found cells. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthe coordinates array is not set.
Ifthe nodal connectivity of cells is not defined.
Ifany cell id in begin is not valid.
See also
MEDCouplingPointSet::getCellIdsFullyIncludedInNodeIds

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

References fillCellIdsToKeepFromNodeIds(), and MEDCoupling::MEDCouplingMesh::getName().

Referenced by MEDCoupling::MEDCouplingUMesh::findCellIdsLyingOn(), MEDCoupling::MEDCouplingUMesh::findCellsToRenumber(), MEDCoupling::MEDCouplingUMesh::findNodesToDuplicate(), and getCellIdsFullyIncludedInNodeIds().

◆ buildPartOfMySelf()

MEDCouplingPointSet * MEDCouplingPointSet::buildPartOfMySelf ( const mcIdType *  start,
const mcIdType *  end,
bool  keepCoords = true 
) const
virtual

◆ buildPartOfMySelfSlice()

MEDCouplingPointSet * MEDCouplingPointSet::buildPartOfMySelfSlice ( mcIdType  start,
mcIdType  end,
mcIdType  step,
bool  keepCoords = true 
) const
virtual

◆ buildPartOfMySelfKeepCoords()

virtual MEDCouplingPointSet* MEDCoupling::MEDCouplingPointSet::buildPartOfMySelfKeepCoords ( const mcIdType *  begin,
const mcIdType *  end 
) const
pure virtual

◆ buildPartOfMySelfKeepCoordsSlice()

virtual MEDCouplingPointSet* MEDCoupling::MEDCouplingPointSet::buildPartOfMySelfKeepCoordsSlice ( mcIdType  start,
mcIdType  end,
mcIdType  step 
) const
pure virtual

◆ buildPartOfMySelfNode()

MEDCouplingPointSet * MEDCouplingPointSet::buildPartOfMySelfNode ( const mcIdType *  begin,
const mcIdType *  end,
bool  fullyIn 
) const
virtual

Creates a new MEDCouplingUMesh containing some cells of this mesh. The cells to copy are selected basing on specified node ids and the value of fullyIn parameter. If fullyIn ==true, a cell is copied if its all nodes are in the array begin of node ids. If fullyIn ==false, a cell is copied if any its node is in the array of node ids. The created mesh shares the node coordinates array with this mesh.

Parameters
[in]begin- the array of node ids.
[in]end- a pointer to the (last+1)-th element of begin.
[in]fullyIn- if true, then cells whose all nodes are in the array begin are copied, else cells whose any node is in the array begin are copied.
Returns
MEDCouplingPointSet * - new instance of MEDCouplingUMesh. The caller is to delete this mesh using decrRef() as it is no more needed.
Exceptions
Ifthe coordinates array is not set.
Ifthe nodal connectivity of cells is not defined.
Ifany node id in begin is not valid.

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

References buildPartOfMySelf(), and fillCellIdsToKeepFromNodeIds().

◆ buildFacePartOfMySelfNode()

virtual MEDCouplingPointSet* MEDCoupling::MEDCouplingPointSet::buildFacePartOfMySelfNode ( const mcIdType *  start,
const mcIdType *  end,
bool  fullyIn 
) const
pure virtual

◆ findBoundaryNodes()

virtual DataArrayIdType* MEDCoupling::MEDCouplingPointSet::findBoundaryNodes ( ) const
pure virtual

◆ buildBoundaryMesh()

virtual MEDCouplingPointSet* MEDCoupling::MEDCouplingPointSet::buildBoundaryMesh ( bool  keepCoords) const
pure virtual

◆ getNumberOfNodesInCell()

virtual mcIdType MEDCoupling::MEDCouplingPointSet::getNumberOfNodesInCell ( mcIdType  cellId) const
pure virtual

◆ computeFetchedNodeIds()

virtual DataArrayIdType* MEDCoupling::MEDCouplingPointSet::computeFetchedNodeIds ( ) const
pure virtual

◆ getNodeIdsInUse()

virtual DataArrayIdType* MEDCoupling::MEDCouplingPointSet::getNodeIdsInUse ( mcIdType &  nbrOfNodesInUse) const
pure virtual

◆ fillCellIdsToKeepFromNodeIds()

virtual void MEDCoupling::MEDCouplingPointSet::fillCellIdsToKeepFromNodeIds ( const mcIdType *  begin,
const mcIdType *  end,
bool  fullyIn,
DataArrayIdType *&  cellIdsKeptArr 
) const
pure virtual

◆ renumberNodesInConn() [1/3]

virtual void MEDCoupling::MEDCouplingPointSet::renumberNodesInConn ( const mcIdType *  newNodeNumbersO2N)
pure virtual

◆ renumberNodesInConn() [2/3]

virtual void MEDCoupling::MEDCouplingPointSet::renumberNodesInConn ( const INTERP_KERNEL::HashMap< mcIdType, mcIdType > &  newNodeNumbersO2N)
pure virtual

◆ renumberNodesInConn() [3/3]

virtual void MEDCoupling::MEDCouplingPointSet::renumberNodesInConn ( const std::map< mcIdType, mcIdType > &  newNodeNumbersO2N)
pure virtual

◆ renumberNodesWithOffsetInConn()

virtual void MEDCoupling::MEDCouplingPointSet::renumberNodesWithOffsetInConn ( mcIdType  offset)
pure virtual

◆ renumberNodes()

void MEDCouplingPointSet::renumberNodes ( const mcIdType *  newNodeNumbers,
mcIdType  newNbOfNodes 
)
virtual

Permutes and possibly removes nodes as specified by newNodeNumbers array. If newNodeNumbers[ i ] < 0 then the i-th node is removed, else newNodeNumbers[ i ] is a new id of the i-th node. The nodal connectivity array is modified accordingly.

Parameters
[in]newNodeNumbers- a permutation array, of length this->getNumberOfNodes(), in "Old to New" mode. See Array indexing and numbering for more info on renumbering modes.
[in]newNbOfNodes- number of nodes remaining after renumbering.
Exceptions
Ifthe coordinates array is not set.
Ifthe nodal connectivity of cells is not defined.

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

References _coords, MEDCoupling::DataArrayTemplate< T >::renumberAndReduce(), renumberNodesInConn(), and setCoords().

Referenced by mergeNodes(), and zipCoordsTraducer().

◆ renumberNodesCenter()

void MEDCouplingPointSet::renumberNodesCenter ( const mcIdType *  newNodeNumbers,
mcIdType  newNbOfNodes 
)
virtual

Permutes and possibly removes nodes as specified by newNodeNumbers array. If newNodeNumbers[ i ] < 0 then the i-th node is removed, else newNodeNumbers[ i ] is a new id of the i-th node. The nodal connectivity array is modified accordingly. In contrast to renumberNodes(), location of merged nodes (whose new ids coincide) is changed to be at their barycenter.

Parameters
[in]newNodeNumbers- a permutation array, of length this->getNumberOfNodes(), in "Old to New" mode. See Array indexing and numbering for more info on renumbering modes.
[in]newNbOfNodes- number of nodes remaining after renumbering, which is actually one more than the maximal id in newNodeNumbers.
Exceptions
Ifthe coordinates array is not set.
Ifthe nodal connectivity of cells is not defined.

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

References _coords, MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::RefCountObjectOnly::decrRef(), MEDCoupling::DataArrayTemplate< T >::fillWithZero(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), getNumberOfNodes(), MEDCoupling::DataArrayTemplate< T >::getPointer(), getSpaceDimension(), MEDCoupling::DataArrayDouble::New(), renumberNodesInConn(), and setCoords().

Referenced by mergeNodesCenter().

◆ isEmptyMesh()

virtual bool MEDCoupling::MEDCouplingPointSet::isEmptyMesh ( const std::vector< mcIdType > &  tinyInfo) const
pure virtual

◆ invertOrientationOfAllCells()

virtual void MEDCoupling::MEDCouplingPointSet::invertOrientationOfAllCells ( )
pure virtual

◆ checkFullyDefined()

virtual void MEDCoupling::MEDCouplingPointSet::checkFullyDefined ( ) const
pure virtual

◆ getTinySerializationInformation()

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

◆ resizeForUnserialization()

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

Second step of serialization process.

Parameters
tinyInfomust be equal to the result given by getTinySerializationInformation method.

Implements MEDCoupling::MEDCouplingMesh.

Reimplemented in MEDCoupling::MEDCouplingUMesh.

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

Referenced by MEDCoupling::MEDCouplingUMesh::resizeForUnserialization().

◆ serialize()

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

Third and final step of serialization process.

Implements MEDCoupling::MEDCouplingMesh.

Reimplemented in MEDCoupling::MEDCouplingUMesh.

References _coords, getCoords(), and MEDCoupling::RefCountObjectOnly::incrRef().

Referenced by MEDCoupling::MEDCouplingUMesh::serialize().

◆ unserialization()

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

◆ getBoundingBoxForBBTree()

virtual DataArrayDouble* MEDCoupling::MEDCouplingPointSet::getBoundingBoxForBBTree ( double  arcDetEps = 1e-12) const
pure virtual

◆ getCellsInBoundingBox() [1/2]

virtual DataArrayIdType* MEDCoupling::MEDCouplingPointSet::getCellsInBoundingBox ( const double *  bbox,
double  eps 
) const
pure virtual

◆ getCellsInBoundingBox() [2/2]

virtual DataArrayIdType* MEDCoupling::MEDCouplingPointSet::getCellsInBoundingBox ( const INTERP_KERNEL::DirectedBoundingBox &  bbox,
double  eps 
)
pure virtual

◆ computeDiameterField()

virtual MEDCouplingFieldDouble* MEDCoupling::MEDCouplingPointSet::computeDiameterField ( ) const
pure virtual

◆ zipCoordsTraducer()

DataArrayIdType * MEDCouplingPointSet::zipCoordsTraducer ( )
virtual

Removes unused nodes (the node coordinates array is shorten) and returns an array mapping between new and old node ids in "Old to New" mode. -1 values in the returned array mean that the corresponding old node is no more used.

Returns
DataArrayIdType * - a new instance of DataArrayIdType of length this->getNumberOfNodes() before call of this method. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthe coordinates array is not set.
Ifthe nodal connectivity of cells is not defined.
Ifthe nodal connectivity includes an invalid id.

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

Reimplemented in MEDCoupling::MEDCouplingUMesh.

References getNodeIdsInUse(), and renumberNodes().

Referenced by zipCoords(), and MEDCoupling::MEDCouplingUMesh::zipCoordsTraducer().

◆ zipConnectivityTraducer()

DataArrayIdType * MEDCouplingPointSet::zipConnectivityTraducer ( int  compType,
mcIdType  startCellId = 0 
)
virtual

Removes duplicates of cells from this mesh and returns an array mapping between new and old cell ids in "Old to New" mode. Nothing is changed in this mesh if no equal cells found.

Warning
Cells of the result mesh are not sorted by geometric type, hence, to write this mesh to the MED file, its cells must be sorted using sortCellsInMEDFileFrmt().
Parameters
[in]compType- specifies a cell comparison technique. Meaning of its valid values [0,1,2] is as follows.
  • 0 : "exact". Two cells are considered equal iff they have exactly same nodal connectivity and type. This is the strongest policy.
  • 1 : "permuted same orientation". Two cells are considered equal iff they are based on same nodes and have the same type and orientation.
  • 2 : "nodal". Two cells are considered equal iff they are based on same nodes and have the same type. This is the weakest policy, it can be used by users not sensitive to cell orientation.
[in]startCellId- specifies the cell id at which search for equal cells starts. By default it is 0, which means that all cells in this will be scanned.
Returns
DataArrayIdType - a new instance of DataArrayIdType, of length this->getNumberOfCells() before call of this method. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthe coordinates array is not set.
Ifthe nodal connectivity of cells is not defined.
Ifthe nodal connectivity includes an invalid id.

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

References buildPartOfMySelf(), findCommonCells(), MEDCoupling::MEDCouplingMesh::getNumberOfCells(), and shallowCopyConnectivityFrom().

◆ areAllNodesFetched()

bool MEDCouplingPointSet::areAllNodesFetched ( ) const
virtual

This const method states if the nodal connectivity of this fetches all nodes in this. In other words, this method looks is there are no orphan nodes in this.

See also
zipCoordsTraducer, getNodeIdsInUse, computeFetchedNodeIds.

References checkFullyDefined(), computeNodeIdsAlg(), and getNumberOfNodes().

◆ areCellsFrom2MeshEqual()

bool MEDCouplingPointSet::areCellsFrom2MeshEqual ( const MEDCouplingPointSet other,
mcIdType  cellId,
double  prec 
) const

This method compares 2 cells coming from two unstructured meshes : this and other. This method compares 2 cells having the same id 'cellId' in this and other.

References getCoordinatesOfNode(), MEDCoupling::MEDCouplingMesh::getNodeIdsOfCell(), and MEDCoupling::MEDCouplingMesh::getTypeOfCell().

Referenced by checkFastEquivalWith().

◆ checkConsistencyLight()

◆ intersectsBoundingBox() [1/2]

bool MEDCouplingPointSet::intersectsBoundingBox ( const double *  bb1,
const double *  bb2,
int  dim,
double  eps 
)
staticprotected

Intersect Bounding Box given 2 Bounding Boxes.

Referenced by MEDCoupling::MEDCouplingUMesh::getCellsInBoundingBox().

◆ intersectsBoundingBox() [2/2]

bool MEDCouplingPointSet::intersectsBoundingBox ( const INTERP_KERNEL::DirectedBoundingBox &  bb1,
const double *  bb2,
int  dim,
double  eps 
)
staticprotected

Intersect 2 given Bounding Boxes.

◆ rotate2D()

void MEDCouplingPointSet::rotate2D ( const double *  center,
double  angle 
)
protected

'This' is expected to be of spaceDim==2. Idem for 'center' and 'vect'

References _coords, getNumberOfNodes(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and MEDCoupling::DataArrayDouble::Rotate2DAlg().

Referenced by rotate().

◆ rotate3D()

void MEDCouplingPointSet::rotate3D ( const double *  center,
const double *  vect,
double  angle 
)
protected

'This' is expected to be of spaceDim==3. Idem for 'center' and 'vect'

References _coords, getNumberOfNodes(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and MEDCoupling::DataArrayDouble::Rotate3DAlg().

Referenced by rotate().

◆ project2DCellOnXY()

void MEDCouplingPointSet::project2DCellOnXY ( const mcIdType *  startConn,
const mcIdType *  endConn,
std::vector< double > &  res 
) const
protected

res should be an empty vector before calling this method. This method returns all the node coordinates included in _coords which ids are in [startConn;endConn) and put it into 'res' vector. If spaceDim==3 a projection will be done for each nodes on the middle plane containing these all nodes in [startConn;endConn). And after each projected nodes are moved to Oxy plane in order to consider these nodes as 2D nodes.

References _coords, MEDCoupling::DataArrayTemplate< T >::getConstPointer(), getSpaceDimension(), and INTERP_KERNEL::PlanarIntersector< MyMeshType, MyMatrix >::Projection().

Referenced by MEDCoupling::MEDCouplingUMesh::checkButterflyCells().

◆ isButterfly2DCell()

bool MEDCouplingPointSet::isButterfly2DCell ( const std::vector< double > &  res,
bool  isQuad,
double  eps 
)
staticprotected

Member Data Documentation

◆ _coords

DataArrayDouble* MEDCoupling::MEDCouplingPointSet::_coords
protected

Referenced by MEDCoupling::MEDCoupling1SGTUMesh::advancedRepr(), MEDCoupling::MEDCoupling1DGTUMesh::advancedRepr(), MEDCoupling::MEDCouplingUMesh::advancedRepr(), MEDCoupling::MEDCouplingUMesh::are2DCellsNotCorrectlyOriented(), areCoordsEqualIfNotWhy(), areCoordsEqualWithoutConsideringStr(), MEDCoupling::MEDCouplingUMesh::arePolyhedronsNotCorrectlyOriented(), buildNewNumberingFromCommonNodesFormat(), MEDCoupling::MEDCouplingUMesh::buildOrthogonalField(), MEDCoupling::MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoords(), MEDCoupling::MEDCoupling1DGTUMesh::buildPartOfMySelfKeepCoords(), MEDCoupling::MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoordsSlice(), MEDCoupling::MEDCoupling1DGTUMesh::buildPartOfMySelfKeepCoordsSlice(), MEDCoupling::MEDCouplingUMesh::buildPartOrthogonalField(), MEDCoupling::MEDCoupling1SGTUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCoupling1DGTUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCouplingUMesh::buildSetInstanceFromThis(), checkConsistencyLight(), checkDeepEquivalOnSameNodesWith(), MEDCoupling::MEDCoupling1SGTUMesh::checkFullyDefined(), MEDCoupling::MEDCoupling1DGTUMesh::checkFullyDefined(), MEDCoupling::MEDCouplingUMesh::computeCellCenterOfMass(), MEDCoupling::MEDCoupling1SGTUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCoupling1DGTUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCouplingUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCouplingUMesh::computePlaneEquationOf3DFaces(), MEDCoupling::MEDCouplingUMesh::conformize3D(), copyTinyStringsFrom(), MEDCoupling::MEDCouplingUMesh::cppRepr(), MEDCoupling::MEDCouplingUMesh::distanceToPoints(), duplicateNodesInCoords(), MEDCoupling::MEDCouplingUMesh::emulateMEDMEMBDC(), MEDCoupling::MEDCouplingUMesh::findAndCorrectBadOriented3DCells(), findCommonNodes(), findNodesOnLine(), findNodesOnPlane(), MEDCoupling::MEDCouplingUMesh::getAspectRatioField(), getBoundingBox(), MEDCoupling::MEDCoupling1SGTUMesh::getBoundingBoxForBBTree(), MEDCoupling::MEDCoupling1DGTUMesh::getBoundingBoxForBBTree(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTreeFast(), getCaracteristicDimension(), MEDCoupling::MEDCouplingUMesh::getCellIdsCrossingPlane(), getCoordinatesAndOwner(), getCoordinatesOfNode(), getCoords(), getDirectAccessOfCoordsArrIfInStructure(), getDirectChildrenWithNull(), MEDCoupling::MEDCouplingUMesh::getEdgeRatioField(), MEDCoupling::MEDCouplingUMesh::getFastAveragePlaneOfThis(), getNodeIdsNearPoints(), getNumberOfNodes(), MEDCoupling::MEDCouplingUMesh::getPartBarycenterAndOwner(), MEDCoupling::MEDCouplingUMesh::getSkewField(), getSpaceDimension(), MEDCoupling::MEDCoupling1SGTUMesh::getTinySerializationInformation(), MEDCoupling::MEDCoupling1DGTUMesh::getTinySerializationInformation(), getTinySerializationInformation(), MEDCoupling::MEDCouplingUMesh::getWarpField(), MEDCouplingPointSet(), MEDCoupling::MEDCouplingUMesh::orientCorrectly2DCells(), MEDCoupling::MEDCouplingUMesh::orientCorrectlyPolyhedrons(), project2DCellOnXY(), recenterForMaxPrecision(), renumberNodes(), renumberNodesCenter(), MEDCoupling::MEDCoupling1SGTUMesh::reprQuickOverview(), MEDCoupling::MEDCoupling1DGTUMesh::reprQuickOverview(), MEDCoupling::MEDCouplingUMesh::reprQuickOverview(), rotate(), rotate2D(), rotate3D(), scale(), MEDCoupling::MEDCoupling1SGTUMesh::serialize(), MEDCoupling::MEDCoupling1DGTUMesh::serialize(), serialize(), setCoords(), MEDCoupling::MEDCoupling1SGTUMesh::simpleRepr(), MEDCoupling::MEDCoupling1DGTUMesh::simpleRepr(), MEDCoupling::MEDCouplingUMesh::simpleRepr(), MEDCoupling::MEDCouplingUMesh::tetrahedrize(), translate(), tryToShareSameCoords(), tryToShareSameCoordsPermute(), MEDCoupling::MEDCoupling1SGTUMesh::unserialization(), MEDCoupling::MEDCoupling1DGTUMesh::unserialization(), updateTime(), MEDCoupling::MEDCouplingUMesh::writeVTKLL(), and ~MEDCouplingPointSet().