

Public Member Functions | |
| MEDCouplingMesh * | deepCpy () const |
| MEDCouplingUMesh * | clone (bool recDeepCpy) const |
| void | updateTime () const |
| MEDCouplingMeshType | getType () const |
| bool | isEqual (const MEDCouplingMesh *other, double prec) const |
| bool | isEqualWithoutConsideringStr (const MEDCouplingMesh *other, double prec) const |
| void | checkDeepEquivalWith (const MEDCouplingMesh *other, int cellCompPol, double prec, DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const throw (INTERP_KERNEL::Exception) |
| void | checkDeepEquivalOnSameNodesWith (const MEDCouplingMesh *other, int cellCompPol, double prec, DataArrayInt *&cellCor) const throw (INTERP_KERNEL::Exception) |
| void | checkFastEquivalWith (const MEDCouplingMesh *other, double prec) const throw (INTERP_KERNEL::Exception) |
| void | checkCoherency () const throw (INTERP_KERNEL::Exception) |
| void | checkCoherency1 (double eps=1e-12) const throw (INTERP_KERNEL::Exception) |
| void | checkCoherency2 (double eps=1e-12) const throw (INTERP_KERNEL::Exception) |
| void | setMeshDimension (int meshDim) |
| void | allocateCells (int nbOfCells) |
| void | insertNextCell (INTERP_KERNEL::NormalizedCellType type, int size, const int *nodalConnOfCell) throw (INTERP_KERNEL::Exception) |
| void | finishInsertingCells () |
| const std::set < INTERP_KERNEL::NormalizedCellType > & | getAllTypes () const |
| std::set < INTERP_KERNEL::NormalizedCellType > | getAllGeoTypes () const |
| std::set < INTERP_KERNEL::NormalizedCellType > | getTypesOfPart (const int *begin, const int *end) const throw (INTERP_KERNEL::Exception) |
| void | setConnectivity (DataArrayInt *conn, DataArrayInt *connIndex, bool isComputingTypes=true) |
| const DataArrayInt * | getNodalConnectivity () const |
| const DataArrayInt * | getNodalConnectivityIndex () const |
| DataArrayInt * | getNodalConnectivity () |
| DataArrayInt * | getNodalConnectivityIndex () |
| INTERP_KERNEL::NormalizedCellType | getTypeOfCell (int cellId) const |
| int | getNumberOfCellsWithType (INTERP_KERNEL::NormalizedCellType type) const |
| void | getNodeIdsOfCell (int cellId, std::vector< int > &conn) const |
| DataArrayInt * | getCellIdsFullyIncludedInNodeIds (const int *partBg, const int *partEnd) const |
| void | getCoordinatesOfNode (int nodeId, std::vector< double > &coo) const |
| std::string | simpleRepr () const |
| std::string | advancedRepr () const |
| std::string | reprConnectivityOfThis () const |
| int | getNumberOfNodesInCell (int cellId) const |
| int | getNumberOfCells () const |
| int | getMeshDimension () const |
| int | getMeshLength () const |
| void | computeTypes () |
| void | getTinySerializationInformation (std::vector< double > &tinyInfoD, std::vector< int > &tinyInfo, std::vector< std::string > &littleStrings) const |
| bool | isEmptyMesh (const std::vector< int > &tinyInfo) 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) |
| bool | areCellsEqual (int cell1, int cell2, int compType) const |
| bool | areCellsEqual0 (int cell1, int cell2) const |
| bool | areCellsEqual1 (int cell1, int cell2) const |
| bool | areCellsEqual2 (int cell1, int cell2) const |
| bool | areCellsFrom2MeshEqual (const MEDCouplingUMesh *other, int cellId, double prec) const |
| void | convertToPolyTypes (const std::vector< int > &cellIdsToConvert) |
| void | convertAllToPoly () |
| void | unPolyze () |
| DataArrayInt * | zipCoordsTraducer () throw (INTERP_KERNEL::Exception) |
| DataArrayInt * | zipConnectivityTraducer (int compType) throw (INTERP_KERNEL::Exception) |
| bool | areCellsIncludedIn (const MEDCouplingUMesh *other, int compType, DataArrayInt *&arr) const throw (INTERP_KERNEL::Exception) |
| void | getReverseNodalConnectivity (DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const throw (INTERP_KERNEL::Exception) |
| MEDCouplingUMesh * | buildDescendingConnectivity (DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const throw (INTERP_KERNEL::Exception) |
| DataArrayInt * | mergeNodes (double precision, bool &areNodesMerged, int &newNbOfNodes) |
| DataArrayInt * | mergeNodes2 (double precision, bool &areNodesMerged, int &newNbOfNodes) |
| void | tryToShareSameCoordsPermute (const MEDCouplingPointSet &other, double epsilon) throw (INTERP_KERNEL::Exception) |
| MEDCouplingPointSet * | buildPartOfMySelf (const int *begin, const int *end, bool keepCoords) const |
| MEDCouplingPointSet * | buildPartOfMySelfNode (const int *begin, const int *end, bool fullyIn) const |
| DataArrayInt * | getCellIdsLyingOnNodes (const int *begin, const int *end, bool fullyIn) const |
| MEDCouplingPointSet * | buildFacePartOfMySelfNode (const int *begin, const int *end, bool fullyIn) const |
| MEDCouplingUMesh * | buildUnstructured () const throw (INTERP_KERNEL::Exception) |
| void | findBoundaryNodes (std::vector< int > &nodes) const |
| MEDCouplingPointSet * | buildBoundaryMesh (bool keepCoords) const |
| DataArrayInt * | findCellsIdsOnBoundary () const throw (INTERP_KERNEL::Exception) |
| void | renumberNodes (const int *newNodeNumbers, int newNbOfNodes) |
| void | renumberNodes2 (const int *newNodeNumbers, int newNbOfNodes) |
| void | renumberCells (const int *old2NewBg, bool check) throw (INTERP_KERNEL::Exception) |
| void | getCellsInBoundingBox (const double *bbox, double eps, std::vector< int > &elems) |
| void | getCellsInBoundingBox (const INTERP_KERNEL::DirectedBoundingBox &bbox, double eps, std::vector< int > &elems) |
| MEDCouplingFieldDouble * | getMeasureField (bool isAbs) const |
| DataArrayDouble * | getPartMeasureField (bool isAbs, const int *begin, const int *end) const |
| MEDCouplingFieldDouble * | getMeasureFieldOnNode (bool isAbs) const |
| MEDCouplingFieldDouble * | buildOrthogonalField () const |
| MEDCouplingFieldDouble * | buildPartOrthogonalField (const int *begin, const int *end) const |
| MEDCouplingFieldDouble * | buildDirectionVectorField () const |
| bool | isContiguous1D () const throw (INTERP_KERNEL::Exception) |
| void | project1D (const double *pt, const double *v, double eps, double *res) const |
| int | getCellContainingPoint (const double *pos, double eps) const |
| void | getCellsContainingPoint (const double *pos, double eps, std::vector< int > &elts) const |
| void | getCellsContainingPoints (const double *pos, int nbOfPoints, double eps, std::vector< int > &elts, std::vector< int > &eltsIndex) const |
| void | checkButterflyCells (std::vector< int > &cells) const |
| void | getBoundingBoxForBBTree (std::vector< double > &bbox) const |
| MEDCouplingUMesh * | buildExtrudedMesh (const MEDCouplingUMesh *mesh1D, int policy) |
| bool | isFullyQuadratic () const |
| bool | isPresenceOfQuadratic () const |
| void | convertQuadraticCellsToLinear () throw (INTERP_KERNEL::Exception) |
| DataArrayInt * | simplexize (int policy) throw (INTERP_KERNEL::Exception) |
| bool | areOnlySimplexCells () const throw (INTERP_KERNEL::Exception) |
| void | convertDegeneratedCells () throw (INTERP_KERNEL::Exception) |
| void | are2DCellsNotCorrectlyOriented (const double *vec, bool polyOnly, std::vector< int > &cells) const throw (INTERP_KERNEL::Exception) |
| void | orientCorrectly2DCells (const double *vec, bool polyOnly) throw (INTERP_KERNEL::Exception) |
| void | arePolyhedronsNotCorrectlyOriented (std::vector< int > &cells) const throw (INTERP_KERNEL::Exception) |
| void | orientCorrectlyPolyhedrons () throw (INTERP_KERNEL::Exception) |
| void | getFastAveragePlaneOfThis (double *vec, double *pos) const throw (INTERP_KERNEL::Exception) |
| MEDCouplingFieldDouble * | getEdgeRatioField () const throw (INTERP_KERNEL::Exception) |
| MEDCouplingFieldDouble * | getAspectRatioField () const throw (INTERP_KERNEL::Exception) |
| MEDCouplingFieldDouble * | getWarpField () const throw (INTERP_KERNEL::Exception) |
| MEDCouplingFieldDouble * | getSkewField () const throw (INTERP_KERNEL::Exception) |
| DataArrayInt * | checkTypeConsistencyAndContig (const std::vector< int > &code, const std::vector< const DataArrayInt * > &idsPerType) const throw (INTERP_KERNEL::Exception) |
| void | splitProfilePerType (const DataArrayInt *profile, std::vector< int > &code, std::vector< DataArrayInt * > &globIdsPerType, std::vector< DataArrayInt * > &idsPerType) const throw (INTERP_KERNEL::Exception) |
| MEDCouplingUMesh * | emulateMEDMEMBDC (const MEDCouplingUMesh *nM1LevMesh, DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *&revDesc, DataArrayInt *&revDescIndx, DataArrayInt *&nM1LevMeshIds, DataArrayInt *&meshnM1Old2New) const throw (INTERP_KERNEL::Exception) |
| DataArrayInt * | sortCellsInMEDFileFrmt () throw (INTERP_KERNEL::Exception) |
| bool | checkConsecutiveCellTypes () const |
| bool | checkConsecutiveCellTypesAndOrder (const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd) const |
| DataArrayInt * | getLevArrPerCellTypes (const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd, DataArrayInt *&nbPerType) const throw (INTERP_KERNEL::Exception) |
| DataArrayInt * | getRenumArrForConsecutiveCellTypesSpec (const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd) const throw (INTERP_KERNEL::Exception) |
| DataArrayInt * | rearrange2ConsecutiveCellTypes () |
| std::vector< MEDCouplingUMesh * > | splitByType () const |
| DataArrayInt * | keepCellIdsByType (INTERP_KERNEL::NormalizedCellType type, const int *begin, const int *end) const throw (INTERP_KERNEL::Exception) |
| DataArrayInt * | convertCellArrayPerGeoType (const DataArrayInt *da) const throw (INTERP_KERNEL::Exception) |
| MEDCouplingUMesh * | keepSpecifiedCells (INTERP_KERNEL::NormalizedCellType type, const int *idsPerGeoTypeBg, const int *idsPerGeoTypeEnd) const |
| MEDCouplingMesh * | mergeMyselfWith (const MEDCouplingMesh *other) const |
| DataArrayDouble * | getBarycenterAndOwner () const |
| DataArrayDouble * | getPartBarycenterAndOwner (const int *begin, const int *end) const |
Static Public Member Functions | |
| static MEDCouplingUMesh * | New () |
| static MEDCouplingUMesh * | New (const char *meshName, int meshDim) |
| static MEDCouplingUMesh * | Build0DMeshFromCoords (DataArrayDouble *da) throw (INTERP_KERNEL::Exception) |
| static MEDCouplingUMesh * | MergeUMeshes (const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw (INTERP_KERNEL::Exception) |
| static MEDCouplingUMesh * | MergeUMeshes (std::vector< const MEDCouplingUMesh * > &a) throw (INTERP_KERNEL::Exception) |
| static MEDCouplingUMesh * | MergeUMeshesOnSameCoords (const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw (INTERP_KERNEL::Exception) |
| static MEDCouplingUMesh * | MergeUMeshesOnSameCoords (const std::vector< const MEDCouplingUMesh * > &meshes) |
| static MEDCouplingUMesh * | FuseUMeshesOnSameCoords (const std::vector< const MEDCouplingUMesh * > &meshes, int compType, std::vector< DataArrayInt * > &corr) |
| static bool | IsPolygonWellOriented (const double *vec, const int *begin, const int *end, const double *coords) |
| static bool | IsPolyhedronWellOriented (const int *begin, const int *end, const double *coords) |
| static void | TryToCorrectPolyhedronOrientation (int *begin, int *end, const double *coords) throw (INTERP_KERNEL::Exception) |
Static Public Attributes | |
| static double | EPS_FOR_POLYH_ORIENTATION = 1.e-14 |
| MEDCouplingUMesh * MEDCouplingUMesh::New | ( | ) | [static] |
Referenced by allocateCells(), Build0DMeshFromCoords(), buildBoundaryMesh(), buildDescendingConnectivity(), buildDirectionVectorField(), buildFacePartOfMySelfNode(), ParaMEDMEM::MEDCouplingPointSet::BuildInstanceFromMeshType(), buildOrthogonalField(), buildPartOrthogonalField(), convertQuadraticCellsToLinear(), emulateMEDMEMBDC(), findBoundaryNodes(), findCellsIdsOnBoundary(), FuseUMeshesOnSameCoords(), getAspectRatioField(), getBarycenterAndOwner(), getCellIdsFullyIncludedInNodeIds(), getCellIdsLyingOnNodes(), getEdgeRatioField(), ParaMEDMEM::MEDFileUMesh::getFamilies(), getMeasureField(), getMeasureFieldOnNode(), ParaMEDMEM::MEDFileUMesh::getMeshAtLevel(), getPartBarycenterAndOwner(), getPartMeasureField(), getSkewField(), getWarpField(), MergeUMeshes(), MergeUMeshesOnSameCoords(), rearrange2ConsecutiveCellTypes(), serialize(), unserialization(), and zipCoordsTraducer().
| MEDCouplingUMesh * MEDCouplingUMesh::New | ( | const char * | meshName, |
| int | meshDim | ||
| ) | [static] |
References setMeshDimension(), and ParaMEDMEM::MEDCouplingMesh::setName().
| MEDCouplingMesh * MEDCouplingUMesh::deepCpy | ( | ) | const [virtual] |
Implements ParaMEDMEM::MEDCouplingMesh.
References clone().
Referenced by ParaMEDMEM::MEDCouplingFieldDouble::zipConnectivity().
| MEDCouplingUMesh * MEDCouplingUMesh::clone | ( | bool | recDeepCpy | ) | const |
Referenced by deepCpy().
| void MEDCouplingUMesh::updateTime | ( | ) | const [virtual] |
This method should be called on high level classes as Field or Mesh to take into acount modifications done in aggragates objects.
Reimplemented from ParaMEDMEM::MEDCouplingPointSet.
References ParaMEDMEM::TimeLabel::updateTimeWith().
Referenced by buildExtrudedMesh(), finishInsertingCells(), and orientCorrectlyPolyhedrons().
| MEDCouplingMeshType ParaMEDMEM::MEDCouplingUMesh::getType | ( | ) | const [virtual] |
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::UNSTRUCTURED.
| bool MEDCouplingUMesh::isEqual | ( | const MEDCouplingMesh * | other, |
| double | prec | ||
| ) | const [virtual] |
This method is a method that compares 'this' and 'other'. This method compares all attributes, even names and component names.
Reimplemented from ParaMEDMEM::MEDCouplingPointSet.
References ParaMEDMEM::DataArrayInt::isEqual(), and ParaMEDMEM::MEDCouplingPointSet::isEqual().
Referenced by ParaMEDMEM::MEDCouplingExtrudedMesh::isEqual().
| bool MEDCouplingUMesh::isEqualWithoutConsideringStr | ( | const MEDCouplingMesh * | other, |
| double | prec | ||
| ) | const [virtual] |
Reimplemented from ParaMEDMEM::MEDCouplingPointSet.
References ParaMEDMEM::DataArrayInt::isEqualWithoutConsideringStr(), and ParaMEDMEM::MEDCouplingPointSet::isEqualWithoutConsideringStr().
Referenced by ParaMEDMEM::MEDCouplingExtrudedMesh::isEqualWithoutConsideringStr().
| void MEDCouplingUMesh::checkDeepEquivalWith | ( | const MEDCouplingMesh * | other, |
| int | cellCompPol, | ||
| double | prec, | ||
| DataArrayInt *& | cellCor, | ||
| DataArrayInt *& | nodeCor | ||
| ) | const throw (INTERP_KERNEL::Exception) [virtual] |
This method looks if 'this' and 'other' are geometrically equivalent that is to say if each cell in 'other' correspond to one cell and only one in 'this' is found regarding 'prec' parameter and 'cellCompPol' parameter.
In case of success cellCor and nodeCor are informed both.
| cellCompPol | values are described in MEDCouplingUMesh::zipConnectivityTraducer method. |
| cellCor | output array giving the correspondance of cells from 'other' to 'this'. |
| nodeCor | output array giving the correspondance of nodes from 'other' to 'this'. |
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::MEDCouplingMesh::checkFastEquivalWith(), getNumberOfCells(), and ParaMEDMEM::DataArrayInt::New().
| void MEDCouplingUMesh::checkDeepEquivalOnSameNodesWith | ( | const MEDCouplingMesh * | other, |
| int | cellCompPol, | ||
| double | prec, | ||
| DataArrayInt *& | cellCor | ||
| ) | const throw (INTERP_KERNEL::Exception) [virtual] |
This method looks if 'this' and 'other' are geometrically equivalent that is to say if each cell in 'other' correspond to one cell and only one in 'this' is found regarding 'prec' parameter and 'cellCompPol' parameter. The difference with MEDCouplingUMesh::checkDeepEquivalWith method is that coordinates of 'this' and 'other' are expected to be the same. If not an exception will be thrown. This method is close to MEDCouplingUMesh::areCellsIncludedIn except that this method throws exception !
In case of success cellCor are informed both.
| cellCompPol | values are described in MEDCouplingUMesh::zipConnectivityTraducer method. |
| cellCor | output array giving the correspondance of cells from 'other' to 'this'. |
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::MEDCouplingMesh::checkFastEquivalWith(), getNumberOfCells(), and ParaMEDMEM::DataArrayInt::New().
| void MEDCouplingUMesh::checkFastEquivalWith | ( | const MEDCouplingMesh * | other, |
| double | prec | ||
| ) | const throw (INTERP_KERNEL::Exception) [virtual] |
This method checks fastly that 'this' and 'other' are equal.
Reimplemented from ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::MEDCouplingMesh::checkFastEquivalWith().
| void MEDCouplingUMesh::checkCoherency | ( | ) | const throw (INTERP_KERNEL::Exception) [virtual] |
This method checks that this is correctly designed. For example le coordinates are set, nodal connectivity. When this method returns without throwing any exception, 'this' is expected to be writable, exchangeable and to be available for most of algorithm. When a mesh has been constructed from scratch it is a good habits to call this method to check that all is in order in 'this'.
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::DataArray::getInfoOnComponent(), and ParaMEDMEM::DataArray::getNumberOfComponents().
Referenced by getAspectRatioField(), getEdgeRatioField(), getSkewField(), and getWarpField().
| void MEDCouplingUMesh::checkCoherency1 | ( | double | eps = 1e-12 | ) | const throw (INTERP_KERNEL::Exception) [virtual] |
This method performs deeper checking in 'this' than MEDCouplingUMesh::checkCoherency does. So this method is more time-consuming. This method checks that nodal connectivity points to valid node ids. No geometrical aspects are checked here. These aspects are done in MEDCouplingUMesh::checkCoherency2.
Implements ParaMEDMEM::MEDCouplingMesh.
References INTERP_KERNEL::NORM_POLYHED.
| void MEDCouplingUMesh::checkCoherency2 | ( | double | eps = 1e-12 | ) | const throw (INTERP_KERNEL::Exception) [virtual] |
Implements ParaMEDMEM::MEDCouplingMesh.
| void MEDCouplingUMesh::setMeshDimension | ( | int | meshDim | ) |
References ParaMEDMEM::TimeLabel::declareAsNew().
Referenced by MergeUMeshesOnSameCoords(), New(), MEDLoaderNS::readUMeshFromFileLev1(), and unserialization().
| void MEDCouplingUMesh::allocateCells | ( | int | nbOfCells | ) |
| void MEDCouplingUMesh::insertNextCell | ( | INTERP_KERNEL::NormalizedCellType | type, |
| int | size, | ||
| const int * | nodalConnOfCell | ||
| ) | throw (INTERP_KERNEL::Exception) |
Appends a cell in connectivity array.
| type | type of cell to add. |
| size | number of nodes constituting this cell. |
| nodalConnOfCell | the connectivity of the cell to add. |
Referenced by buildDescendingConnectivity().
| void MEDCouplingUMesh::finishInsertingCells | ( | ) |
Method to be called to cloture the insertion of cells using this->insertNextCell.
References ParaMEDMEM::TimeLabel::declareAsNew(), ParaMEDMEM::DataArrayInt::getConstPointer(), ParaMEDMEM::DataArrayInt::reAlloc(), and updateTime().
Referenced by buildDescendingConnectivity().
| const std::set<INTERP_KERNEL::NormalizedCellType>& ParaMEDMEM::MEDCouplingUMesh::getAllTypes | ( | ) | const |
Referenced by ParaMEDMEM::MEDCouplingExtrudedMesh::getAllGeoTypes().
| std::set< INTERP_KERNEL::NormalizedCellType > MEDCouplingUMesh::getAllGeoTypes | ( | ) | const [virtual] |
Implements ParaMEDMEM::MEDCouplingMesh.
| std::set< INTERP_KERNEL::NormalizedCellType > MEDCouplingUMesh::getTypesOfPart | ( | const int * | begin, |
| const int * | end | ||
| ) | const throw (INTERP_KERNEL::Exception) |
This method is equivalent to MEDCouplingUMesh::getAllTypes excecpt that it returns only types of submesh which cell ids are in [begin,end). This method avoids to compute explicitely submesh to get its types.
| void MEDCouplingUMesh::setConnectivity | ( | DataArrayInt * | conn, |
| DataArrayInt * | connIndex, | ||
| bool | isComputingTypes = true |
||
| ) |
Method reserved for advanced users having prepared their connectivity before. Arrays 'conn' and 'connIndex' will be aggregated without any copy and their counter will be incremented.
References computeTypes(), ParaMEDMEM::TimeLabel::declareAsNew(), and ParaMEDMEM::DataArrayInt::SetArrayIn().
Referenced by convertQuadraticCellsToLinear(), ParaMEDMEM::MEDCouplingCMesh::fill1DUnstructuredMesh(), ParaMEDMEM::MEDCouplingCMesh::fill2DUnstructuredMesh(), ParaMEDMEM::MEDCouplingCMesh::fill3DUnstructuredMesh(), MergeUMeshesOnSameCoords(), MEDLoaderNS::readUMeshFromFileLev1(), and unserialization().
| const DataArrayInt* ParaMEDMEM::MEDCouplingUMesh::getNodalConnectivity | ( | ) | const |
| const DataArrayInt* ParaMEDMEM::MEDCouplingUMesh::getNodalConnectivityIndex | ( | ) | const |
| DataArrayInt* ParaMEDMEM::MEDCouplingUMesh::getNodalConnectivity | ( | ) |
| DataArrayInt* ParaMEDMEM::MEDCouplingUMesh::getNodalConnectivityIndex | ( | ) |
| INTERP_KERNEL::NormalizedCellType MEDCouplingUMesh::getTypeOfCell | ( | int | cellId | ) | const [virtual] |
Returns the cell type of cell with id 'cellId'.
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::DataArrayInt::getConstPointer().
Referenced by areCellsFrom2MeshEqual(), convertQuadraticCellsToLinear(), ParaMEDMEM::MEDCouplingExtrudedMesh::getNumberOfCellsWithType(), ParaMEDMEM::MEDCouplingExtrudedMesh::getTypeOfCell(), isFullyQuadratic(), isPresenceOfQuadratic(), and keepSpecifiedCells().
| int MEDCouplingUMesh::getNumberOfCellsWithType | ( | INTERP_KERNEL::NormalizedCellType | type | ) | const [virtual] |
Returns nb of cells having the geometric type 'type'.
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::DataArrayInt::getConstPointer(), and getNumberOfCells().
| void MEDCouplingUMesh::getNodeIdsOfCell | ( | int | cellId, |
| std::vector< int > & | conn | ||
| ) | const [virtual] |
Appends the nodal connectivity in 'conn' of cell with id 'cellId'. All elements added in conn can be used by MEDCouplingUMesh::getCoordinatesOfNode method. That is to say -1 separator is omitted in returned conn.
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::DataArrayInt::getConstPointer().
Referenced by areCellsFrom2MeshEqual(), buildDirectionVectorField(), and ParaMEDMEM::MEDCouplingExtrudedMesh::getNodeIdsOfCell().
| DataArrayInt * MEDCouplingUMesh::getCellIdsFullyIncludedInNodeIds | ( | const int * | partBg, |
| const int * | partEnd | ||
| ) | const [virtual] |
Given a nodeIds range ['partBg','partEnd'), this method returns the set of cell ids in ascendant order whose connectivity of these cells are fully included in the range. As a consequence the returned set of cell ids does not always fit the nodes in ['partBg','partEnd') This method returns the corresponding cells in a newly created array that the caller has the responsability.
Reimplemented from ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::DataArrayInt::alloc(), ParaMEDMEM::DataArrayInt::getPointer(), and New().
Referenced by MEDLoaderNS::readFieldDoubleLev2().
| void MEDCouplingUMesh::getCoordinatesOfNode | ( | int | nodeId, |
| std::vector< double > & | coo | ||
| ) | const [virtual] |
Returns coordinates of node with id 'nodeId' and append it in 'coo'.
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::DataArrayDouble::getConstPointer(), and ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension().
Referenced by areCellsFrom2MeshEqual(), and ParaMEDMEM::MEDCouplingExtrudedMesh::getCoordinatesOfNode().
| std::string MEDCouplingUMesh::simpleRepr | ( | ) | const [virtual] |
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::MEDCouplingMesh::getDescription(), ParaMEDMEM::DataArray::getInfoOnComponent(), ParaMEDMEM::MEDCouplingMesh::getName(), getNumberOfCells(), ParaMEDMEM::MEDCouplingPointSet::getNumberOfNodes(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), ParaMEDMEM::MEDCouplingMesh::getTime(), and ParaMEDMEM::MEDCouplingMesh::getTimeUnit().
Referenced by advancedRepr(), and ParaMEDMEM::MEDCouplingExtrudedMesh::simpleRepr().
| std::string MEDCouplingUMesh::advancedRepr | ( | ) | const [virtual] |
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::DataArrayDouble::reprWithoutNameStream(), and simpleRepr().
Referenced by ParaMEDMEM::MEDCouplingExtrudedMesh::advancedRepr().
| std::string MEDCouplingUMesh::reprConnectivityOfThis | ( | ) | const |
| int MEDCouplingUMesh::getNumberOfNodesInCell | ( | int | cellId | ) | const |
References ParaMEDMEM::DataArrayInt::getConstPointer(), and INTERP_KERNEL::NORM_POLYHED.
| int MEDCouplingUMesh::getNumberOfCells | ( | ) | const [virtual] |
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::DataArray::getNumberOfTuples().
Referenced by ParaMEDMEM::MEDCouplingExtrudedMesh::advancedRepr(), areOnlySimplexCells(), buildBoundaryMesh(), buildDirectionVectorField(), buildOrthogonalField(), checkButterflyCells(), checkConsecutiveCellTypes(), checkConsecutiveCellTypesAndOrder(), checkDeepEquivalOnSameNodesWith(), checkDeepEquivalWith(), convertAllToPoly(), convertDegeneratedCells(), convertQuadraticCellsToLinear(), findBoundaryNodes(), getAspectRatioField(), getBarycenterAndOwner(), getBoundingBoxForBBTree(), getCellsInBoundingBox(), getEdgeRatioField(), getMeasureField(), ParaMEDMEM::MEDCouplingExtrudedMesh::getMeasureField(), ParaMEDMEM::MEDCouplingExtrudedMesh::getNodeIdsOfCell(), ParaMEDMEM::MEDCouplingExtrudedMesh::getNumberOfCells(), getNumberOfCellsWithType(), ParaMEDMEM::MEDCouplingExtrudedMesh::getNumberOfCellsWithType(), getSkewField(), getTinySerializationInformation(), ParaMEDMEM::MEDCouplingExtrudedMesh::getTypeOfCell(), getWarpField(), isContiguous1D(), isFullyQuadratic(), isPresenceOfQuadratic(), keepSpecifiedCells(), orientCorrectlyPolyhedrons(), MEDLoaderNS::prepareCellFieldDoubleForWriting(), project1D(), rearrange2ConsecutiveCellTypes(), serialize(), simpleRepr(), ParaMEDMEM::MEDCouplingExtrudedMesh::simpleRepr(), splitByType(), unPolyze(), and zipCoordsTraducer().
| int MEDCouplingUMesh::getMeshDimension | ( | ) | const [virtual] |
Implements ParaMEDMEM::MEDCouplingMesh.
Referenced by ParaMEDMEM::InterpolationMatrix::addContribution(), areOnlySimplexCells(), buildDirectionVectorField(), buildExtrudedMesh(), buildOrthogonalField(), buildPartOfMySelf(), buildPartOrthogonalField(), checkButterflyCells(), convertDegeneratedCells(), convertToPolyTypes(), getAspectRatioField(), getCellsContainingPoints(), getCellsInBoundingBox(), getEdgeRatioField(), getMeasureField(), getMeasureFieldOnNode(), getPartMeasureField(), getSkewField(), getTinySerializationInformation(), getWarpField(), isContiguous1D(), MergeUMeshes(), orientCorrectlyPolyhedrons(), project1D(), serialize(), and unPolyze().
| int MEDCouplingUMesh::getMeshLength | ( | ) | const |
This method is for test reason. Normally the integer returned is not useable by user.
References ParaMEDMEM::DataArray::getNbOfElems().
Referenced by convertDegeneratedCells(), convertQuadraticCellsToLinear(), getTinySerializationInformation(), serialize(), and unPolyze().
| void MEDCouplingUMesh::computeTypes | ( | ) |
This method recomputes all cell types of 'this'.
References ParaMEDMEM::DataArrayInt::getConstPointer(), and ParaMEDMEM::DataArray::getNbOfElems().
Referenced by convertDegeneratedCells(), convertToPolyTypes(), rearrange2ConsecutiveCellTypes(), setConnectivity(), and unPolyze().
| void MEDCouplingUMesh::getTinySerializationInformation | ( | std::vector< double > & | tinyInfoD, |
| std::vector< int > & | tinyInfo, | ||
| std::vector< std::string > & | littleStrings | ||
| ) | const [virtual] |
size of returned tinyInfo must be always the same.
First step of serialization process. Used by ParaMEDMEM and MEDCouplingCorba to transfert data between process.
Reimplemented from ParaMEDMEM::MEDCouplingPointSet.
References getMeshDimension(), getMeshLength(), and getNumberOfCells().
Referenced by ParaMEDMEM::MEDCouplingExtrudedMesh::getTinySerializationInformation().
| bool MEDCouplingUMesh::isEmptyMesh | ( | const std::vector< int > & | tinyInfo | ) | const [virtual] |
First step of unserialization process.
Implements ParaMEDMEM::MEDCouplingPointSet.
| void MEDCouplingUMesh::resizeForUnserialization | ( | const std::vector< int > & | tinyInfo, |
| DataArrayInt * | a1, | ||
| DataArrayDouble * | a2, | ||
| std::vector< std::string > & | littleStrings | ||
| ) | const [virtual] |
Second step of serialization process.
| tinyInfo | must be equal to the result given by getTinySerializationInformation method. |
Reimplemented from ParaMEDMEM::MEDCouplingPointSet.
References ParaMEDMEM::DataArrayInt::alloc().
Referenced by ParaMEDMEM::MEDCouplingExtrudedMesh::unserialization().
| void MEDCouplingUMesh::serialize | ( | DataArrayInt *& | a1, |
| DataArrayDouble *& | a2 | ||
| ) | const [virtual] |
Third and final step of serialization process.
Reimplemented from ParaMEDMEM::MEDCouplingPointSet.
References ParaMEDMEM::DataArrayInt::alloc(), ParaMEDMEM::DataArrayInt::getConstPointer(), getMeshDimension(), getMeshLength(), getNodalConnectivity(), getNodalConnectivityIndex(), getNumberOfCells(), ParaMEDMEM::DataArrayInt::getPointer(), and New().
Referenced by ParaMEDMEM::MEDCouplingExtrudedMesh::serialize().
| void MEDCouplingUMesh::unserialization | ( | const std::vector< double > & | tinyInfoD, |
| const std::vector< int > & | tinyInfo, | ||
| const DataArrayInt * | a1, | ||
| DataArrayDouble * | a2, | ||
| const std::vector< std::string > & | littleStrings | ||
| ) | [virtual] |
Second and final unserialization process.
| tinyInfo | must be equal to the result given by getTinySerializationInformation method. |
Reimplemented from ParaMEDMEM::MEDCouplingPointSet.
References ParaMEDMEM::DataArrayInt::alloc(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayInt::getConstPointer(), ParaMEDMEM::DataArrayInt::getPointer(), New(), setConnectivity(), and setMeshDimension().
Referenced by ParaMEDMEM::MEDCouplingExtrudedMesh::unserialization().
| bool MEDCouplingUMesh::areCellsEqual | ( | int | cell1, |
| int | cell2, | ||
| int | compType | ||
| ) | const |
This method stands if 'cell1' and 'cell2' are equals regarding 'compType' policy. The semantic of 'compType' is specified in MEDCouplingUMesh::zipConnectivityTraducer method.
References areCellsEqual0(), areCellsEqual1(), and areCellsEqual2().
| bool MEDCouplingUMesh::areCellsEqual0 | ( | int | cell1, |
| int | cell2 | ||
| ) | const |
This method is the last step of the MEDCouplingUMesh::zipConnectivityTraducer with policy 0.
References ParaMEDMEM::DataArrayInt::getConstPointer(), getNodalConnectivity(), and getNodalConnectivityIndex().
Referenced by areCellsEqual().
| bool MEDCouplingUMesh::areCellsEqual1 | ( | int | cell1, |
| int | cell2 | ||
| ) | const |
This method is the last step of the MEDCouplingUMesh::zipConnectivityTraducer with policy 1.
Referenced by areCellsEqual().
| bool MEDCouplingUMesh::areCellsEqual2 | ( | int | cell1, |
| int | cell2 | ||
| ) | const |
This method is the last step of the MEDCouplingUMesh::zipConnectivityTraducer with policy 2.
References ParaMEDMEM::DataArrayInt::getConstPointer(), getNodalConnectivity(), and getNodalConnectivityIndex().
Referenced by areCellsEqual().
| bool MEDCouplingUMesh::areCellsFrom2MeshEqual | ( | const MEDCouplingUMesh * | 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(), getNodeIdsOfCell(), and getTypeOfCell().
| void MEDCouplingUMesh::convertToPolyTypes | ( | const std::vector< int > & | cellIdsToConvert | ) |
This method convert this into dynamic types without changing geometry. That is to say if 'this' is a 2D, mesh after the invocation of this method it will contain only polygons. If 'this' is a 3D mesh after the invocation of this method it will contain only polyhedra. If mesh dimension is not in [2,3] an exception is thrown. Of course pay attention that the resulting mesh is slower than previous one. This method is above all designed to test more extensively algorithms able to deal with polygons/polyhedra.
References ParaMEDMEM::DataArrayInt::alloc(), computeTypes(), ParaMEDMEM::DataArrayInt::getConstPointer(), getMeshDimension(), ParaMEDMEM::DataArray::getNbOfElems(), ParaMEDMEM::DataArrayInt::getPointer(), INTERP_KERNEL::NORM_POLYGON, and INTERP_KERNEL::NORM_POLYHED.
Referenced by convertAllToPoly().
| void MEDCouplingUMesh::convertAllToPoly | ( | ) |
This method converts all cells into poly type if possible. This method is purely for userfriendliness. As this method can be costly in Memory, no optimization is done to avoid construction of useless vector.
References convertToPolyTypes(), and getNumberOfCells().
| void MEDCouplingUMesh::unPolyze | ( | ) |
This method is the opposite of ParaMEDMEM::MEDCouplingUMesh::convertToPolyTypes method. The aim is to take all polygons or polyhedrons cell and to try to traduce them into classical cells.
References computeTypes(), getMeshDimension(), getMeshLength(), getNumberOfCells(), ParaMEDMEM::DataArrayInt::getPointer(), INTERP_KERNEL::NORM_ERROR, and ParaMEDMEM::DataArrayInt::reAlloc().
| DataArrayInt * MEDCouplingUMesh::zipCoordsTraducer | ( | ) | throw (INTERP_KERNEL::Exception) [virtual] |
Array returned is the correspondance old to new. The maximum value stored in returned array is the number of nodes of 'this' minus 1 after call of this method. The size of returned array is the number of nodes of the old (previous to the call of this method) number of nodes. -1 values in returned array means that the corresponding old node is no more used.
Implements ParaMEDMEM::MEDCouplingPointSet.
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::DataArrayInt::alloc(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayInt::getConstPointer(), getNumberOfCells(), ParaMEDMEM::MEDCouplingPointSet::getNumberOfNodes(), ParaMEDMEM::DataArrayInt::getPointer(), New(), ParaMEDMEM::DataArrayDouble::renumberAndReduce(), and ParaMEDMEM::MEDCouplingPointSet::setCoords().
| DataArrayInt * MEDCouplingUMesh::zipConnectivityTraducer | ( | int | compType | ) | throw (INTERP_KERNEL::Exception) |
This method could potentially modify 'this'. This method merges cells if there are cells equal in 'this'. The comparison is specified by 'compType'. This method keeps the coordiantes of 'this'.
| compType | input specifying the technique used to compare cells each other. 0 : exactly. A cell is detected to be the same if and only if the connectivity is exactly the same without permutation and types same too. This is the strongest policy. 1 : permutation. cell1 and cell2 are equal if and the connectivity of cell2 can be deduced by those of cell1 by direct permutation and their type equal. 2 : nodal. cell1 and cell2 are equal if and only if cell1 and cell2 have same type and have the same nodes constituting connectivity. This is the laziest policy. |
References ParaMEDMEM::DataArrayInt::alloc(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayInt::getPointer(), and ParaMEDMEM::DataArrayInt::New().
Referenced by FuseUMeshesOnSameCoords().
| bool MEDCouplingUMesh::areCellsIncludedIn | ( | const MEDCouplingUMesh * | other, |
| int | compType, | ||
| DataArrayInt *& | arr | ||
| ) | const throw (INTERP_KERNEL::Exception) |
This method makes the assumption that 'this' and 'other' share the same coords. If not an exception will be thrown ! This method tries to determine if 'other' is fully included in 'this'. To compute that, this method works with connectivity as MEDCouplingUMesh::zipConnectivityTraducer method does. This method is close to MEDCouplingUMesh::checkDeepEquivalOnSameNodesWith or MEDCouplingMesh::checkGeoEquivalWith with policy 20,21,or 22. The main difference is that this method is not expected to throw exception. This method has two outputs :
| compType | is the comparison type. The possible values of this parameter are described in ParaMEDMEM::MEDCouplingUMesh::zipConnectivityTraducer method |
| arr | is an output parameter that returns a newly created instance. This array is of size 'other->getNumberOfCells()'. |
Referenced by ParaMEDMEM::MEDFileUMesh::setGroupsOnSetMesh().
| void MEDCouplingUMesh::getReverseNodalConnectivity | ( | DataArrayInt * | revNodal, |
| DataArrayInt * | revNodalIndx | ||
| ) | const throw (INTERP_KERNEL::Exception) |
WARNING this method do the assumption that connectivity lies on the coordinates set. For speed reasons no check of this will be done.
References ParaMEDMEM::CPP_DEALLOC.
Referenced by getMeasureFieldOnNode().
| MEDCouplingUMesh * MEDCouplingUMesh::buildDescendingConnectivity | ( | DataArrayInt * | desc, |
| DataArrayInt * | descIndx, | ||
| DataArrayInt * | revDesc, | ||
| DataArrayInt * | revDescIndx | ||
| ) | const throw (INTERP_KERNEL::Exception) |
WARNING this method do the assumption that connectivity lies on the coordinates set. For speed reasons no check of this will be done.
References allocateCells(), finishInsertingCells(), insertNextCell(), New(), and ParaMEDMEM::MEDCouplingPointSet::setCoords().
Referenced by buildBoundaryMesh(), buildFacePartOfMySelfNode(), findBoundaryNodes(), and findCellsIdsOnBoundary().
| DataArrayInt * MEDCouplingUMesh::mergeNodes | ( | double | precision, |
| bool & | areNodesMerged, | ||
| int & | newNbOfNodes | ||
| ) | [virtual] |
| areNodesMerged | if at least two nodes have been merged. |
Implements ParaMEDMEM::MEDCouplingPointSet.
References ParaMEDMEM::MEDCouplingPointSet::buildPermArrayForMergeNode(), ParaMEDMEM::DataArrayInt::getConstPointer(), and renumberNodes().
Referenced by MEDLoaderNS::writeFieldTryingToFitExistingMesh().
| DataArrayInt * MEDCouplingUMesh::mergeNodes2 | ( | double | precision, |
| bool & | areNodesMerged, | ||
| int & | newNbOfNodes | ||
| ) | [virtual] |
Idem ParaMEDMEM::MEDCouplingUMesh::mergeNodes method except that the merged nodes are meld into the barycenter of them.
Implements ParaMEDMEM::MEDCouplingPointSet.
References ParaMEDMEM::MEDCouplingPointSet::buildPermArrayForMergeNode(), ParaMEDMEM::DataArrayInt::getConstPointer(), and renumberNodes2().
| void MEDCouplingUMesh::tryToShareSameCoordsPermute | ( | const MEDCouplingPointSet & | other, |
| double | epsilon | ||
| ) | throw (INTERP_KERNEL::Exception) [virtual] |
This method tries to use 'other' coords and use it for 'this'. If no exception was thrown after the call of this method : this->_coords==other->_coords. If an exception is thrown 'this' remains unchanged. Contrary to MEDCouplingUMesh::tryToShareSameCoords method this method makes a deeper analyze of coordinates (and so more expensive) than simple equality. Two nodes one in 'this' and other in 'other' are considered equal if the distance between the two is lower than epsilon.
Implements ParaMEDMEM::MEDCouplingPointSet.
| MEDCouplingPointSet * MEDCouplingUMesh::buildPartOfMySelf | ( | const int * | begin, |
| const int * | end, | ||
| bool | keepCoords | ||
| ) | const [virtual] |
build a sub part of 'this'. This sub part is defined by the cell ids contained in the array in [begin,end).
| begin | begin of array containing the cell ids to keep. |
| end | end of array of cell ids to keep. WARNING end param is not included ! Idem STL standard definitions. |
| keepCoords | that specifies if you want or not to keep coords as this or zip it (see ParaMEDMEM::MEDCouplingUMesh::zipCoords). If true zipCoords is NOT called, if false, zipCoords is called. |
Implements ParaMEDMEM::MEDCouplingPointSet.
References getMeshDimension(), ParaMEDMEM::RefCountObject::incrRef(), and ParaMEDMEM::MEDCouplingPointSet::zipCoords().
Referenced by buildBoundaryMesh(), buildPartOfMySelfNode(), keepSpecifiedCells(), and splitByType().
| MEDCouplingPointSet * MEDCouplingUMesh::buildPartOfMySelfNode | ( | const int * | begin, |
| const int * | end, | ||
| bool | fullyIn | ||
| ) | const [virtual] |
Keeps from 'this' only cells which constituing point id are in the ids specified by ['begin','end'). The return newly allocated mesh will share the same coordinates as 'this'. Parameter 'fullyIn' specifies if a cell that has part of its nodes in ids array is kept or not. If 'fullyIn' is true only cells whose ids are fully contained in ['begin','end') tab will be kept.
Implements ParaMEDMEM::MEDCouplingPointSet.
References buildPartOfMySelf().
Referenced by buildFacePartOfMySelfNode().
| DataArrayInt * MEDCouplingUMesh::getCellIdsLyingOnNodes | ( | const int * | begin, |
| const int * | end, | ||
| bool | fullyIn | ||
| ) | const |
This method is very close too MEDCouplingUMesh::buildPartOfMySelfNode. The difference is that it returns directly ids.
References ParaMEDMEM::DataArrayInt::alloc(), ParaMEDMEM::MEDCouplingMesh::getName(), ParaMEDMEM::DataArrayInt::getPointer(), New(), and ParaMEDMEM::DataArray::setName().
| MEDCouplingPointSet * MEDCouplingUMesh::buildFacePartOfMySelfNode | ( | const int * | begin, |
| const int * | end, | ||
| bool | fullyIn | ||
| ) | const [virtual] |
Contrary to MEDCouplingUMesh::buildPartOfMySelfNode method this method builds a mesh with a meshDimension equal to this->getMeshDimension()-1. The return newly allocated mesh will share the same coordinates as 'this'. Parameter 'fullyIn' specifies if a face that has part of its nodes in ids array is kept or not. If 'fullyIn' is true only faces whose ids are fully contained in ['begin','end') tab will be kept.
Implements ParaMEDMEM::MEDCouplingPointSet.
References buildDescendingConnectivity(), buildPartOfMySelfNode(), ParaMEDMEM::RefCountObject::decrRef(), and New().
| MEDCouplingUMesh * MEDCouplingUMesh::buildUnstructured | ( | ) | const throw (INTERP_KERNEL::Exception) [virtual] |
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::RefCountObject::incrRef().
| void MEDCouplingUMesh::findBoundaryNodes | ( | std::vector< int > & | nodes | ) | const [virtual] |
This methods returns set of nodes lying on the boundary of this.
Implements ParaMEDMEM::MEDCouplingPointSet.
References buildDescendingConnectivity(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayInt::getConstPointer(), getNodalConnectivity(), getNodalConnectivityIndex(), getNumberOfCells(), and New().
| MEDCouplingPointSet * MEDCouplingUMesh::buildBoundaryMesh | ( | bool | keepCoords | ) | const [virtual] |
This method returns a mesh with meshDim=this->getMeshDimension()-1. This returned mesh contains cells that are linked with one and only one cell of this.
| keepCoords | specifies if ParaMEDMEM::MEDCouplingUMesh::zipCoords is called on returned mesh before being returned. If true zipCoords is NOT called, if false, zipCoords is called. |
Implements ParaMEDMEM::MEDCouplingPointSet.
References buildDescendingConnectivity(), buildPartOfMySelf(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayInt::getConstPointer(), getNumberOfCells(), and New().
| DataArrayInt * MEDCouplingUMesh::findCellsIdsOnBoundary | ( | ) | const throw (INTERP_KERNEL::Exception) |
This method returns a newly created DataArrayInt instance containing ids of cells located in boundary. A cell is detected to be on boundary if it contains one or more than one face having only one father. This method makes the assumption that 'this' is fully defined (coords,connectivity). If not an exception will be thrown.
References ParaMEDMEM::DataArrayInt::alloc(), buildDescendingConnectivity(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayInt::deltaShiftIndex(), ParaMEDMEM::DataArrayInt::getConstPointer(), ParaMEDMEM::DataArrayInt::getIdsEqual(), ParaMEDMEM::DataArrayInt::getIJ(), ParaMEDMEM::DataArray::getNumberOfTuples(), ParaMEDMEM::DataArrayInt::getPointer(), New(), and ParaMEDMEM::DataArray::setName().
| void MEDCouplingUMesh::renumberNodes | ( | const int * | newNodeNumbers, |
| int | newNbOfNodes | ||
| ) | [virtual] |
Reimplemented from ParaMEDMEM::MEDCouplingPointSet.
Referenced by mergeNodes().
| void MEDCouplingUMesh::renumberNodes2 | ( | const int * | newNodeNumbers, |
| int | newNbOfNodes | ||
| ) | [virtual] |
Reimplemented from ParaMEDMEM::MEDCouplingPointSet.
Referenced by mergeNodes2().
| void MEDCouplingUMesh::renumberCells | ( | const int * | old2NewBg, |
| bool | check | ||
| ) | throw (INTERP_KERNEL::Exception) [virtual] |
This method renumbers cells of 'this' using the array specified by [old2NewBg;old2NewBg+getNumberOfCells())
Contrary to MEDCouplingPointSet::renumberNodes, this method makes a permutation without any fuse of cell. After the call of this method the number of cells remains the same as before.
If 'check' equals true the method will check that any elements in [old2NewBg;old2NewEnd) is unique ; if not an INTERP_KERNEL::Exception will be thrown. When 'check' equals true [old2NewBg;old2NewEnd) is not expected to be strictly in [0;this->getNumberOfCells()).
If 'check' equals false the method will not check the content of [old2NewBg;old2NewEnd). To avoid any throw of SIGSEGV when 'check' equals false, the elements in [old2NewBg;old2NewEnd) should be unique and should be contained in[0;this->getNumberOfCells()).
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::DataArrayInt::alloc(), ParaMEDMEM::DataArrayInt::CheckAndPreparePermutation(), ParaMEDMEM::DataArray::copyStringInfoFrom(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayInt::getPointer(), and ParaMEDMEM::DataArrayInt::New().
Referenced by ParaMEDMEM::MEDCouplingExtrudedMesh::build3DUnstructuredMesh(), MEDLoader::ReadUMeshFromFamilies(), MEDLoader::ReadUMeshFromFile(), MEDLoader::ReadUMeshFromGroups(), rearrange2ConsecutiveCellTypes(), and sortCellsInMEDFileFrmt().
| void MEDCouplingUMesh::getCellsInBoundingBox | ( | const double * | bbox, |
| double | eps, | ||
| std::vector< int > & | elems | ||
| ) | [virtual] |
Given a boundary box 'bbox' returns elements 'elems' contained in this 'bbox'. Warning 'elems' is incremented during the call so if elems is not empty before call returned elements will be added in 'elems' parameter.
Implements ParaMEDMEM::MEDCouplingPointSet.
References ParaMEDMEM::DataArrayDouble::getConstPointer(), ParaMEDMEM::DataArrayInt::getConstPointer(), ParaMEDMEM::MEDCouplingPointSet::getCoords(), getMeshDimension(), getNodalConnectivity(), getNodalConnectivityIndex(), getNumberOfCells(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), and ParaMEDMEM::MEDCouplingPointSet::intersectsBoundingBox().
| void MEDCouplingUMesh::getCellsInBoundingBox | ( | const INTERP_KERNEL::DirectedBoundingBox & | bbox, |
| double | eps, | ||
| std::vector< int > & | elems | ||
| ) | [virtual] |
Given a boundary box 'bbox' returns elements 'elems' contained in this 'bbox' or touching 'bbox' (within 'eps' distance). Warning 'elems' is incremented during the call so if elems is not empty before call returned elements will be added in 'elems' parameter.
Implements ParaMEDMEM::MEDCouplingPointSet.
References ParaMEDMEM::DataArrayDouble::getConstPointer(), ParaMEDMEM::DataArrayInt::getConstPointer(), ParaMEDMEM::MEDCouplingPointSet::getCoords(), getMeshDimension(), getNodalConnectivity(), getNodalConnectivityIndex(), getNumberOfCells(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), and ParaMEDMEM::MEDCouplingPointSet::intersectsBoundingBox().
| MEDCouplingFieldDouble * MEDCouplingUMesh::getMeasureField | ( | bool | isAbs | ) | const [virtual] |
brief returns the volumes of the cells underlying the field field
For 2D geometries, the returned field contains the areas. For 3D geometries, the returned field contains the volumes.
param field field on which cells the volumes are required return field containing the volumes, area or length depending the meshdimension.
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::DataArrayDouble::alloc(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayInt::getConstPointer(), ParaMEDMEM::DataArrayDouble::getConstPointer(), ParaMEDMEM::MEDCouplingPointSet::getCoords(), getMeshDimension(), ParaMEDMEM::MEDCouplingMesh::getName(), getNodalConnectivity(), getNodalConnectivityIndex(), getNumberOfCells(), ParaMEDMEM::DataArrayDouble::getPointer(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), New(), ParaMEDMEM::ON_CELLS, ParaMEDMEM::MEDCouplingFieldDouble::setArray(), ParaMEDMEM::MEDCouplingField::setMesh(), and ParaMEDMEM::MEDCouplingField::setName().
Referenced by ParaMEDMEM::MEDCouplingExtrudedMesh::getMeasureField(), and getMeasureFieldOnNode().
| DataArrayDouble * MEDCouplingUMesh::getPartMeasureField | ( | bool | isAbs, |
| const int * | begin, | ||
| const int * | end | ||
| ) | const |
This method is equivalent to MEDCouplingUMesh::getMeasureField except that only part defined by [begin,end) is returned ! This method avoids to build explicitely part of this to perform the work.
References ParaMEDMEM::DataArrayDouble::alloc(), ParaMEDMEM::DataArrayInt::getConstPointer(), ParaMEDMEM::DataArrayDouble::getConstPointer(), ParaMEDMEM::MEDCouplingPointSet::getCoords(), getMeshDimension(), ParaMEDMEM::MEDCouplingMesh::getName(), getNodalConnectivity(), getNodalConnectivityIndex(), ParaMEDMEM::DataArrayDouble::getPointer(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), New(), and ParaMEDMEM::DataArray::setName().
| MEDCouplingFieldDouble * MEDCouplingUMesh::getMeasureFieldOnNode | ( | bool | isAbs | ) | const [virtual] |
This methods returns a field on nodes and no time. This method is usefull to check "P1*" conservative interpolators. This field returns the getMeasureField of the dualMesh in P1 sens of 'this'.
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::DataArrayDouble::alloc(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::MEDCouplingFieldDouble::getArray(), ParaMEDMEM::DataArrayInt::getConstPointer(), ParaMEDMEM::DataArrayDouble::getConstPointer(), getMeasureField(), getMeshDimension(), ParaMEDMEM::MEDCouplingMesh::getName(), ParaMEDMEM::MEDCouplingPointSet::getNumberOfNodes(), ParaMEDMEM::DataArrayDouble::getPointer(), getReverseNodalConnectivity(), New(), ParaMEDMEM::ON_NODES, ParaMEDMEM::MEDCouplingFieldDouble::setArray(), and ParaMEDMEM::MEDCouplingField::setMesh().
| MEDCouplingFieldDouble * MEDCouplingUMesh::buildOrthogonalField | ( | ) | const [virtual] |
This methods returns a vector field on cells that represents the orthogonal vector normalized of each 2D cell of this. This method is only callable on mesh with meshdim == 2 and spacedim==2 or 3.
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::DataArrayDouble::alloc(), ParaMEDMEM::RefCountObject::decrRef(), getBarycenterAndOwner(), ParaMEDMEM::DataArrayDouble::getConstPointer(), ParaMEDMEM::DataArrayInt::getConstPointer(), getMeshDimension(), getNumberOfCells(), ParaMEDMEM::DataArrayDouble::getPointer(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), New(), ParaMEDMEM::NO_TIME, ParaMEDMEM::ON_CELLS, ParaMEDMEM::MEDCouplingFieldDouble::setArray(), and ParaMEDMEM::MEDCouplingField::setMesh().
| MEDCouplingFieldDouble * MEDCouplingUMesh::buildPartOrthogonalField | ( | const int * | begin, |
| const int * | end | ||
| ) | const |
This method is equivalent to MEDCouplingUMesh::buildOrthogonalField except that only part defined by [begin,end) is returned ! This method avoids to build explicitely part of this to perform the work.
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::DataArrayDouble::alloc(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayDouble::getConstPointer(), ParaMEDMEM::DataArrayInt::getConstPointer(), getMeshDimension(), getPartBarycenterAndOwner(), ParaMEDMEM::DataArrayDouble::getPointer(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), New(), ParaMEDMEM::NO_TIME, ParaMEDMEM::ON_CELLS, ParaMEDMEM::MEDCouplingFieldDouble::setArray(), and ParaMEDMEM::MEDCouplingField::setMesh().
| MEDCouplingFieldDouble * MEDCouplingUMesh::buildDirectionVectorField | ( | ) | const |
This methods returns a vector newly created field on cells that represents the direction vector of each 1D cell of this. This method is only callable on mesh with meshdim == 1 containing only SEG2.
References ParaMEDMEM::DataArrayDouble::alloc(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayDouble::getConstPointer(), ParaMEDMEM::MEDCouplingPointSet::getCoords(), getMeshDimension(), getNodeIdsOfCell(), getNumberOfCells(), ParaMEDMEM::DataArrayDouble::getPointer(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), New(), ParaMEDMEM::NO_TIME, INTERP_KERNEL::NORM_SEG2, ParaMEDMEM::ON_CELLS, ParaMEDMEM::MEDCouplingFieldDouble::setArray(), and ParaMEDMEM::MEDCouplingField::setMesh().
Referenced by project1D().
| bool MEDCouplingUMesh::isContiguous1D | ( | ) | const throw (INTERP_KERNEL::Exception) |
This method checks that 'this' is a contiguous mesh. The user is expected to call this method on a mesh with meshdim==1. If not an exception will thrown. If this is an empty mesh with no cell an exception will be thrown too. No consideration of coordinate is done by this method. A 1D mesh is said contiguous if : a cell i with nodal connectivity (k,p) the cell i+1 the nodal connectivity should be (p,m) If not false is returned. In case that false is returned a call to ParaMEDMEM::MEDCouplingUMesh::mergeNodes could be usefull.
References ParaMEDMEM::DataArrayInt::getConstPointer(), getMeshDimension(), and getNumberOfCells().
Referenced by buildExtrudedMesh().
| void MEDCouplingUMesh::project1D | ( | const double * | pt, |
| const double * | v, | ||
| double | eps, | ||
| double * | res | ||
| ) | const |
This method is only callable on mesh with meshdim == 1 containing only SEG2 and spaceDim==3. This method projects this on the 3D line defined by (pt,v). This methods first checks that all SEG2 are along v vector.
| pt | reference point of the line |
| v | normalized director vector of the line |
| eps | max precision before throwing an exception |
| res | output of size this->getNumberOfCells |
References buildDirectionVectorField(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::MEDCouplingFieldDouble::getArray(), ParaMEDMEM::DataArrayDouble::getConstPointer(), ParaMEDMEM::MEDCouplingPointSet::getCoords(), getMeshDimension(), getNumberOfCells(), ParaMEDMEM::MEDCouplingPointSet::getNumberOfNodes(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), and INTERP_KERNEL::NORM_SEG2.
| int MEDCouplingUMesh::getCellContainingPoint | ( | const double * | pos, |
| double | eps | ||
| ) | const [virtual] |
Returns a cell if any that contains the point located on 'pos' with precison eps. If 'pos' is outside 'this' -1 is returned. If several cells contain this point the cell with the smallest id is returned. Warning this method is good if the caller intends to evaluate only one point. But if more than one point is requested on 'this' it is better to use MEDCouplingUMesh::getCellsContainingPoints method because in this case, the acceleration structure will be computed only once.
Implements ParaMEDMEM::MEDCouplingMesh.
References getCellsContainingPoint().
| void MEDCouplingUMesh::getCellsContainingPoint | ( | const double * | pos, |
| double | eps, | ||
| std::vector< int > & | elts | ||
| ) | const [virtual] |
Returns all cellIds in 'elts' of point 'pos' with eps accuracy. Warning this method is good if the caller intends to evaluate only one point. But if more than one point is requested on 'this' it is better to use MEDCouplingUMesh::getCellsContainingPoints method because in this case, the acceleration structure will be computed only once.
Reimplemented from ParaMEDMEM::MEDCouplingMesh.
References getCellsContainingPoints().
Referenced by getCellContainingPoint().
| void MEDCouplingUMesh::getCellsContainingPoints | ( | const double * | pos, |
| int | nbOfPoints, | ||
| double | eps, | ||
| std::vector< int > & | elts, | ||
| std::vector< int > & | eltsIndex | ||
| ) | const [virtual] |
This method is an extension of MEDCouplingUMesh::getCellContainingPoint and MEDCouplingUMesh::getCellsContainingPoint. This method performs 'nbOfPoints' time the getCellsContainingPoint request. This method is recommended rather than the 2 others in case of multi points searching. This method returns 2 arrays 'elts' and 'eltsIndex'. 'eltsIndex' is of size 'nbOfPoints+1' and 'elts' is of size 'eltsIndex[nbOfPoints-1]'. For point j in [0,nbOfPoints), (eltsIndex[j+1]-eltsIndex[j]) cells contain this point. These cells are : [elts.begin()+eltsIndex[j],elts.begin():eltsIndex[j+1]).
| pos | input parameter that points to an array of size 'getSpaceDim()*nbOfPoints' points stored in full interlace mode : X0,Y0,Z0,X1,Y1,Z1... |
Reimplemented from ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::DataArrayDouble::getConstPointer(), getMeshDimension(), and ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension().
Referenced by getCellsContainingPoint().
| void MEDCouplingUMesh::checkButterflyCells | ( | std::vector< int > & | cells | ) | const |
This method is only available for a mesh with meshDim==2 and spaceDim==2||spaceDim==3. This method returns a vector 'cells' where all detected butterfly cells have been added to cells. A 2D cell is considered to be butterfly if it exists at least one pair of distinct edges of it that intersect each other anywhere excepted their extremities. An INTERP_KERNEL::NORM_NORI3 could not be butterfly.
References ParaMEDMEM::DataArrayInt::getConstPointer(), getMeshDimension(), getNumberOfCells(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), ParaMEDMEM::MEDCouplingPointSet::isButterfly2DCell(), and ParaMEDMEM::MEDCouplingPointSet::project2DCellOnXY().
| void MEDCouplingUMesh::getBoundingBoxForBBTree | ( | std::vector< double > & | bbox | ) | const |
This method aggregate the bbox of each cell and put it into bbox parameter.
| bbox | out parameter of size 2*spacedim*nbOfcells. |
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::DataArrayInt::getConstPointer(), ParaMEDMEM::DataArrayDouble::getConstPointer(), getNumberOfCells(), and ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension().
| MEDCouplingUMesh * MEDCouplingUMesh::buildExtrudedMesh | ( | const MEDCouplingUMesh * | mesh1D, |
| int | policy | ||
| ) |
This method is NOT const because it can modify 'this'. 'this' is expected to be an unstructured mesh with meshDim==2 and spaceDim==3. If not an exception will be thrown.
| mesh1D | is an unstructured mesh with MeshDim==1 and spaceDim==3. If not an exception will be thrown. |
| policy | specifies the type of extrusion chosen. 0 for translation (most simple), 1 for translation and rotation around point of 'mesh1D'. |
References ParaMEDMEM::RefCountObject::decrRef(), getMeshDimension(), ParaMEDMEM::MEDCouplingPointSet::getNumberOfNodes(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), isContiguous1D(), isFullyQuadratic(), isPresenceOfQuadratic(), ParaMEDMEM::MEDCouplingPointSet::setCoords(), updateTime(), and ParaMEDMEM::MEDCouplingPointSet::zipCoords().
Referenced by ParaMEDMEM::MEDCouplingExtrudedMesh::build3DUnstructuredMesh().
| bool MEDCouplingUMesh::isFullyQuadratic | ( | ) | const |
This method returns if 'this' is constituted by only quadratic cells.
References getNumberOfCells(), and getTypeOfCell().
Referenced by buildExtrudedMesh().
| bool MEDCouplingUMesh::isPresenceOfQuadratic | ( | ) | const |
This method returns if there is at least one quadratic cell.
References getNumberOfCells(), and getTypeOfCell().
Referenced by buildExtrudedMesh().
| void MEDCouplingUMesh::convertQuadraticCellsToLinear | ( | ) | throw (INTERP_KERNEL::Exception) |
This method convert quadratic cells to linear cells if any was found. If no such cells exists 'this' remains unchanged.
References ParaMEDMEM::DataArrayInt::getConstPointer(), getMeshLength(), getNumberOfCells(), getTypeOfCell(), New(), and setConnectivity().
| DataArrayInt * MEDCouplingUMesh::simplexize | ( | int | policy | ) | throw (INTERP_KERNEL::Exception) [virtual] |
This methods modify this by converting each cells into simplex cell, that is too say triangle for meshdim==2 or tetra for meshdim==3. This cut into simplex is performed following the parameter 'policy'. This method so typically increases the number of cells of this. This method returns new2old array that specifies a each cell of 'this' after the call what was its id it comes.
The semantic of 'policy' parameter :
Implements ParaMEDMEM::MEDCouplingMesh.
| bool MEDCouplingUMesh::areOnlySimplexCells | ( | ) | const throw (INTERP_KERNEL::Exception) |
References ParaMEDMEM::DataArrayInt::getConstPointer(), getMeshDimension(), and getNumberOfCells().
| void MEDCouplingUMesh::convertDegeneratedCells | ( | ) | throw (INTERP_KERNEL::Exception) |
This method converts all degenerated cells to simpler cells. For example a NORM_QUAD4 cell consituted from 2 same node id in its nodal connectivity will be transform to a NORM_TRI3 cell. This method works only on linear cells. This method works on nodes ids, that is to say a call to ParaMEDMEM::MEDCouplingUMesh::mergeNodes method could be usefull before calling this method in case of presence of several pair of nodes located on same position. This method throws an exception if 'this' is not fully defined (connectivity). This method throws an exception too if a "too" degenerated cell is detected. For example a NORM_TRI3 with 3 times the same node id.
References computeTypes(), getMeshDimension(), getMeshLength(), getNumberOfCells(), ParaMEDMEM::DataArrayInt::getPointer(), and ParaMEDMEM::DataArrayInt::reAlloc().
| void MEDCouplingUMesh::are2DCellsNotCorrectlyOriented | ( | const double * | vec, |
| bool | polyOnly, | ||
| std::vector< int > & | cells | ||
| ) | const throw (INTERP_KERNEL::Exception) |
This method checks that all or only polygons (depending 'polyOnly' parameter) 2D cells are correctly oriented relative to 'vec' vector. The 'vec' vector has to have a non nul norm. If not 'cells' parameter will be appended with cellIds of incorrect cells.
| when | 'this' is not a mesh with meshdim==2 and spacedim==3 |
References INTERP_KERNEL::NORM_POLYGON.
| void MEDCouplingUMesh::orientCorrectly2DCells | ( | const double * | vec, |
| bool | polyOnly | ||
| ) | throw (INTERP_KERNEL::Exception) |
This method orient correctly (if needed) all or only polygons (depending 'polyOnly' parameter) 2D cells are correctly oriented relative to 'vec' vector. The 'vec' vector has to have a non nul norm.
| when | 'this' is not a mesh with meshdim==2 and spacedim==3 |
References INTERP_KERNEL::NORM_POLYGON.
| void MEDCouplingUMesh::arePolyhedronsNotCorrectlyOriented | ( | std::vector< int > & | cells | ) | const throw (INTERP_KERNEL::Exception) |
This method checks that all polyhedrons cells have correctly oriented faces. If not, 'cells' parameter will be appended with cellIds of incorrect cells.
| when | 'this' is not a mesh with meshdim==3 and spacedim==3 |
References INTERP_KERNEL::NORM_POLYHED.
| void MEDCouplingUMesh::orientCorrectlyPolyhedrons | ( | ) | throw (INTERP_KERNEL::Exception) |
This method tries to orient correctly polhedrons cells.
| when | 'this' is not a mesh with meshdim==3 and spacedim==3. An exception is also thrown when the attempt of reparation fails. |
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::TimeLabel::declareAsNew(), ParaMEDMEM::DataArrayDouble::getConstPointer(), ParaMEDMEM::DataArrayInt::getConstPointer(), getMeshDimension(), getNumberOfCells(), ParaMEDMEM::DataArrayInt::getPointer(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), IsPolyhedronWellOriented(), INTERP_KERNEL::NORM_POLYHED, TryToCorrectPolyhedronOrientation(), and updateTime().
| void MEDCouplingUMesh::getFastAveragePlaneOfThis | ( | double * | vec, |
| double * | pos | ||
| ) | const throw (INTERP_KERNEL::Exception) |
This method has a sense for meshes with spaceDim==3 and meshDim==2. If it is not the case an exception will be thrown. This method is fast because the first cell of 'this' is used to compute the plane.
| vec | output of size at least 3 used to store the normal vector (with norm equal to Area ) of searched plane. |
| pos | output of size at least 3 used to store a point owned of searched plane. |
| MEDCouplingFieldDouble * MEDCouplingUMesh::getEdgeRatioField | ( | ) | const throw (INTERP_KERNEL::Exception) |
The returned newly created field has to be managed by the caller. This method returns a field on cell with no time lying on 'this'. The meshdimension and spacedimension of this are expected to be both in [2,3]. If not an exception will be thrown. This method for the moment only deals with NORM_TRI3, NORM_QUAD4 and NORM_TETRA4 geometric types. If a cell has an another type an exception will be thrown.
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::DataArrayDouble::alloc(), checkCoherency(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayDouble::getConstPointer(), ParaMEDMEM::DataArrayInt::getConstPointer(), getMeshDimension(), getNumberOfCells(), ParaMEDMEM::DataArrayDouble::getPointer(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), New(), ParaMEDMEM::NO_TIME, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_TETRA4, INTERP_KERNEL::NORM_TRI3, and ParaMEDMEM::ON_CELLS.
| MEDCouplingFieldDouble * MEDCouplingUMesh::getAspectRatioField | ( | ) | const throw (INTERP_KERNEL::Exception) |
The returned newly created field has to be managed by the caller. This method returns a field on cell with no time lying on 'this'. The meshdimension and spacedimension of this are expected to be both in [2,3]. If not an exception will be thrown. This method for the moment only deals with NORM_TRI3, NORM_QUAD4 and NORM_TETRA4 geometric types. If a cell has an another type an exception will be thrown.
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::DataArrayDouble::alloc(), checkCoherency(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayDouble::getConstPointer(), ParaMEDMEM::DataArrayInt::getConstPointer(), getMeshDimension(), getNumberOfCells(), ParaMEDMEM::DataArrayDouble::getPointer(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), New(), ParaMEDMEM::NO_TIME, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_TETRA4, INTERP_KERNEL::NORM_TRI3, and ParaMEDMEM::ON_CELLS.
| MEDCouplingFieldDouble * MEDCouplingUMesh::getWarpField | ( | ) | const throw (INTERP_KERNEL::Exception) |
The returned newly created field has to be managed by the caller. This method returns a field on cell with no time lying on 'this'. The meshdimension must be equal to 2 and the spacedimension must be equal to 3. If not an exception will be thrown. This method for the moment only deals with NORM_QUAD4 geometric type. If a cell has an another type an exception will be thrown.
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::DataArrayDouble::alloc(), checkCoherency(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayDouble::getConstPointer(), ParaMEDMEM::DataArrayInt::getConstPointer(), getMeshDimension(), getNumberOfCells(), ParaMEDMEM::DataArrayDouble::getPointer(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), New(), ParaMEDMEM::NO_TIME, INTERP_KERNEL::NORM_QUAD4, and ParaMEDMEM::ON_CELLS.
| MEDCouplingFieldDouble * MEDCouplingUMesh::getSkewField | ( | ) | const throw (INTERP_KERNEL::Exception) |
The returned newly created field has to be managed by the caller. This method returns a field on cell with no time lying on 'this'. The meshdimension must be equal to 2 and the spacedimension must be equal to 3. If not an exception will be thrown. This method for the moment only deals with NORM_QUAD4 geometric type. If a cell has an another type an exception will be thrown.
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::DataArrayDouble::alloc(), checkCoherency(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayDouble::getConstPointer(), ParaMEDMEM::DataArrayInt::getConstPointer(), getMeshDimension(), getNumberOfCells(), ParaMEDMEM::DataArrayDouble::getPointer(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), New(), ParaMEDMEM::NO_TIME, INTERP_KERNEL::NORM_QUAD4, and ParaMEDMEM::ON_CELLS.
| DataArrayInt * MEDCouplingUMesh::checkTypeConsistencyAndContig | ( | const std::vector< int > & | code, |
| const std::vector< const DataArrayInt * > & | idsPerType | ||
| ) | const throw (INTERP_KERNEL::Exception) [virtual] |
This method is used to check that this has contiguous cell type in same order than described in 'code'. Format of 'code' is the following. 'code' should be of size 3*n and non empty. If not an exception is thrown. foreach k in [0,n) on 3*k pos represent the geometric type and 3*k+1 number of elements of type 3*k. 3*k+2 refers if different from -1 the pos in 'idsPerType' to get the corresponding array. If 2 or more same geometric type is in 'code' and exception is thrown too.
This method fistly checks If it exists k so that 3*k geometric type is not in geometric types of this an exception will be thrown. If it exists k so that 3*k geometric type exists but the number of consecutive cell types does not match, an exception is thrown too.
If all geometric types in 'code' are exactly those in 'this' null pointer is returned. If it exists a geometric type in 'this' not in 'code' no exception is thrown and a DataArrayInt instance is returned that the user has the responsability to deallocate.
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::DataArrayInt::alloc(), ParaMEDMEM::DataArrayInt::getPointer(), and ParaMEDMEM::DataArrayInt::New().
| void MEDCouplingUMesh::splitProfilePerType | ( | const DataArrayInt * | profile, |
| std::vector< int > & | code, | ||
| std::vector< DataArrayInt * > & | globIdsPerType, | ||
| std::vector< DataArrayInt * > & | idsPerType | ||
| ) | const throw (INTERP_KERNEL::Exception) [virtual] |
This method makes the hypothesis that 'this' is sorted by type. If not an exception will be thrown. This method is the opposite of MEDCouplingUMesh::checkTypeConsistencyAndContig method. Given a list of cells in 'profile' it returns a list of profiles sorted by geo type. This method has 1 input 'profile' and 2 outputs 'code' and 'idsPerType'.
| if | 'profile' has not exactly one component. It throws too, if 'profile' contains some values not in [0,getNumberOfCells()) or if 'this' is not fully defined |
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::DataArrayInt::getIdsEqual(), ParaMEDMEM::DataArray::getNumberOfTuples(), ParaMEDMEM::RefCountObject::incrRef(), and ParaMEDMEM::DataArrayInt::splitByValueRange().
| MEDCouplingUMesh * MEDCouplingUMesh::emulateMEDMEMBDC | ( | const MEDCouplingUMesh * | nM1LevMesh, |
| DataArrayInt * | desc, | ||
| DataArrayInt * | descIndx, | ||
| DataArrayInt *& | revDesc, | ||
| DataArrayInt *& | revDescIndx, | ||
| DataArrayInt *& | nM1LevMeshIds, | ||
| DataArrayInt *& | meshnM1Old2New | ||
| ) | const throw (INTERP_KERNEL::Exception) |
This method is here too emulate the MEDMEM behaviour on BDC (buildDescendingConnectivity). Hoping this method becomes deprecated very soon. This method make the assumption that 'this' and 'nM1LevMesh' mesh lyies on same coords (same pointer) as MED and MEDMEM does. The following equality should be verified 'nM1LevMesh->getMeshDimension()==this->getMeshDimension()-1' This method returns 5+2 elements. 'desc', 'descIndx', 'revDesc', 'revDescIndx' and 'meshnM1' behaves exactly as ParaMEDMEM::MEDCouplingUMesh::buildDescendingConnectivity except the content as described after. The returned array specifies the n-1 mesh reordered by type as MEDMEM does. 'nM1LevMeshIds' contains the ids in returned 'meshnM1'. Finally 'meshnM1Old2New' contains numbering old2new that is to say the cell #k in coarse 'nM1LevMesh' will have the number ret[k] in returned mesh 'nM1LevMesh' MEDMEM reordered.
References ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayInt::getMaxValue(), ParaMEDMEM::RefCountObject::incrRef(), New(), and ParaMEDMEM::DataArrayInt::New().
| DataArrayInt * MEDCouplingUMesh::sortCellsInMEDFileFrmt | ( | ) | throw (INTERP_KERNEL::Exception) |
This method sorts cell in this so that cells are sorted by cell type specified by MEDMEM and so for MED file. It avoids to deal with renum in MEDLoader so it is usefull for MED file R/W with multi types. This method returns a newly allocated array old2New. This method expects that connectivity of this is set. If not an exception will be thrown. Coordinates are not taken into account.
References getRenumArrForConsecutiveCellTypesSpec(), INTERP_KERNEL::NORM_HEXA20, INTERP_KERNEL::NORM_HEXA8, INTERP_KERNEL::NORM_HEXGP12, INTERP_KERNEL::NORM_PENTA15, INTERP_KERNEL::NORM_PENTA6, INTERP_KERNEL::NORM_POINT1, INTERP_KERNEL::NORM_POLYGON, INTERP_KERNEL::NORM_POLYHED, INTERP_KERNEL::NORM_PYRA13, INTERP_KERNEL::NORM_PYRA5, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD8, INTERP_KERNEL::NORM_SEG2, INTERP_KERNEL::NORM_SEG3, INTERP_KERNEL::NORM_TETRA10, INTERP_KERNEL::NORM_TETRA4, INTERP_KERNEL::NORM_TRI3, INTERP_KERNEL::NORM_TRI6, and renumberCells().
| bool MEDCouplingUMesh::checkConsecutiveCellTypes | ( | ) | const |
This methods checks that cells are sorted by their types. This method makes asumption (no check) that connectivity is correctly set before calling.
References ParaMEDMEM::DataArrayInt::getConstPointer(), and getNumberOfCells().
| bool MEDCouplingUMesh::checkConsecutiveCellTypesAndOrder | ( | const INTERP_KERNEL::NormalizedCellType * | orderBg, |
| const INTERP_KERNEL::NormalizedCellType * | orderEnd | ||
| ) | const |
This method performs the same job as checkConsecutiveCellTypes except that the order of types sequence is analyzed to check that the order is specified in array defined by [orderBg,orderEnd).
References ParaMEDMEM::DataArrayInt::getConstPointer(), and getNumberOfCells().
Referenced by MEDLoaderNS::appendFieldDirectly(), and MEDLoaderNS::prepareCellFieldDoubleForWriting().
| DataArrayInt * MEDCouplingUMesh::getLevArrPerCellTypes | ( | const INTERP_KERNEL::NormalizedCellType * | orderBg, |
| const INTERP_KERNEL::NormalizedCellType * | orderEnd, | ||
| DataArrayInt *& | nbPerType | ||
| ) | const throw (INTERP_KERNEL::Exception) |
This method returns 2 newly allocated DataArrayInt instances. The first is an array of size 'this->getNumberOfCells()' with one component, that tells for each cell the pos of its type in the array on type given in input parameter. The 2nd output parameter is an array with the same number of tuples than input type array and with one component. This 2nd output array gives type by type the number of occurence of type in 'this'.
References ParaMEDMEM::DataArrayDouble::getPointer(), and ParaMEDMEM::DataArrayInt::New().
| DataArrayInt * MEDCouplingUMesh::getRenumArrForConsecutiveCellTypesSpec | ( | const INTERP_KERNEL::NormalizedCellType * | orderBg, |
| const INTERP_KERNEL::NormalizedCellType * | orderEnd | ||
| ) | const throw (INTERP_KERNEL::Exception) |
This method is similar to method MEDCouplingUMesh::rearrange2ConsecutiveCellTypes except that the type order is specfied by [orderBg,orderEnd) (as MEDCouplingUMesh::checkConsecutiveCellTypesAndOrder method) and that this method is const and performs NO permutation in 'this'. This method returns an array of size getNumberOfCells() that gives a renumber array old2New that can be used as input of MEDCouplingMesh::renumberCells. The mesh after this call to MEDCouplingMesh::renumberCells will pass the test of MEDCouplingUMesh::checkConsecutiveCellTypesAndOrder with the same inputs. The returned array minimizes the permutations that is to say the order of cells inside same geometric type remains the same.
References ParaMEDMEM::RefCountObject::decrRef().
Referenced by MEDLoaderNS::appendFieldDirectly(), sortCellsInMEDFileFrmt(), and MEDLoaderNS::writeFieldAndMeshDirectly().
| DataArrayInt * MEDCouplingUMesh::rearrange2ConsecutiveCellTypes | ( | ) |
This method reorganize the cells of 'this' so that the cells with same geometric types are put together. If checkConsecutiveCellTypes() returns true, this method do not change anything of this. The number of cells remains unchanged after the call of this method.
References ParaMEDMEM::DataArrayInt::alloc(), computeTypes(), ParaMEDMEM::DataArrayInt::getConstPointer(), getNumberOfCells(), ParaMEDMEM::DataArrayInt::getPointer(), New(), and renumberCells().
| std::vector< MEDCouplingUMesh * > MEDCouplingUMesh::splitByType | ( | ) | const |
This method splits 'this' into as mush as untructured meshes that consecutive set of same type cells. So this method has typically a sense if MEDCouplingUMesh::checkConsecutiveCellTypes has a sense. This method makes asumption that connectivity is correctly set before calling.
References buildPartOfMySelf(), ParaMEDMEM::DataArrayInt::getConstPointer(), and getNumberOfCells().
| DataArrayInt * MEDCouplingUMesh::keepCellIdsByType | ( | INTERP_KERNEL::NormalizedCellType | type, |
| const int * | begin, | ||
| const int * | end | ||
| ) | const throw (INTERP_KERNEL::Exception) |
This method returns a newly created DataArrayInt instance. This method retrieves cell ids in [begin,end) that have the type 'type'.
References ParaMEDMEM::DataArrayInt::alloc(), ParaMEDMEM::DataArrayInt::getPointer(), and ParaMEDMEM::DataArrayInt::New().
| DataArrayInt * MEDCouplingUMesh::convertCellArrayPerGeoType | ( | const DataArrayInt * | da | ) | const throw (INTERP_KERNEL::Exception) |
This method makes the assumption that da->getNumberOfTuples()<this->getNumberOfCells(). This method makes the assumption that ids contained in 'da' are in [0:getNumberOfCells())
References ParaMEDMEM::DataArrayInt::alloc(), ParaMEDMEM::DataArray::copyStringInfoFrom(), ParaMEDMEM::DataArrayInt::getPointer(), and ParaMEDMEM::DataArrayInt::New().
| MEDCouplingUMesh * MEDCouplingUMesh::keepSpecifiedCells | ( | INTERP_KERNEL::NormalizedCellType | type, |
| const int * | idsPerGeoTypeBg, | ||
| const int * | idsPerGeoTypeEnd | ||
| ) | const |
This method reduced number of cells of this by keeping cells whose type is different from 'type' and if type=='type' cells whose ids is in 'idsPerGeoType' array. This method conserves coords and name of mesh.
References buildPartOfMySelf(), ParaMEDMEM::RefCountObject::decrRef(), getNumberOfCells(), and getTypeOfCell().
Referenced by MEDLoaderNS::readFieldDoubleLev2().
| MEDCouplingMesh * MEDCouplingUMesh::mergeMyselfWith | ( | const MEDCouplingMesh * | other | ) | const [virtual] |
Returns a newly created mesh (with ref count ==1) that contains merge of 'this' and 'other'.
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::MEDCouplingMesh::getType(), MergeUMeshes(), and ParaMEDMEM::UNSTRUCTURED.
| DataArrayDouble * MEDCouplingUMesh::getBarycenterAndOwner | ( | ) | const [virtual] |
Returns an array with this->getNumberOfCells() tuples and this->getSpaceDimension() dimension. The false barycenter is computed that is to say barycenter of a cell is computed using average on each components of coordinates of the cell.
Implements ParaMEDMEM::MEDCouplingMesh.
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::DataArrayDouble::alloc(), ParaMEDMEM::DataArray::copyStringInfoFrom(), ParaMEDMEM::DataArrayDouble::getConstPointer(), ParaMEDMEM::DataArrayInt::getConstPointer(), ParaMEDMEM::MEDCouplingPointSet::getCoords(), getNumberOfCells(), ParaMEDMEM::DataArrayDouble::getPointer(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), and New().
Referenced by buildOrthogonalField().
| DataArrayDouble * MEDCouplingUMesh::getPartBarycenterAndOwner | ( | const int * | begin, |
| const int * | end | ||
| ) | const |
This method is similar to MEDCouplingUMesh::getBarycenterAndOwner except that it works on subPart of 'this' without building explicitely it. The input part is defined by an array [begin,end). All ids contained in this array should be less than this->getNumberOfCells(). No check of that will be done !
References ParaMEDMEM::MEDCouplingPointSet::_coords, ParaMEDMEM::DataArrayDouble::alloc(), ParaMEDMEM::DataArrayDouble::getConstPointer(), ParaMEDMEM::DataArrayInt::getConstPointer(), ParaMEDMEM::DataArrayDouble::getPointer(), ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension(), and New().
Referenced by buildPartOrthogonalField().
| MEDCouplingUMesh * MEDCouplingUMesh::Build0DMeshFromCoords | ( | DataArrayDouble * | da | ) | throw (INTERP_KERNEL::Exception) [static] |
This method expects as input a DataArrayDouble non nul instance 'da' that should be allocated. If not an exception is thrown.
References ParaMEDMEM::DataArrayInt::New(), New(), INTERP_KERNEL::NORM_POINT1, and ParaMEDMEM::MEDCouplingPointSet::setCoords().
| MEDCouplingUMesh * MEDCouplingUMesh::MergeUMeshes | ( | const MEDCouplingUMesh * | mesh1, |
| const MEDCouplingUMesh * | mesh2 | ||
| ) | throw (INTERP_KERNEL::Exception) [static] |
Returns a newly created mesh (with ref count ==1) that contains merge of 'mesh1' and 'other'. The coords of 'mesh2' are added at the end of coords of 'mesh1'.
Referenced by ParaMEDMEM::MEDCouplingFieldDouble::MergeFields(), and mergeMyselfWith().
| MEDCouplingUMesh * MEDCouplingUMesh::MergeUMeshes | ( | std::vector< const MEDCouplingUMesh * > & | a | ) | throw (INTERP_KERNEL::Exception) [static] |
| MEDCouplingUMesh * MEDCouplingUMesh::MergeUMeshesOnSameCoords | ( | const MEDCouplingUMesh * | mesh1, |
| const MEDCouplingUMesh * | mesh2 | ||
| ) | throw (INTERP_KERNEL::Exception) [static] |
Idem MergeUMeshes except that 'meshes' are expected to lyie on the same coords and 'meshes' have the same meshdim. 'meshes' must be a non empty vector.
Referenced by FuseUMeshesOnSameCoords().
| MEDCouplingUMesh * MEDCouplingUMesh::MergeUMeshesOnSameCoords | ( | const std::vector< const MEDCouplingUMesh * > & | meshes | ) | [static] |
Idem MergeUMeshes except that 'meshes' are expected to lyie on the same coords and 'meshes' have the same meshdim. 'meshes' must be a non empty vector.
References ParaMEDMEM::DataArrayInt::alloc(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayInt::getPointer(), New(), setConnectivity(), ParaMEDMEM::MEDCouplingPointSet::setCoords(), setMeshDimension(), and ParaMEDMEM::MEDCouplingMesh::setName().
| MEDCouplingUMesh * MEDCouplingUMesh::FuseUMeshesOnSameCoords | ( | const std::vector< const MEDCouplingUMesh * > & | meshes, |
| int | compType, | ||
| std::vector< DataArrayInt * > & | corr | ||
| ) | [static] |
This method fuses meshes 'meshes' and returns the fused mesh and the correspondances arrays for each mesh in 'meshes' in returned mesh. If a same cell is detected in several meshes in 'meshes', this cell will appear only once in returned mesh (see ParaMEDMEM::MEDCouplingUMesh::zipConnectivityTraducer for more details)
| meshes | input non empty vector containing meshes having same coordiantes array and same mesh dimension. |
| compType | see MEDCouplingUMesh::zipConnectivityTraducer |
| corr | output vector with same size as 'meshes' parameter. corr[i] is the correspondance array of mesh meshes[i] in returned mesh. The arrays contained in 'corr' parameter are returned with refcounter set to one. To avoid memory leaks the caller have to deal with each instances of DataArrayInt contained in 'corr' parameter. |
| if | meshes is a empty vector or meshes are not lying on same coordinates or meshes not have the same dimension. |
References ParaMEDMEM::DataArrayInt::alloc(), ParaMEDMEM::RefCountObject::decrRef(), ParaMEDMEM::DataArrayInt::getConstPointer(), ParaMEDMEM::MEDCouplingMesh::getName(), ParaMEDMEM::DataArrayInt::getPointer(), MergeUMeshesOnSameCoords(), New(), ParaMEDMEM::DataArray::setName(), and zipConnectivityTraducer().
Referenced by ParaMEDMEM::MEDFileUMesh::setGroupsFromScratch(), and MEDLoaderNS::writeUMeshesPartitionDirectly().
| bool MEDCouplingUMesh::IsPolygonWellOriented | ( | const double * | vec, |
| const int * | begin, | ||
| const int * | end, | ||
| const double * | coords | ||
| ) | [static] |
This static operates only for coords in 3D. The polygon is specfied by its connectivity nodes in [begin,end).
| bool MEDCouplingUMesh::IsPolyhedronWellOriented | ( | const int * | begin, |
| const int * | end, | ||
| const double * | coords | ||
| ) | [static] |
The polyhedron is specfied by its connectivity nodes in [begin,end).
References EPS_FOR_POLYH_ORIENTATION.
Referenced by orientCorrectlyPolyhedrons().
| void MEDCouplingUMesh::TryToCorrectPolyhedronOrientation | ( | int * | begin, |
| int * | end, | ||
| const double * | coords | ||
| ) | throw (INTERP_KERNEL::Exception) [static] |
This method tries to obtain a well oriented polyhedron. If the algorithm fails, an exception will be thrown.
Referenced by orientCorrectlyPolyhedrons().
double MEDCouplingUMesh::EPS_FOR_POLYH_ORIENTATION = 1.e-14 [static] |
Referenced by IsPolyhedronWellOriented().