Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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, int 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 int *start, const int *end, bool fullyIn) const =0
 
DataArrayIntbuildNewNumberingFromCommonNodesFormat (const DataArrayInt *comm, const DataArrayInt *commIndex, int &newNbOfNodes) const
 
MEDCouplingMeshbuildPart (const int *start, const int *end) const
 
MEDCouplingMeshbuildPartAndReduceNodes (const int *start, const int *end, DataArrayInt *&arr) const
 
virtual MEDCouplingPointSetbuildPartOfMySelf (const int *start, const int *end, bool keepCoords=true) const
 
virtual MEDCouplingPointSetbuildPartOfMySelfKeepCoords (const int *begin, const int *end) const =0
 
virtual MEDCouplingPointSetbuildPartOfMySelfKeepCoordsSlice (int start, int end, int step) const =0
 
virtual MEDCouplingPointSetbuildPartOfMySelfNode (const int *start, const int *end, bool fullyIn) const
 
virtual MEDCouplingPointSetbuildPartOfMySelfSlice (int start, int end, int step, bool keepCoords=true) const
 
MEDCouplingMeshbuildPartRange (int beginCellIds, int endCellIds, int stepCellIds) const
 
MEDCouplingMeshbuildPartRangeAndReduceNodes (int beginCellIds, int endCellIds, int stepCellIds, int &beginOut, int &endOut, int &stepOut, DataArrayInt *&arr) const
 
DataArrayIntbuildPermArrayForMergeNode (double precision, int limitNodeId, bool &areNodesMerged, int &newNbOfNodes) const
 
void changeSpaceDimension (int newSpaceDim, double dftVal=0.)
 
void checkDeepEquivalOnSameNodesWith (const MEDCouplingMesh *other, int cellCompPol, double prec, DataArrayInt *&cellCor) const
 
void checkDeepEquivalWith (const MEDCouplingMesh *other, int cellCompPol, double prec, DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const
 
void checkFastEquivalWith (const MEDCouplingMesh *other, double prec) const
 
virtual void checkFullyDefined () const =0
 
virtual MEDCouplingFieldDoublecomputeDiameterField () const =0
 
virtual DataArrayIntcomputeFetchedNodeIds () const =0
 
virtual void computeNodeIdsAlg (std::vector< bool > &nodeIdsInUse) const =0
 
void copyTinyStringsFrom (const MEDCouplingMesh *other)
 
virtual MEDCouplingPointSetdeepCopyConnectivityOnly () const =0
 
void duplicateNodesInCoords (const int *nodeIdsToDuplicateBg, const int *nodeIdsToDuplicateEnd)
 
virtual void fillCellIdsToKeepFromNodeIds (const int *begin, const int *end, bool fullyIn, DataArrayInt *&cellIdsKeptArr) const =0
 
virtual DataArrayIntfindBoundaryNodes () const =0
 
virtual void findCommonCells (int compType, int startCellId, DataArrayInt *&commonCellsArr, DataArrayInt *&commonCellsIArr) const =0
 
void findCommonNodes (double prec, int limitNodeId, DataArrayInt *&comm, DataArrayInt *&commIndex) const
 
void findNodesOnLine (const double *pt, const double *vec, double eps, std::vector< int > &nodes) const
 
void findNodesOnPlane (const double *pt, const double *vec, double eps, std::vector< int > &nodes) const
 
void getBoundingBox (double *bbox) const
 
virtual DataArrayDoublegetBoundingBoxForBBTree (double arcDetEps=1e-12) const =0
 
double getCaracteristicDimension () const
 
DataArrayIntgetCellIdsFullyIncludedInNodeIds (const int *partBg, const int *partEnd) const
 
DataArrayIntgetCellIdsLyingOnNodes (const int *begin, const int *end, bool fullyIn) const
 
virtual DataArrayIntgetCellsInBoundingBox (const double *bbox, double eps) const =0
 
virtual DataArrayIntgetCellsInBoundingBox (const INTERP_KERNEL::DirectedBoundingBox &bbox, double eps)=0
 
DataArrayDoublegetCoordinatesAndOwner () const
 
void getCoordinatesOfNode (int nodeId, std::vector< double > &coo) const
 
const DataArrayDoublegetCoords () const
 
DataArrayDoublegetCoords ()
 
const DataArrayDoublegetDirectAccessOfCoordsArrIfInStructure () const
 
std::vector< const
BigMemoryObject * > 
getDirectChildrenWithNull () const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
virtual DataArrayIntgetNodeIdsInUse (int &nbrOfNodesInUse) const =0
 
DataArrayIntgetNodeIdsNearPoint (const double *pos, double eps) const
 
void getNodeIdsNearPoints (const double *pos, int nbOfPoints, double eps, DataArrayInt *&c, DataArrayInt *&cI) const
 
int getNumberOfNodes () const
 
virtual int getNumberOfNodesInCell (int cellId) const =0
 
int getSpaceDimension () const
 
void getTinySerializationInformation (std::vector< double > &tinyInfoD, std::vector< int > &tinyInfo, std::vector< std::string > &littleStrings) const
 
virtual bool isEmptyMesh (const std::vector< int > &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 DataArrayIntmergeNodes (double precision, bool &areNodesMerged, int &newNbOfNodes)
 
virtual DataArrayIntmergeNodesCenter (double precision, bool &areNodesMerged, int &newNbOfNodes)
 
void recenterForMaxPrecision (double eps)
 
virtual void renumberNodes (const int *newNodeNumbers, int newNbOfNodes)
 
virtual void renumberNodesCenter (const int *newNodeNumbers, int newNbOfNodes)
 
virtual void renumberNodesInConn (const int *newNodeNumbersO2N)=0
 
virtual void renumberNodesInConn (const INTERP_KERNEL::HashMap< int, int > &newNodeNumbersO2N)=0
 
virtual void renumberNodesWithOffsetInConn (int offset)=0
 
void resizeForUnserialization (const std::vector< int > &tinyInfo, DataArrayInt *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 (DataArrayInt *&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< int > &tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector< std::string > &littleStrings)
 
void updateTime () const
 
virtual DataArrayIntzipConnectivityTraducer (int compType, int startCellId=0)
 
void zipCoords ()
 
virtual DataArrayIntzipCoordsTraducer ()
 
- 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, DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const
 
virtual DataArrayIntcheckTypeConsistencyAndContig (const std::vector< int > &code, const std::vector< const DataArrayInt * > &idsPerType) const =0
 
virtual MEDCouplingMeshclone (bool recDeepCpy) const =0
 
virtual DataArrayDoublecomputeCellCenterOfMass () const =0
 
virtual DataArrayIntcomputeEffectiveNbOfNodesPerCell () const =0
 
virtual DataArrayDoublecomputeIsoBarycenterOfNodesPerCell () const =0
 
virtual DataArrayIntcomputeNbOfFacesPerCell () const =0
 
virtual DataArrayIntcomputeNbOfNodesPerCell () const =0
 
virtual void copyTinyInfoFrom (const MEDCouplingMesh *other)
 
virtual MEDCouplingMeshdeepCopy () const =0
 
virtual MEDCouplingFieldDoublefillFromAnalytic (TypeOfField t, int nbOfComp, FunctionToEvaluate func) const
 
virtual MEDCouplingFieldDoublefillFromAnalytic (TypeOfField t, int nbOfComp, const std::string &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 int getCellContainingPoint (const double *pos, double eps) const =0
 
virtual void getCellsContainingPoint (const double *pos, double eps, std::vector< int > &elts) const =0
 
virtual void getCellsContainingPoints (const double *pos, int nbOfPoints, double eps, MCAuto< DataArrayInt > &elts, MCAuto< DataArrayInt > &eltsIndex) const
 
std::string getDescription () const
 
virtual std::vector< int > 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 (int cellId, std::vector< int > &conn) const =0
 
virtual int getNumberOfCells () const =0
 
virtual int getNumberOfCellsWithType (INTERP_KERNEL::NormalizedCellType type) const =0
 
virtual void getReverseNodalConnectivity (DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const =0
 
double getTime (int &iteration, int &order) const
 
std::string getTimeUnit () const
 
virtual MEDCouplingMeshType getType () const =0
 
virtual
INTERP_KERNEL::NormalizedCellType 
getTypeOfCell (int cellId) const =0
 
virtual std::string getVTKFileExtension () const =0
 
std::string getVTKFileNameOf (const std::string &fileName) const
 
virtual DataArrayIntgiveCellsWithType (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 int *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 DataArrayIntsimplexize (int policy)=0
 
virtual void splitProfilePerType (const DataArrayInt *profile, std::vector< int > &code, std::vector< DataArrayInt * > &idsInPflPerType, std::vector< DataArrayInt * > &idsPerType) 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::TimeLabel
void declareAsNew () const
 
std::size_t getTimeOfThis () const
 
TimeLabeloperator= (const TimeLabel &other)
 

Static Public Member Functions

static MEDCouplingPointSetBuildInstanceFromMeshType (MEDCouplingMeshType type)
 
static DataArrayIntComputeNbOfInteractionsWithSrcCells (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 int 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)
 

Protected Member Functions

void checkConsistencyLight () const
 
 MEDCouplingPointSet ()
 
 MEDCouplingPointSet (const MEDCouplingPointSet &other, bool deepCopy)
 
void project2DCellOnXY (const int *startConn, const int *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::MEDCouplingPointSet ( )
protected
MEDCouplingPointSet::MEDCouplingPointSet ( const MEDCouplingPointSet other,
bool  deepCopy 
)
protected
MEDCouplingPointSet::~MEDCouplingPointSet ( )
protected

Member Function Documentation

void MEDCouplingPointSet::updateTime ( ) const
virtual

This method should be called on high level classes as Field or Mesh to take into acount 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::MEDCouplingUMesh::updateTime(), MEDCoupling::MEDCoupling1SGTUMesh::updateTime(), and MEDCoupling::MEDCoupling1DGTUMesh::updateTime().

int MEDCouplingPointSet::getNumberOfNodes ( ) const
virtual

Implements MEDCoupling::MEDCouplingMesh.

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

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

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::colinearize2D(), MEDCoupling::MEDCouplingUMesh::computeCellCenterOfMass(), MEDCoupling::MEDCoupling1SGTUMesh::computeDiameterField(), MEDCoupling::MEDCouplingUMesh::computeDiameterField(), MEDCoupling::MEDCoupling1SGTUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCoupling1DGTUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCouplingUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCouplingUMesh::computePlaneEquationOf3DFaces(), 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::MEDCouplingUMesh::getBoundingBoxForBBTree(), MEDCoupling::MEDCoupling1DGTUMesh::getBoundingBoxForBBTree(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTreeFast(), MEDCoupling::MEDCouplingUMesh::getCellIdsCrossingPlane(), MEDCoupling::MEDCouplingUMesh::getCellsContainingPoints(), 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::MEDCouplingUMesh::simpleRepr(), MEDCoupling::MEDCoupling1SGTUMesh::simpleRepr(), MEDCoupling::MEDCoupling1DGTUMesh::simpleRepr(), MEDCoupling::MEDCouplingUMesh::simplifyPolyhedra(), MEDCoupling::MEDCouplingUMesh::split2DCells(), MEDCoupling::MEDCoupling1SGTUMesh::structurizeMe(), MEDCoupling::MEDCouplingUMesh::tessellate2D(), MEDCoupling::MEDCouplingUMesh::tetrahedrize(), translate(), and MEDCoupling::MEDCouplingUMesh::writeVTKLL().

void MEDCouplingPointSet::setCoords ( const DataArrayDouble coords)

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

Referenced by MEDCoupling::MEDFileUMesh::Aggregate(), MEDCoupling::MEDCouplingUMesh::Build1DMeshFromCoords(), MEDCoupling::MEDCouplingStructuredMesh::build1SGTSubLevelMesh(), MEDCoupling::MEDCouplingStructuredMesh::build1SGTUnstructured(), MEDCoupling::MEDCouplingUMesh::buildExtrudedMesh(), MEDCoupling::MEDFileUMesh::buildExtrudedMesh(), MEDCoupling::MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoords(), MEDCoupling::MEDCoupling1DGTUMesh::buildPartOfMySelfKeepCoords(), MEDCoupling::MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoordsSlice(), MEDCoupling::MEDCoupling1DGTUMesh::buildPartOfMySelfKeepCoordsSlice(), MEDCoupling::MEDCouplingUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCoupling1SGTUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCoupling1DGTUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCouplingUMesh::buildSlice3D(), MEDCoupling::MEDCouplingUMesh::buildSlice3DSurf(), MEDCoupling::MEDCouplingUMesh::buildSpreadZonesWithPoly(), MEDCoupling::MEDCoupling1SGTUMesh::buildUnstructured(), MEDCoupling::MEDCoupling1DGTUMesh::buildUnstructured(), changeSpaceDimension(), MEDCoupling::MEDCouplingUMesh::clipSingle3DCellByPlane(), MEDCoupling::MEDCouplingUMesh::colinearize2D(), MEDCoupling::MEDCouplingUMesh::conformize2D(), MEDCoupling::MEDCouplingUMesh::convertIntoSingleGeoTypeMesh(), MEDCoupling::MEDCouplingUMesh::convertLinearCellsToQuadratic(), MEDCoupling::MEDCoupling1DGTUMesh::copyWithNodalConnectivityPacked(), duplicateNodesInCoords(), MEDCoupling::MEDCoupling1SGTUMesh::explodeEachHexa8To6Quad4(), MEDCoupling::MEDFileUMesh::getFamilies(), MEDCoupling::MEDFileUMesh::getMeshAtLevel(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshes(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshWith1DLine(), MEDCoupling::MEDFileUMesh::linearToQuadratic(), MEDCoupling::MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords(), MEDCoupling::MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords(), MEDCoupling::MEDCouplingUMesh::MergeUMeshesOnSameCoords(), MEDCoupling::MEDCouplingUMesh::PutUMeshesOnSameAggregatedCoords(), MEDCoupling::MEDFileUMesh::quadraticToLinear(), renumberNodes(), renumberNodesCenter(), MEDCoupling::MEDCouplingUMesh::SimplifyPolyhedronCell(), MEDCoupling::MEDCouplingUMesh::tetrahedrize(), tryToShareSameCoords(), tryToShareSameCoordsPermute(), and unserialization().

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

References _coords.

Referenced by MEDCoupling::MEDCoupling1GTUMesh::AggregateOnSameCoordsToUMesh(), MEDCoupling::MEDCouplingUMesh::buildDirectionVectorField(), MEDCoupling::MEDFileUMesh::buildExtrudedMesh(), MEDCoupling::MEDCouplingUMesh::buildSlice3D(), MEDCoupling::MEDCouplingUMesh::buildSpreadZonesWithPoly(), MEDCoupling::MEDCoupling1SGTUMesh::buildUnstructured(), MEDCoupling::MEDCoupling1DGTUMesh::buildUnstructured(), changeSpaceDimension(), MEDCoupling::MEDCouplingUMesh::colinearize2D(), MEDCoupling::MEDCouplingUMesh::computeCellCenterOfMass(), MEDCoupling::MEDCoupling1SGTUMesh::computeDiameterField(), MEDCoupling::MEDCouplingUMesh::computeDiameterField(), MEDCoupling::MEDCouplingUMesh::conformize2D(), MEDCoupling::MEDCouplingUMesh::conformize3D(), MEDCoupling::MEDCouplingUMesh::convertIntoSingleGeoTypeMesh(), MEDCoupling::MEDCouplingUMesh::convexEnvelop2D(), MEDCoupling::MEDCoupling1DGTUMesh::copyWithNodalConnectivityPacked(), MEDCoupling::MEDCouplingUMesh::emulateMEDMEMBDC(), MEDCoupling::MEDCoupling1SGTUMesh::explodeEachHexa8To6Quad4(), MEDCoupling::MEDCouplingUMesh::findAndCorrectBadOriented3DExtrudedCells(), MEDCoupling::MEDCouplingUMesh::findCellIdsLyingOn(), MEDCoupling::MEDCouplingUMesh::findNodesToDuplicate(), MEDCoupling::MEDCouplingUMesh::getCellsInBoundingBox(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getLocalizationOfDiscValues(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::getLocalizationOfDiscValues(), MEDCoupling::MEDCouplingUMesh::getMeasureField(), MEDCoupling::MEDCouplingUMesh::getPartMeasureField(), getTinySerializationInformation(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshes(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshWith1DLine(), MEDCoupling::MEDFileUMesh::linearToQuadratic(), MEDCoupling::MEDCouplingGaussLocalization::localizePtsInRefCooForEachCell(), MEDCoupling::MEDCoupling1DGTUMesh::Merge1DGTUMeshes(), MEDCoupling::MEDCoupling1SGTUMesh::Merge1SGTUMeshes(), MergeNodesArray(), MEDCoupling::MEDCouplingUMesh::MergeUMeshes(), MEDCoupling::MEDCoupling1SGTUMesh::New(), MEDCoupling::MEDCoupling1DGTUMesh::New(), MEDCoupling::MEDCouplingUMesh::project1D(), MEDCoupling::MEDCouplingMappedExtrudedMesh::Project1DMeshes(), MEDCoupling::MEDFileUMesh::quadraticToLinear(), serialize(), MEDCoupling::MEDFileUMesh::setMeshes(), MEDCoupling::MEDCouplingUMesh::setPartOfMySelf(), MEDCoupling::MEDCouplingUMesh::setPartOfMySelfSlice(), MEDCoupling::MEDCouplingUMesh::simplifyPolyhedra(), MEDCoupling::MEDCoupling1SGTUMesh::structurizeMe(), MEDCoupling::MEDCouplingUMesh::tetrahedrize(), tryToShareSameCoordsPermute(), unserialization(), and MEDCoupling::WriteField().

DataArrayDouble* MEDCoupling::MEDCouplingPointSet::getCoords ( )

References _coords.

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().

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

Implements MEDCoupling::MEDCouplingMesh.

References _coords.

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().

bool MEDCouplingPointSet::isEqualIfNotWhy ( const MEDCouplingMesh other,
double  prec,
std::string &  reason 
) const
virtual
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::MEDCouplingUMesh::isEqualWithoutConsideringStr(), and MEDCoupling::MEDCoupling1GTUMesh::isEqualWithoutConsideringStr().

void MEDCouplingPointSet::checkFastEquivalWith ( const MEDCouplingMesh other,
double  prec 
) const
virtual
void MEDCouplingPointSet::checkDeepEquivalWith ( const MEDCouplingMesh other,
int  cellCompPol,
double  prec,
DataArrayInt *&  cellCor,
DataArrayInt *&  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::DataArrayTemplate< T >::alloc(), buildPermArrayForMergeNode(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArrayTemplate< T >::getNbOfElems(), MEDCoupling::MEDCouplingMesh::getNumberOfCells(), getNumberOfNodes(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), MEDCoupling::DataArrayInt::isIota(), MEDCoupling::MEDCouplingMesh::mergeMyselfWith(), mergeNodes(), MEDCoupling::DataArrayInt::New(), renumberNodes(), MEDCoupling::MCAuto< T >::retn(), MEDCoupling::DataArrayInt::selectByTupleIdSafeSlice(), MEDCoupling::DataArrayTemplate< T >::sort(), MEDCoupling::DataArrayTemplate< T >::subArray(), and zipConnectivityTraducer().

void MEDCouplingPointSet::checkDeepEquivalOnSameNodesWith ( const MEDCouplingMesh other,
int  cellCompPol,
double  prec,
DataArrayInt *&  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::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArrayTemplate< T >::getNbOfElems(), MEDCoupling::MEDCouplingMesh::getNumberOfCells(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayInt::isIota(), mergeMyselfWithOnSameCoords(), MEDCoupling::MCAuto< T >::retn(), MEDCoupling::DataArrayInt::selectByTupleIdSafeSlice(), and zipConnectivityTraducer().

bool MEDCouplingPointSet::areCoordsEqualIfNotWhy ( const MEDCouplingPointSet other,
double  prec,
std::string &  reason 
) const
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().

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().

virtual MEDCouplingPointSet* MEDCoupling::MEDCouplingPointSet::deepCopyConnectivityOnly ( ) const
pure virtual
virtual void MEDCoupling::MEDCouplingPointSet::shallowCopyConnectivityFrom ( const MEDCouplingPointSet other)
pure virtual
DataArrayInt * MEDCouplingPointSet::mergeNodes ( double  precision,
bool &  areNodesMerged,
int &  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
DataArrayInt * - 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 MEDCoupling::DataArrayTemplate< T >::begin(), buildPermArrayForMergeNode(), renumberNodes(), and MEDCoupling::MCAuto< T >::retn().

Referenced by checkDeepEquivalWith(), and MEDCoupling::MEDCouplingUMesh::conformize2D().

DataArrayInt * MEDCouplingPointSet::mergeNodesCenter ( double  precision,
bool &  areNodesMerged,
int &  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
DataArrayInt * - 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(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), and renumberNodesCenter().

virtual MEDCouplingPointSet* MEDCoupling::MEDCouplingPointSet::mergeMyselfWithOnSameCoords ( const MEDCouplingPointSet other) const
pure virtual
virtual void MEDCoupling::MEDCouplingPointSet::computeNodeIdsAlg ( std::vector< bool > &  nodeIdsInUse) const
pure virtual
void MEDCouplingPointSet::getCoordinatesOfNode ( int  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().

DataArrayInt * MEDCouplingPointSet::buildPermArrayForMergeNode ( double  precision,
int  limitNodeId,
bool &  areNodesMerged,
int &  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
DataArrayInt * - 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(), MEDCoupling::RefCountObjectOnly::decrRef(), findCommonNodes(), getNumberOfNodes(), and MEDCoupling::MCAuto< T >::retn().

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

DataArrayInt * 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
DataArrayInt * - a new instance of DataArrayInt 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().

void MEDCouplingPointSet::getNodeIdsNearPoints ( const double *  pos,
int  nbOfPoints,
double  eps,
DataArrayInt *&  c,
DataArrayInt *&  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(), MEDCoupling::DataArrayDouble::New(), and MEDCoupling::DataArrayTemplate< T >::useArray().

Referenced by getNodeIdsNearPoint().

void MEDCouplingPointSet::findCommonNodes ( double  prec,
int  limitNodeId,
DataArrayInt *&  comm,
DataArrayInt *&  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().

virtual void MEDCoupling::MEDCouplingPointSet::findCommonCells ( int  compType,
int  startCellId,
DataArrayInt *&  commonCellsArr,
DataArrayInt *&  commonCellsIArr 
) const
pure virtual
DataArrayInt * MEDCouplingPointSet::buildNewNumberingFromCommonNodesFormat ( const DataArrayInt comm,
const DataArrayInt commIndex,
int &  newNbOfNodes 
) const
Parameters
commin param in the same format than one returned by findCommonNodes method (Indirect indexing).
commIin param in the same format than one returned by findCommonNodes method (Indirect indexing).
Returns
the old to new correspondance array.

References _coords, MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayInt::ConvertIndexArrayToO2N(), MEDCoupling::DataArrayTemplate< T >::end(), and getNumberOfNodes().

Referenced by buildPermArrayForMergeNode().

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().

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(), MEDCoupling::RefCountObjectOnly::decrRef(), and zipCoordsTraducer().

Referenced by buildPartOfMySelf(), buildPartOfMySelfSlice(), MEDCoupling::MEDCouplingFieldDouble::convertQuadraticCellsToLinear(), and MEDCoupling::MEDFileUMesh::quadraticToLinear().

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().

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().

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().

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

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().

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().

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::MEDFileUMesh::buildExtrudedMesh(), MEDCoupling::MEDCouplingMappedExtrudedMesh::Project1DMeshes(), and MEDCoupling::MEDCouplingUMesh::SimplifyPolyhedronCell().

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().

void MEDCouplingPointSet::duplicateNodesInCoords ( const int *  nodeIdsToDuplicateBg,
const int *  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().

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(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), getCoords(), MEDCoupling::DataArrayTemplate< T >::getNbOfElems(), getNumberOfNodes(), MEDCoupling::RefCountObjectOnly::incrRef(), MergeNodesArray(), renumberNodesInConn(), and setCoords().

void MEDCouplingPointSet::findNodesOnPlane ( const double *  pt,
const double *  vec,
double  eps,
std::vector< int > &  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(), MEDCoupling::MEDCouplingUMesh::buildSlice3DSurf(), and MEDCoupling::MEDCouplingUMesh::clipSingle3DCellByPlane().

void MEDCouplingPointSet::findNodesOnLine ( const double *  pt,
const double *  vec,
double  eps,
std::vector< int > &  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().

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().

MEDCouplingPointSet * MEDCouplingPointSet::BuildInstanceFromMeshType ( MEDCouplingMeshType  type)
static
DataArrayInt * 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
DataArrayInt * - 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().

MEDCouplingMesh * MEDCouplingPointSet::buildPart ( const int *  start,
const int *  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().

Referenced by MEDCoupling::MEDCouplingStructuredMesh::buildPart().

MEDCouplingMesh * MEDCouplingPointSet::buildPartAndReduceNodes ( const int *  start,
const int *  end,
DataArrayInt *&  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 DataArrayInt 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(), MEDCoupling::MCAuto< T >::retn(), and zipCoordsTraducer().

Referenced by MEDCoupling::MEDCouplingStructuredMesh::buildPartAndReduceNodes().

MEDCouplingMesh * MEDCouplingPointSet::buildPartRange ( int  beginCellIds,
int  endCellIds,
int  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().

MEDCouplingMesh * MEDCouplingPointSet::buildPartRangeAndReduceNodes ( int  beginCellIds,
int  endCellIds,
int  stepCellIds,
int &  beginOut,
int &  endOut,
int &  stepOut,
DataArrayInt *&  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]arrcorrespondance old to new in node ids.
See Also
MEDCouplingUMesh::buildPartOfMySelfSlice

Reimplemented from MEDCoupling::MEDCouplingMesh.

References buildPartOfMySelfSlice(), MEDCoupling::MCAuto< T >::retn(), and zipCoordsTraducer().

DataArrayInt * MEDCouplingPointSet::getCellIdsFullyIncludedInNodeIds ( const int *  partBg,
const int *  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
DataArrayInt * - a new instance of DataArrayInt 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().

DataArrayInt * MEDCouplingPointSet::getCellIdsLyingOnNodes ( const int *  begin,
const int *  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
DataArrayInt * - a new instance of DataArrayInt 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(), MEDCoupling::MEDCouplingMesh::getName(), and MEDCoupling::DataArray::setName().

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

MEDCouplingPointSet * MEDCouplingPointSet::buildPartOfMySelfSlice ( int  start,
int  end,
int  step,
bool  keepCoords = true 
) const
virtual
virtual MEDCouplingPointSet* MEDCoupling::MEDCouplingPointSet::buildPartOfMySelfKeepCoords ( const int *  begin,
const int *  end 
) const
pure virtual
virtual MEDCouplingPointSet* MEDCoupling::MEDCouplingPointSet::buildPartOfMySelfKeepCoordsSlice ( int  start,
int  end,
int  step 
) const
pure virtual
MEDCouplingPointSet * MEDCouplingPointSet::buildPartOfMySelfNode ( const int *  begin,
const int *  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 MEDCoupling::DataArrayTemplate< T >::begin(), buildPartOfMySelf(), MEDCoupling::DataArrayTemplate< T >::end(), and fillCellIdsToKeepFromNodeIds().

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

virtual MEDCouplingPointSet* MEDCoupling::MEDCouplingPointSet::buildFacePartOfMySelfNode ( const int *  start,
const int *  end,
bool  fullyIn 
) const
pure virtual
virtual DataArrayInt* MEDCoupling::MEDCouplingPointSet::findBoundaryNodes ( ) const
pure virtual
virtual MEDCouplingPointSet* MEDCoupling::MEDCouplingPointSet::buildBoundaryMesh ( bool  keepCoords) const
pure virtual
virtual int MEDCoupling::MEDCouplingPointSet::getNumberOfNodesInCell ( int  cellId) const
pure virtual
virtual DataArrayInt* MEDCoupling::MEDCouplingPointSet::computeFetchedNodeIds ( ) const
pure virtual
virtual DataArrayInt* MEDCoupling::MEDCouplingPointSet::getNodeIdsInUse ( int &  nbrOfNodesInUse) const
pure virtual
virtual void MEDCoupling::MEDCouplingPointSet::fillCellIdsToKeepFromNodeIds ( const int *  begin,
const int *  end,
bool  fullyIn,
DataArrayInt *&  cellIdsKeptArr 
) const
pure virtual
virtual void MEDCoupling::MEDCouplingPointSet::renumberNodesInConn ( const int *  newNodeNumbersO2N)
pure virtual
virtual void MEDCoupling::MEDCouplingPointSet::renumberNodesInConn ( const INTERP_KERNEL::HashMap< int, int > &  newNodeNumbersO2N)
pure virtual
virtual void MEDCoupling::MEDCouplingPointSet::renumberNodesWithOffsetInConn ( int  offset)
pure virtual
void MEDCouplingPointSet::renumberNodes ( const int *  newNodeNumbers,
int  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 checkDeepEquivalWith(), mergeNodes(), and zipCoordsTraducer().

void MEDCouplingPointSet::renumberNodesCenter ( const int *  newNodeNumbers,
int  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::DataArrayDouble::fillWithZero(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), getNumberOfNodes(), MEDCoupling::DataArrayTemplate< T >::getPointer(), getSpaceDimension(), MEDCoupling::DataArrayDouble::New(), renumberNodesInConn(), and setCoords().

Referenced by mergeNodesCenter().

virtual bool MEDCoupling::MEDCouplingPointSet::isEmptyMesh ( const std::vector< int > &  tinyInfo) const
pure virtual
virtual void MEDCoupling::MEDCouplingPointSet::checkFullyDefined ( ) const
pure virtual
void MEDCouplingPointSet::getTinySerializationInformation ( std::vector< double > &  tinyInfoD,
std::vector< int > &  tinyInfo,
std::vector< std::string > &  littleStrings 
) const
virtual
void MEDCouplingPointSet::resizeForUnserialization ( const std::vector< int > &  tinyInfo,
DataArrayInt 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().

void MEDCouplingPointSet::serialize ( DataArrayInt *&  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().

void MEDCouplingPointSet::unserialization ( const std::vector< double > &  tinyInfoD,
const std::vector< int > &  tinyInfo,
const DataArrayInt a1,
DataArrayDouble a2,
const std::vector< std::string > &  littleStrings 
)
virtual
virtual DataArrayDouble* MEDCoupling::MEDCouplingPointSet::getBoundingBoxForBBTree ( double  arcDetEps = 1e-12) const
pure virtual
virtual DataArrayInt* MEDCoupling::MEDCouplingPointSet::getCellsInBoundingBox ( const double *  bbox,
double  eps 
) const
pure virtual
virtual DataArrayInt* MEDCoupling::MEDCouplingPointSet::getCellsInBoundingBox ( const INTERP_KERNEL::DirectedBoundingBox &  bbox,
double  eps 
)
pure virtual
virtual MEDCouplingFieldDouble* MEDCoupling::MEDCouplingPointSet::computeDiameterField ( ) const
pure virtual
DataArrayInt * 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
DataArrayInt * - a new instance of DataArrayInt 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 MEDCoupling::DataArrayTemplate< T >::getConstPointer(), getNodeIdsInUse(), renumberNodes(), and MEDCoupling::MCAuto< T >::retn().

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

DataArrayInt * MEDCouplingPointSet::zipConnectivityTraducer ( int  compType,
int  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
DataArrayInt - a new instance of DataArrayInt, 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 MEDCoupling::DataArrayTemplate< T >::begin(), buildPartOfMySelf(), MEDCoupling::DataArrayInt::ConvertIndexArrayToO2N(), findCommonCells(), MEDCoupling::MEDCouplingMesh::getNumberOfCells(), MEDCoupling::DataArrayInt::invertArrayO2N2N2O(), MEDCoupling::MCAuto< T >::retn(), and shallowCopyConnectivityFrom().

Referenced by MEDCoupling::MEDCouplingUMesh::areCellsIncludedIn(), checkDeepEquivalOnSameNodesWith(), checkDeepEquivalWith(), and MEDCoupling::MEDCouplingUMesh::FuseUMeshesOnSameCoords().

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().

bool MEDCouplingPointSet::areCellsFrom2MeshEqual ( const MEDCouplingPointSet other,
int  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().

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().

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

Intersect 2 given Bounding Boxes.

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().

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().

void MEDCouplingPointSet::project2DCellOnXY ( const int *  startConn,
const int *  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().

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

Member Data Documentation

DataArrayDouble* MEDCoupling::MEDCouplingPointSet::_coords
protected

Referenced by MEDCoupling::MEDCouplingUMesh::advancedRepr(), MEDCoupling::MEDCoupling1SGTUMesh::advancedRepr(), MEDCoupling::MEDCoupling1DGTUMesh::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::MEDCouplingUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCoupling1SGTUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCoupling1DGTUMesh::buildSetInstanceFromThis(), checkConsistencyLight(), checkDeepEquivalOnSameNodesWith(), MEDCoupling::MEDCoupling1SGTUMesh::checkFullyDefined(), MEDCoupling::MEDCoupling1DGTUMesh::checkFullyDefined(), MEDCoupling::MEDCouplingUMesh::colinearize2D(), 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(), MEDCoupling::MEDCouplingUMesh::getCellsContainingPoints(), getCoordinatesAndOwner(), getCoordinatesOfNode(), getCoords(), getDirectAccessOfCoordsArrIfInStructure(), getDirectChildrenWithNull(), MEDCoupling::MEDCouplingUMesh::getEdgeRatioField(), MEDCoupling::MEDCouplingUMesh::getFastAveragePlaneOfThis(), getNodeIdsNearPoints(), getNumberOfNodes(), MEDCoupling::MEDCouplingUMesh::getPartBarycenterAndOwner(), MEDCoupling::MEDCouplingUMesh::getSkewField(), getSpaceDimension(), getTinySerializationInformation(), MEDCoupling::MEDCoupling1SGTUMesh::getTinySerializationInformation(), MEDCoupling::MEDCoupling1DGTUMesh::getTinySerializationInformation(), MEDCoupling::MEDCouplingUMesh::getWarpField(), MEDCouplingPointSet(), MEDCoupling::MEDCouplingUMesh::orientCorrectly2DCells(), MEDCoupling::MEDCouplingUMesh::orientCorrectlyPolyhedrons(), project2DCellOnXY(), recenterForMaxPrecision(), renumberNodes(), renumberNodesCenter(), MEDCoupling::MEDCouplingUMesh::reprQuickOverview(), MEDCoupling::MEDCoupling1SGTUMesh::reprQuickOverview(), MEDCoupling::MEDCoupling1DGTUMesh::reprQuickOverview(), rotate(), rotate2D(), rotate3D(), scale(), serialize(), MEDCoupling::MEDCoupling1SGTUMesh::serialize(), MEDCoupling::MEDCoupling1DGTUMesh::serialize(), setCoords(), MEDCoupling::MEDCouplingUMesh::simpleRepr(), MEDCoupling::MEDCoupling1SGTUMesh::simpleRepr(), MEDCoupling::MEDCoupling1DGTUMesh::simpleRepr(), MEDCoupling::MEDCouplingUMesh::tetrahedrize(), translate(), tryToShareSameCoords(), tryToShareSameCoordsPermute(), MEDCoupling::MEDCoupling1SGTUMesh::unserialization(), MEDCoupling::MEDCoupling1DGTUMesh::unserialization(), updateTime(), MEDCoupling::MEDCouplingUMesh::writeVTKLL(), and ~MEDCouplingPointSet().