Version: 6.5.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
ParaMEDMEM::MEDCouplingPointSet Class Reference
Inheritance diagram for ParaMEDMEM::MEDCouplingPointSet:
Inheritance graph
[legend]
Collaboration diagram for ParaMEDMEM::MEDCouplingPointSet:
Collaboration graph
[legend]

Public Member Functions

void updateTime () const
int getNumberOfNodes () const
int getSpaceDimension () const
void setCoords (const DataArrayDouble *coords)
const DataArrayDoublegetCoords () const
DataArrayDoublegetCoords ()
DataArrayDoublegetCoordinatesAndOwner () const
void copyTinyStringsFrom (const MEDCouplingMesh *other) throw (INTERP_KERNEL::Exception)
bool isEqual (const MEDCouplingMesh *other, double prec) const
bool isEqualWithoutConsideringStr (const MEDCouplingMesh *other, double prec) const
bool areCoordsEqual (const MEDCouplingPointSet &other, double prec) const
bool areCoordsEqualWithoutConsideringStr (const MEDCouplingPointSet &other, double prec) const
virtual DataArrayIntmergeNodes (double precision, bool &areNodesMerged, int &newNbOfNodes)=0
virtual DataArrayIntmergeNodes2 (double precision, bool &areNodesMerged, int &newNbOfNodes)=0
void getCoordinatesOfNode (int nodeId, std::vector< double > &coo) const throw (INTERP_KERNEL::Exception)
DataArrayIntbuildPermArrayForMergeNode (double precision, int limitNodeId, bool &areNodesMerged, int &newNbOfNodes) const
std::vector< int > getNodeIdsNearPoint (const double *pos, double eps) const throw (INTERP_KERNEL::Exception)
void getNodeIdsNearPoints (const double *pos, int nbOfNodes, double eps, std::vector< int > &c, std::vector< int > &cI) const throw (INTERP_KERNEL::Exception)
void findCommonNodes (double prec, int limitNodeId, DataArrayInt *&comm, DataArrayInt *&commIndex) const
DataArrayIntbuildNewNumberingFromCommonNodesFormat (const DataArrayInt *comm, const DataArrayInt *commIndex, int &newNbOfNodes) const
void getBoundingBox (double *bbox) const throw (INTERP_KERNEL::Exception)
void zipCoords ()
double getCaracteristicDimension () const
void rotate (const double *center, const double *vector, double angle)
void translate (const double *vector)
void scale (const double *point, double factor)
void changeSpaceDimension (int newSpaceDim, double dftVal=0.) throw (INTERP_KERNEL::Exception)
void tryToShareSameCoords (const MEDCouplingPointSet &other, double epsilon) throw (INTERP_KERNEL::Exception)
virtual void tryToShareSameCoordsPermute (const MEDCouplingPointSet &other, double epsilon)=0 throw (INTERP_KERNEL::Exception)
void findNodesOnPlane (const double *pt, const double *vec, double eps, std::vector< int > &nodes) const throw (INTERP_KERNEL::Exception)
void findNodesOnLine (const double *pt, const double *vec, double eps, std::vector< int > &nodes) const throw (INTERP_KERNEL::Exception)
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) const =0
virtual MEDCouplingPointSetbuildPartOfMySelfNode (const int *start, const int *end, bool fullyIn) const =0
virtual MEDCouplingPointSetbuildFacePartOfMySelfNode (const int *start, const int *end, bool fullyIn) const =0
virtual void findBoundaryNodes (std::vector< int > &nodes) const =0
virtual MEDCouplingPointSetbuildBoundaryMesh (bool keepCoords) const =0
virtual void renumberNodes (const int *newNodeNumbers, int newNbOfNodes)
virtual void renumberNodes2 (const int *newNodeNumbers, int newNbOfNodes)
virtual bool isEmptyMesh (const std::vector< int > &tinyInfo) const =0
void getTinySerializationInformation (std::vector< double > &tinyInfoD, std::vector< int > &tinyInfo, std::vector< std::string > &littleStrings) const
void resizeForUnserialization (const std::vector< int > &tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector< std::string > &littleStrings) const
void serialize (DataArrayInt *&a1, DataArrayDouble *&a2) const
void unserialization (const std::vector< double > &tinyInfoD, const std::vector< int > &tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector< std::string > &littleStrings)
virtual void getCellsInBoundingBox (const double *bbox, double eps, std::vector< int > &elems) const =0
virtual void getCellsInBoundingBox (const INTERP_KERNEL::DirectedBoundingBox &bbox, double eps, std::vector< int > &elems)=0
virtual DataArrayIntzipCoordsTraducer ()=0
- Public Member Functions inherited from ParaMEDMEM::MEDCouplingMesh
void setName (const char *name)
const char * getName () const
void setDescription (const char *descr)
const char * getDescription () const
double getTime (int &iteration, int &order) const
void setTime (double val, int iteration, int order)
void setTimeUnit (const char *unit)
const char * getTimeUnit () const
virtual MEDCouplingMeshdeepCpy () const =0
virtual MEDCouplingMeshType getType () const =0
bool isStructured () const
virtual void copyTinyInfoFrom (const MEDCouplingMesh *other) throw (INTERP_KERNEL::Exception)
virtual void checkDeepEquivalWith (const MEDCouplingMesh *other, int cellCompPol, double prec, DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const =0 throw (INTERP_KERNEL::Exception)
virtual void checkDeepEquivalOnSameNodesWith (const MEDCouplingMesh *other, int cellCompPol, double prec, DataArrayInt *&cellCor) const =0 throw (INTERP_KERNEL::Exception)
virtual void checkFastEquivalWith (const MEDCouplingMesh *other, double prec) const throw (INTERP_KERNEL::Exception)
void checkGeoEquivalWith (const MEDCouplingMesh *other, int levOfCheck, double prec, DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const throw (INTERP_KERNEL::Exception)
virtual void checkCoherency () const =0 throw (INTERP_KERNEL::Exception)
virtual void checkCoherency1 (double eps=1e-12) const =0 throw (INTERP_KERNEL::Exception)
virtual void checkCoherency2 (double eps=1e-12) const =0 throw (INTERP_KERNEL::Exception)
virtual int getNumberOfCells () const =0
virtual int getMeshDimension () const =0
virtual DataArrayDoublegetBarycenterAndOwner () const =0
virtual int getNumberOfCellsWithType (INTERP_KERNEL::NormalizedCellType type) const =0
virtual
INTERP_KERNEL::NormalizedCellType 
getTypeOfCell (int cellId) const =0
virtual std::set
< INTERP_KERNEL::NormalizedCellType
getAllGeoTypes () const =0
virtual void getNodeIdsOfCell (int cellId, std::vector< int > &conn) const =0
virtual DataArrayIntgetCellIdsFullyIncludedInNodeIds (const int *partBg, const int *partEnd) const
virtual std::string simpleRepr () const =0
virtual std::string advancedRepr () const =0
virtual std::vector< int > getDistributionOfTypes () const =0 throw (INTERP_KERNEL::Exception)
virtual DataArrayIntcheckTypeConsistencyAndContig (const std::vector< int > &code, const std::vector< const DataArrayInt * > &idsPerType) const =0 throw (INTERP_KERNEL::Exception)
virtual void splitProfilePerType (const DataArrayInt *profile, std::vector< int > &code, std::vector< DataArrayInt * > &idsInPflPerType, std::vector< DataArrayInt * > &idsPerType) const =0 throw (INTERP_KERNEL::Exception)
virtual MEDCouplingFieldDoublegetMeasureField (bool isAbs) const =0
virtual MEDCouplingFieldDoublegetMeasureFieldOnNode (bool isAbs) 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
virtual void getCellsContainingPoints (const double *pos, int nbOfPoints, double eps, std::vector< int > &elts, std::vector< int > &eltsIndex) const
virtual MEDCouplingFieldDoublefillFromAnalytic (TypeOfField t, int nbOfComp, FunctionToEvaluate func) const
virtual MEDCouplingFieldDoublefillFromAnalytic (TypeOfField t, int nbOfComp, const char *func) const
virtual MEDCouplingFieldDoublefillFromAnalytic2 (TypeOfField t, int nbOfComp, const char *func) const
virtual MEDCouplingFieldDoublefillFromAnalytic3 (TypeOfField t, int nbOfComp, const std::vector< std::string > &varsOrder, const char *func) const
virtual MEDCouplingFieldDoublebuildOrthogonalField () const =0
virtual void renumberCells (const int *old2NewBg, bool check)=0 throw (INTERP_KERNEL::Exception)
virtual MEDCouplingMeshmergeMyselfWith (const MEDCouplingMesh *other) const =0
virtual MEDCouplingUMeshbuildUnstructured () const =0 throw (INTERP_KERNEL::Exception)
virtual DataArrayIntsimplexize (int policy)=0 throw (INTERP_KERNEL::Exception)
virtual bool areCompatibleForMerge (const MEDCouplingMesh *other) const
void writeVTK (const char *fileName) const throw (INTERP_KERNEL::Exception)
virtual void writeVTKLL (std::ostream &ofs, const std::string &cellData, const std::string &pointData) const =0 throw (INTERP_KERNEL::Exception)
- Public Member Functions inherited from ParaMEDMEM::RefCountObject
bool decrRef () const
void incrRef () const
- Public Member Functions inherited from ParaMEDMEM::TimeLabel
TimeLabeloperator= (const TimeLabel &other)
void declareAsNew () const
unsigned int getTimeOfThis () const

Static Public Member Functions

static DataArrayDoubleMergeNodesArray (const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2) throw (INTERP_KERNEL::Exception)
static DataArrayDoubleMergeNodesArray (const std::vector< const MEDCouplingPointSet * > &ms) throw (INTERP_KERNEL::Exception)
static MEDCouplingPointSetBuildInstanceFromMeshType (MEDCouplingMeshType type)
static void Rotate2DAlg (const double *center, double angle, int nbNodes, double *coords)
static void Rotate3DAlg (const double *center, const double *vect, double angle, int nbNodes, double *coords)
- Static Public Member Functions inherited from ParaMEDMEM::MEDCouplingMesh
static MEDCouplingMeshMergeMeshes (const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2) throw (INTERP_KERNEL::Exception)
static MEDCouplingMeshMergeMeshes (std::vector< const MEDCouplingMesh * > &meshes) throw (INTERP_KERNEL::Exception)

Protected Member Functions

 MEDCouplingPointSet ()
 MEDCouplingPointSet (const MEDCouplingPointSet &other, bool deepCopy)
 ~MEDCouplingPointSet ()
virtual void checkFullyDefined () const =0 throw (INTERP_KERNEL::Exception)
void rotate2D (const double *center, double angle)
void rotate3D (const double *center, const double *vect, double angle)
void project2DCellOnXY (const int *startConn, const int *endConn, std::vector< double > &res) const
template<int SPACEDIM>
void findNodeIdsNearPointAlg (std::vector< double > &bbox, const double *pos, int nbNodes, double eps, std::vector< int > &c, std::vector< int > &cI) const
- Protected Member Functions inherited from ParaMEDMEM::MEDCouplingMesh
 MEDCouplingMesh ()
 MEDCouplingMesh (const MEDCouplingMesh &other)
virtual std::string getVTKDataSetType () const =0 throw (INTERP_KERNEL::Exception)
virtual ~MEDCouplingMesh ()
- Protected Member Functions inherited from ParaMEDMEM::RefCountObject
 RefCountObject ()
 RefCountObject (const RefCountObject &other)
virtual ~RefCountObject ()
- Protected Member Functions inherited from ParaMEDMEM::TimeLabel
 TimeLabel ()
virtual ~TimeLabel ()
void updateTimeWith (const TimeLabel &other) const

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. ParaMEDMEM::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 ParaMEDMEM::TimeLabel.

Reimplemented in ParaMEDMEM::MEDCouplingUMesh.

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

Referenced by rotate(), scale(), and translate().

int MEDCouplingPointSet::getNumberOfNodes ( ) const
virtual
int MEDCouplingPointSet::getSpaceDimension ( ) const
virtual
void MEDCouplingPointSet::setCoords ( const DataArrayDouble coords)
const DataArrayDouble* ParaMEDMEM::MEDCouplingPointSet::getCoords ( ) const
DataArrayDouble* ParaMEDMEM::MEDCouplingPointSet::getCoords ( )

This method returns directly the array in 'this' without incrementing ref counter. The pointer is dealed by the mesh. The caller should not deal (decrRef) with this pointer.

DataArrayDouble * MEDCouplingPointSet::getCoordinatesAndOwner ( ) const
virtual
void MEDCouplingPointSet::copyTinyStringsFrom ( const MEDCouplingMesh other) throw (INTERP_KERNEL::Exception)
virtual

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

Exceptions
ifother and this have not same mesh type.

Reimplemented from ParaMEDMEM::MEDCouplingMesh.

References _coords, and ParaMEDMEM::MEDCouplingMesh::copyTinyStringsFrom().

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

References _coords, and ParaMEDMEM::DataArrayDouble::isEqual().

Referenced by isEqual().

bool MEDCouplingPointSet::areCoordsEqualWithoutConsideringStr ( const MEDCouplingPointSet other,
double  prec 
) const
virtual DataArrayInt* ParaMEDMEM::MEDCouplingPointSet::mergeNodes ( double  precision,
bool &  areNodesMerged,
int &  newNbOfNodes 
)
pure virtual
virtual DataArrayInt* ParaMEDMEM::MEDCouplingPointSet::mergeNodes2 ( double  precision,
bool &  areNodesMerged,
int &  newNbOfNodes 
)
pure virtual
void MEDCouplingPointSet::getCoordinatesOfNode ( int  nodeId,
std::vector< double > &  coo 
) const throw (INTERP_KERNEL::Exception)
virtual

Returns coordinates of node with id 'nodeId' and append it in 'coo'.

Implements ParaMEDMEM::MEDCouplingMesh.

Referenced by ParaMEDMEM::MEDCouplingUMesh::areCellsFrom2MeshEqual().

DataArrayInt * MEDCouplingPointSet::buildPermArrayForMergeNode ( double  precision,
int  limitNodeId,
bool &  areNodesMerged,
int &  newNbOfNodes 
) const

This method is typically the base method used for implementation of mergeNodes. This method computes this permutation array using as input, This method is const ! So this method simply computes the array, no permutation of nodes is done. a precision 'precision' and a 'limitNodeId' that is the node id so that every nodes which id is strictly lower than 'limitNodeId' will not be merged. To desactivate this advanced feature put -1 to this argument.

Parameters
areNodesMergedoutput parameter that states if some nodes have been "merged" in returned array
newNbOfNodesoutput parameter too this is the maximal id in returned array to avoid to recompute it.

References buildNewNumberingFromCommonNodesFormat(), ParaMEDMEM::RefCountObject::decrRef(), findCommonNodes(), and getNumberOfNodes().

Referenced by ParaMEDMEM::MEDCouplingUMesh::mergeNodes(), and ParaMEDMEM::MEDCouplingUMesh::mergeNodes2().

std::vector< int > MEDCouplingPointSet::getNodeIdsNearPoint ( const double *  pos,
double  eps 
) const throw (INTERP_KERNEL::Exception)
void MEDCouplingPointSet::getNodeIdsNearPoints ( const double *  pos,
int  nbOfNodes,
double  eps,
std::vector< int > &  c,
std::vector< int > &  cI 
) const throw (INTERP_KERNEL::Exception)

Given a point given by its position 'pos' this method finds the set of node ids that are a a distance lower than eps. Position 'pos' is expected to be of size getSpaceDimension()*nbOfNodes. If not the behabiour is not warranted. This method throws an exception if no coordiantes are set.

void MEDCouplingPointSet::findCommonNodes ( double  prec,
int  limitNodeId,
DataArrayInt *&  comm,
DataArrayInt *&  commIndex 
) const

This methods searches for each node if there are any nodes in _coords that are less far than 'prec' from n1. if any, these nodes are stored in out params comm and commIndex.

Parameters
limitNodeIdis the limit node id. All nodes which id is strictly lower than 'limitNodeId' will not be merged each other.
commout parameter (not inout)
commIndexout parameter (not inout)

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

Referenced by buildPermArrayForMergeNode().

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.
commIin param in the same format than one returned by findCommonNodes method.
Returns
the old to new correspondance array.

References _coords, ParaMEDMEM::DataArrayInt::BuildOld2NewArrayFromSurjectiveFormat2(), and getNumberOfNodes().

Referenced by buildPermArrayForMergeNode().

void MEDCouplingPointSet::getBoundingBox ( double *  bbox) const throw (INTERP_KERNEL::Exception)
virtual

This method fills bbox params like that : bbox[0]=XMin, bbox[1]=XMax, bbox[2]=YMin... The returned bounding box is arranged along trihedron.

Parameters
bboxout array of size 2*this->getSpaceDimension().

Implements ParaMEDMEM::MEDCouplingMesh.

Referenced by ParaMEDMEM::MEDCouplingExtrudedMesh::getBoundingBox().

void MEDCouplingPointSet::zipCoords ( )
double MEDCouplingPointSet::getCaracteristicDimension ( ) const

This method expects that _coords attribute is set.

Returns
the carateristic dimension of point set. This caracteristic dimension is the max of difference
Exceptions
If_coords attribute not set.

References _coords, ParaMEDMEM::DataArrayDouble::getConstPointer(), and ParaMEDMEM::DataArray::getNbOfElems().

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

Non const method that operates a rotation of 'this'. If spaceDim==2 'vector' parameter is ignored (and could be 0) and the rotation is done around 'center' with angle specified by 'angle'. If spaceDim==3 the rotation axe is defined by ('center','vector') and the angle is 'angle'.

Parameters
centeran array of size getSpaceDimension().
vectorin array of size getSpaceDimension().
angleangle of rotation in radian.

Implements ParaMEDMEM::MEDCouplingMesh.

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

Referenced by ParaMEDMEM::MEDCouplingExtrudedMesh::rotate().

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

Non const method that operates a scale on 'this' with 'point' as reference point of scale and with factor 'factor'.

Parameters
pointin array of size getSpaceDimension().
factorfactor of the scaling

Implements ParaMEDMEM::MEDCouplingMesh.

References _coords, ParaMEDMEM::TimeLabel::declareAsNew(), getNumberOfNodes(), ParaMEDMEM::DataArrayDouble::getPointer(), getSpaceDimension(), and updateTime().

Referenced by ParaMEDMEM::MEDCouplingExtrudedMesh::scale().

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

This method is only available for already defined coordinates. If not an INTERP_KERNEL::Exception is thrown. The 'newSpaceDim' input must be greater or equal to 1. This method simply convert this to newSpaceDim space :

  • by putting a 0. for each $ i^{th} $ components of each coord of nodes so that i>=getSpaceDim(), if 'newSpaceDim'>getSpaceDimsion()
  • by ignoring each $ i^{th} $ components of each coord of nodes so that i >= 'newSpaceDim', 'newSpaceDim'<getSpaceDimension() If newSpaceDim==getSpaceDim() nothing is done by this method.

References ParaMEDMEM::DataArrayDouble::changeNbOfComponents(), and ParaMEDMEM::RefCountObject::decrRef().

void MEDCouplingPointSet::tryToShareSameCoords ( const MEDCouplingPointSet other,
double  epsilon 
) throw (INTERP_KERNEL::Exception)

This method try to substitute this->_coords with other._coords if arrays match. This method potentially modifies 'this' if it succeeds, otherway an exception is thrown.

virtual void ParaMEDMEM::MEDCouplingPointSet::tryToShareSameCoordsPermute ( const MEDCouplingPointSet other,
double  epsilon 
) throw (INTERP_KERNEL::Exception)
pure virtual
void MEDCouplingPointSet::findNodesOnPlane ( const double *  pt,
const double *  vec,
double  eps,
std::vector< int > &  nodes 
) const throw (INTERP_KERNEL::Exception)

This method is expecting to be called for meshes so that getSpaceDimension() returns 3. This method returns in 'nodes' output all the nodes that are at a distance lower than epsilon from plane defined by the point 'pt' and the vector 'vec'.

Parameters
ptpoints to an array of size 3 and represents a point that owns to plane.
vecpoints to an array of size 3 and represents the normal vector of the plane. The norm of the vector is not compulsory equal to 1. But norm must be greater than 10*abs(eps)
epsis the maximal distance around the plane where node in this->_coords will be picked.
nodesis the output of the method. The vector is not compulsory empty before call. The nodes that fulfills the condition will be added at the end of the nodes.

Referenced by ParaMEDMEM::MEDCouplingUMesh::buildSlice3D(), and ParaMEDMEM::MEDCouplingUMesh::buildSlice3DSurf().

void MEDCouplingPointSet::findNodesOnLine ( const double *  pt,
const double *  vec,
double  eps,
std::vector< int > &  nodes 
) const throw (INTERP_KERNEL::Exception)

This method is expecting to be called for meshes so that getSpaceDimension() returns 2 or 3. This method returns in 'nodes' output all the nodes that are at a distance lower than epsilon from a line defined by the point 'pt' and the vector 'vec'. 'pt' and 'vec' are expected to have a dimension equal to space dimension of 'this'

Parameters
ptpoints to an array of size this->getSpaceDimension and represents a point that owns to plane.
vecpoints to an array of size this->getSpaceDimension and represents the direction vector of the line. The norm of the vector is not compulsory equal to 1. But norm must be greater than 10*abs(eps)
epsis the maximal distance around the plane where node in this->_coords will be picked.
nodesis the output of the method. The vector is not compulsory empty before call. The nodes that fulfills the condition will be added at the end of the nodes.
DataArrayDouble * MEDCouplingPointSet::MergeNodesArray ( const MEDCouplingPointSet m1,
const MEDCouplingPointSet m2 
) throw (INTERP_KERNEL::Exception)
static

merge _coords arrays of m1 and m2 and returns the union. The returned instance is newly created with ref count == 1.

References ParaMEDMEM::DataArrayDouble::Aggregate().

DataArrayDouble * MEDCouplingPointSet::MergeNodesArray ( const std::vector< const MEDCouplingPointSet * > &  ms) throw (INTERP_KERNEL::Exception)
static
MEDCouplingPointSet * MEDCouplingPointSet::BuildInstanceFromMeshType ( MEDCouplingMeshType  type)
static

Factory to build new instance of instanciable subclasses of MEDCouplingPointSet. This method is used during unserialization process.

References ParaMEDMEM::MEDCouplingUMeshDesc::New(), ParaMEDMEM::MEDCouplingUMesh::New(), ParaMEDMEM::UNSTRUCTURED, and ParaMEDMEM::UNSTRUCTURED_DESC.

void MEDCouplingPointSet::Rotate2DAlg ( const double *  center,
double  angle,
int  nbNodes,
double *  coords 
)
static

Low static method that operates 3D rotation of 'nbNodes' 3D nodes whose coordinates are arranged in 'coords' around the center point 'center' and with angle 'angle'.

Referenced by rotate2D().

void MEDCouplingPointSet::Rotate3DAlg ( const double *  center,
const double *  vect,
double  angle,
int  nbNodes,
double *  coords 
)
static

Low static method that operates 3D rotation of 'nbNodes' 3D nodes whose coordinates are arranged in 'coords' around an axe ('center','vect') and with angle 'angle'.

Referenced by ParaMEDMEM::MEDCouplingUMesh::getCellIdsCrossingPlane(), and rotate3D().

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

This method implements pure virtual method MEDCouplingMesh::buildPart. This method build a part of 'this' by simply keeping cells whose ids are in ['start','end'). The coords are kept unchanged contrary to pure virtual method MEDCouplingMesh::buildPartAndReduceNodes. The returned mesh has to be managed by the caller.

Implements ParaMEDMEM::MEDCouplingMesh.

References buildPartOfMySelf().

Referenced by ParaMEDMEM::MEDCouplingCMesh::buildPart().

MEDCouplingMesh * MEDCouplingPointSet::buildPartAndReduceNodes ( const int *  start,
const int *  end,
DataArrayInt *&  arr 
) const
virtual

This method implements pure virtual method MEDCouplingMesh::buildPartAndReduceNodes. This method build a part of 'this' by simply keeping cells whose ids are in ['start','end') and potentially reduces the nodes set behind returned mesh. This cause an overhead but it is lesser in memory. This method returns an array too. This array allows to the caller to know the mapping between nodeids in 'this' and nodeids in returned mesh. This is quite usefull for MEDCouplingFieldDouble on nodes for example... 'arr' is in old2New format of size ret->getNumberOfCells like MEDCouplingUMesh::zipCoordsTraducer is. The returned mesh has to be managed by the caller.

Implements ParaMEDMEM::MEDCouplingMesh.

References buildPartOfMySelf(), and zipCoordsTraducer().

Referenced by ParaMEDMEM::MEDCouplingCMesh::buildPartAndReduceNodes().

virtual MEDCouplingPointSet* ParaMEDMEM::MEDCouplingPointSet::buildPartOfMySelf ( const int *  start,
const int *  end,
bool  keepCoords 
) const
pure virtual
virtual MEDCouplingPointSet* ParaMEDMEM::MEDCouplingPointSet::buildPartOfMySelfNode ( const int *  start,
const int *  end,
bool  fullyIn 
) const
pure virtual
virtual MEDCouplingPointSet* ParaMEDMEM::MEDCouplingPointSet::buildFacePartOfMySelfNode ( const int *  start,
const int *  end,
bool  fullyIn 
) const
pure virtual
virtual void ParaMEDMEM::MEDCouplingPointSet::findBoundaryNodes ( std::vector< int > &  nodes) const
pure virtual
virtual MEDCouplingPointSet* ParaMEDMEM::MEDCouplingPointSet::buildBoundaryMesh ( bool  keepCoords) const
pure virtual
void MEDCouplingPointSet::renumberNodes ( const int *  newNodeNumbers,
int  newNbOfNodes 
)
virtual
void MEDCouplingPointSet::renumberNodes2 ( const int *  newNodeNumbers,
int  newNbOfNodes 
)
virtual
virtual bool ParaMEDMEM::MEDCouplingPointSet::isEmptyMesh ( const std::vector< int > &  tinyInfo) 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 ParaMEDMEM::MEDCouplingMesh.

Reimplemented in ParaMEDMEM::MEDCouplingUMesh, and ParaMEDMEM::MEDCouplingUMeshDesc.

References ParaMEDMEM::DataArrayDouble::alloc().

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

Third and final step of serialization process.

Implements ParaMEDMEM::MEDCouplingMesh.

Reimplemented in ParaMEDMEM::MEDCouplingUMesh, and ParaMEDMEM::MEDCouplingUMeshDesc.

References _coords, getCoords(), and ParaMEDMEM::RefCountObject::incrRef().

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 void ParaMEDMEM::MEDCouplingPointSet::getCellsInBoundingBox ( const double *  bbox,
double  eps,
std::vector< int > &  elems 
) const
pure virtual
virtual void ParaMEDMEM::MEDCouplingPointSet::getCellsInBoundingBox ( const INTERP_KERNEL::DirectedBoundingBox &  bbox,
double  eps,
std::vector< int > &  elems 
)
pure virtual
virtual DataArrayInt* ParaMEDMEM::MEDCouplingPointSet::zipCoordsTraducer ( )
pure virtual
virtual void ParaMEDMEM::MEDCouplingPointSet::checkFullyDefined ( ) const throw (INTERP_KERNEL::Exception)
protectedpure virtual

Referenced by zipCoords().

bool MEDCouplingPointSet::intersectsBoundingBox ( const double *  bb1,
const double *  bb2,
int  dim,
double  eps 
)
staticprotected
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(), ParaMEDMEM::DataArrayDouble::getPointer(), and 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(), ParaMEDMEM::DataArrayDouble::getPointer(), and 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, ParaMEDMEM::DataArrayDouble::getConstPointer(), and getSpaceDimension().

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

bool MEDCouplingPointSet::isButterfly2DCell ( const std::vector< double > &  res,
bool  isQuad,
double  eps 
)
staticprotected
template<int SPACEDIM>
void ParaMEDMEM::MEDCouplingPointSet::findNodeIdsNearPointAlg ( std::vector< double > &  bbox,
const double *  pos,
int  nbNodes,
double  eps,
std::vector< int > &  c,
std::vector< int > &  cI 
) const
protected

Member Data Documentation

DataArrayDouble* ParaMEDMEM::MEDCouplingPointSet::_coords
protected
Copyright © 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS