Version: 6.3.1
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes

ParaMEDMEM.MEDCouplingUMesh Class Reference

#include <MEDCouplingUMesh.hxx>

Inheritance diagram for ParaMEDMEM.MEDCouplingUMesh:
Inheritance graph

Public Member Functions

MEDCouplingMeshdeepCpy () const
MEDCouplingUMeshclone (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 DataArrayIntgetNodalConnectivity () const
const DataArrayIntgetNodalConnectivityIndex () const
DataArrayIntgetNodalConnectivity ()
DataArrayIntgetNodalConnectivityIndex ()
INTERP_KERNEL::NormalizedCellType getTypeOfCell (int cellId) const
int getNumberOfCellsWithType (INTERP_KERNEL::NormalizedCellType type) const
void getNodeIdsOfCell (int cellId, std::vector< int > &conn) const
DataArrayIntgetCellIdsFullyIncludedInNodeIds (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
 size of returned tinyInfo must be always the same.
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 ()
DataArrayIntzipCoordsTraducer () throw (INTERP_KERNEL::Exception)
DataArrayIntzipConnectivityTraducer (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)
MEDCouplingUMeshbuildDescendingConnectivity (DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const throw (INTERP_KERNEL::Exception)
DataArrayIntmergeNodes (double precision, bool &areNodesMerged, int &newNbOfNodes)
DataArrayIntmergeNodes2 (double precision, bool &areNodesMerged, int &newNbOfNodes)
void tryToShareSameCoordsPermute (const MEDCouplingPointSet &other, double epsilon) throw (INTERP_KERNEL::Exception)
MEDCouplingPointSetbuildPartOfMySelf (const int *begin, const int *end, bool keepCoords) const
MEDCouplingPointSetbuildPartOfMySelfNode (const int *begin, const int *end, bool fullyIn) const
DataArrayIntgetCellIdsLyingOnNodes (const int *begin, const int *end, bool fullyIn) const
MEDCouplingPointSetbuildFacePartOfMySelfNode (const int *begin, const int *end, bool fullyIn) const
MEDCouplingUMeshbuildUnstructured () const throw (INTERP_KERNEL::Exception)
void findBoundaryNodes (std::vector< int > &nodes) const
MEDCouplingPointSetbuildBoundaryMesh (bool keepCoords) const
DataArrayIntfindCellsIdsOnBoundary () 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)
MEDCouplingFieldDoublegetMeasureField (bool isAbs) const
DataArrayDoublegetPartMeasureField (bool isAbs, const int *begin, const int *end) const
MEDCouplingFieldDoublegetMeasureFieldOnNode (bool isAbs) const
MEDCouplingFieldDoublebuildOrthogonalField () const
MEDCouplingFieldDoublebuildPartOrthogonalField (const int *begin, const int *end) const
MEDCouplingFieldDoublebuildDirectionVectorField () 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
MEDCouplingUMeshbuildExtrudedMesh (const MEDCouplingUMesh *mesh1D, int policy)
bool isFullyQuadratic () const
bool isPresenceOfQuadratic () const
void convertQuadraticCellsToLinear () throw (INTERP_KERNEL::Exception)
DataArrayIntsimplexize (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)
MEDCouplingFieldDoublegetEdgeRatioField () const throw (INTERP_KERNEL::Exception)
MEDCouplingFieldDoublegetAspectRatioField () const throw (INTERP_KERNEL::Exception)
MEDCouplingFieldDoublegetWarpField () const throw (INTERP_KERNEL::Exception)
MEDCouplingFieldDoublegetSkewField () const throw (INTERP_KERNEL::Exception)
DataArrayIntcheckTypeConsistencyAndContig (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)
MEDCouplingUMeshemulateMEDMEMBDC (const MEDCouplingUMesh *nM1LevMesh, DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *&revDesc, DataArrayInt *&revDescIndx, DataArrayInt *&nM1LevMeshIds, DataArrayInt *&meshnM1Old2New) const throw (INTERP_KERNEL::Exception)
DataArrayIntsortCellsInMEDFileFrmt () throw (INTERP_KERNEL::Exception)
bool checkConsecutiveCellTypes () const
bool checkConsecutiveCellTypesAndOrder (const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd) const
DataArrayIntgetLevArrPerCellTypes (const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd, DataArrayInt *&nbPerType) const throw (INTERP_KERNEL::Exception)
DataArrayIntgetRenumArrForConsecutiveCellTypesSpec (const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd) const throw (INTERP_KERNEL::Exception)
DataArrayIntrearrange2ConsecutiveCellTypes ()
std::vector< MEDCouplingUMesh * > splitByType () const
DataArrayIntkeepCellIdsByType (INTERP_KERNEL::NormalizedCellType type, const int *begin, const int *end) const throw (INTERP_KERNEL::Exception)
DataArrayIntconvertCellArrayPerGeoType (const DataArrayInt *da) const throw (INTERP_KERNEL::Exception)
MEDCouplingUMeshkeepSpecifiedCells (INTERP_KERNEL::NormalizedCellType type, const int *idsPerGeoTypeBg, const int *idsPerGeoTypeEnd) const
MEDCouplingMeshmergeMyselfWith (const MEDCouplingMesh *other) const
DataArrayDoublegetBarycenterAndOwner () const
DataArrayDoublegetPartBarycenterAndOwner (const int *begin, const int *end) const

Static Public Member Functions

static MEDCouplingUMeshNew ()
static MEDCouplingUMeshNew (const char *meshName, int meshDim)
static MEDCouplingUMeshBuild0DMeshFromCoords (DataArrayDouble *da) throw (INTERP_KERNEL::Exception)
static MEDCouplingUMeshMergeUMeshes (const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw (INTERP_KERNEL::Exception)
static MEDCouplingUMeshMergeUMeshes (std::vector< const MEDCouplingUMesh * > &a) throw (INTERP_KERNEL::Exception)
static MEDCouplingUMeshMergeUMeshesOnSameCoords (const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw (INTERP_KERNEL::Exception)
static MEDCouplingUMeshMergeUMeshesOnSameCoords (const std::vector< const MEDCouplingUMesh * > &meshes)
static MEDCouplingUMeshFuseUMeshesOnSameCoords (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

Private Member Functions

 MEDCouplingUMesh ()
 MEDCouplingUMesh (const MEDCouplingUMesh &other, bool deepCpy)
 ~MEDCouplingUMesh ()
void checkFullyDefined () const throw (INTERP_KERNEL::Exception)
void checkConnectivityFullyDefined () const throw (INTERP_KERNEL::Exception)
void reprConnectivityOfThisLL (std::ostringstream &stream) const
DataArrayIntsimplexizePol0 () throw (INTERP_KERNEL::Exception)
DataArrayIntsimplexizePol1 () throw (INTERP_KERNEL::Exception)
void renumberNodesInConn (const int *newNodeNumbers)
void fillCellIdsToKeepFromNodeIds (const int *begin, const int *end, bool fullyIn, std::vector< int > &cellIdsKept) const
MEDCouplingUMeshbuildExtrudedMeshFromThisLowLev (int nbOfNodesOf1Lev, bool isQuad) const
DataArrayDoublefillExtCoordsUsingTranslation (const MEDCouplingUMesh *mesh1D, bool isQuad) const
DataArrayDoublefillExtCoordsUsingTranslAndAutoRotation (const MEDCouplingUMesh *mesh1D, bool isQuad) const throw (INTERP_KERNEL::Exception)
DataArrayDoublefillExtCoordsUsingTranslAndAutoRotation2D (const MEDCouplingUMesh *mesh1D, bool isQuad) const throw (INTERP_KERNEL::Exception)
DataArrayDoublefillExtCoordsUsingTranslAndAutoRotation3D (const MEDCouplingUMesh *mesh1D, bool isQuad) const throw (INTERP_KERNEL::Exception)
template<int SPACEDIM>
void findCommonCellsBase (int compType, std::vector< int > &res, std::vector< int > &resI) const
bool areCellsEqualInPool (const std::vector< int > &candidates, int compType, std::vector< int > &result) const
MEDCouplingUMeshbuildPartOfMySelfKeepCoords (const int *begin, const int *end) const
template<int SPACEDIM>
void getCellsContainingPointsAlg (const double *coords, const double *pos, int nbOfPoints, double eps, std::vector< int > &elts, std::vector< int > &eltsIndex) const

Static Private Member Functions

static void fillInCompact3DMode (int spaceDim, int nbOfNodesInCell, const int *conn, const double *coo, double *zipFrmt) throw (INTERP_KERNEL::Exception)
static void appendExtrudedCell (const int *connBg, const int *connEnd, int nbOfNodesPerLev, bool isQuad, std::vector< int > &ret)

Private Attributes

int _iterator
 this iterator stores current position in _nodal_connec array.
int _mesh_dim
DataArrayInt_nodal_connec
DataArrayInt_nodal_connec_index
std::set
< INTERP_KERNEL::NormalizedCellType
_types

Static Private Attributes

static const char PART_OF_NAME [] = "PartOf_"

Constructor & Destructor Documentation

MEDCouplingUMesh::MEDCouplingUMesh ( ) [private]
MEDCouplingUMesh::MEDCouplingUMesh ( const MEDCouplingUMesh other,
bool  deepCpy 
) [private]

Copy constructor. If 'deepCpy' is false 'this' is a shallow copy of other. If 'deeCpy' is true all arrays (coordinates and connectivities) are deeply copied.

References ParaMEDMEM.MEDCouplingUMesh._nodal_connec, ParaMEDMEM.MEDCouplingUMesh._nodal_connec_index, and ParaMEDMEM.DataArrayInt.performCpy().

MEDCouplingUMesh::~MEDCouplingUMesh ( ) [private]

Member Function Documentation

MEDCouplingUMesh * MEDCouplingUMesh::New ( ) [static]
MEDCouplingUMesh * MEDCouplingUMesh::New ( const char *  meshName,
int  meshDim 
) [static]
MEDCouplingMesh * MEDCouplingUMesh::deepCpy ( ) const [virtual]
MEDCouplingUMesh * MEDCouplingUMesh::clone ( bool  recDeepCpy) const
void MEDCouplingUMesh::updateTime ( ) const [virtual]
MEDCouplingMeshType ParaMEDMEM.MEDCouplingUMesh.getType ( ) const [virtual]
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.MEDCouplingUMesh._mesh_dim, ParaMEDMEM.MEDCouplingUMesh._nodal_connec, ParaMEDMEM.MEDCouplingUMesh._nodal_connec_index, ParaMEDMEM.MEDCouplingUMesh._types, ParaMEDMEM.DataArrayInt.isEqual(), and ParaMEDMEM.MEDCouplingPointSet.isEqual().

bool MEDCouplingUMesh::isEqualWithoutConsideringStr ( const MEDCouplingMesh other,
double  prec 
) const [virtual]
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.

Parameters:
cellCompPolvalues are described in MEDCouplingUMesh.zipConnectivityTraducer method.
cellCoroutput array giving the correspondance of cells from 'other' to 'this'.
nodeCoroutput array giving the correspondance of nodes from 'other' to 'this'.

Implements ParaMEDMEM.MEDCouplingMesh.

References ParaMEDMEM.MEDCouplingUMesh._types, ParaMEDMEM.MEDCouplingMesh.checkFastEquivalWith(), ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells(), TestMedCorba2.m, 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.

Parameters:
cellCompPolvalues are described in MEDCouplingUMesh.zipConnectivityTraducer method.
cellCoroutput array giving the correspondance of cells from 'other' to 'this'.

Implements ParaMEDMEM.MEDCouplingMesh.

References ParaMEDMEM.MEDCouplingPointSet._coords, ParaMEDMEM.MEDCouplingUMesh._types, ParaMEDMEM.MEDCouplingMesh.checkFastEquivalWith(), ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells(), TestMedCorba2.m, 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(), and testMedMemCxxTests.status.

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.MEDCouplingUMesh._mesh_dim, ParaMEDMEM.MEDCouplingUMesh._nodal_connec, ParaMEDMEM.MEDCouplingUMesh._nodal_connec_index, ParaMEDMEM.MEDCouplingUMesh._types, INTERP_KERNEL.CellModel.GetCellModel(), ParaMEDMEM.DataArray.getInfoOnComponent(), and ParaMEDMEM.DataArray.getNumberOfComponents().

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.CellModel.GetCellModel(), INTERP_KERNEL.CellModel.getDimension(), INTERP_KERNEL.CellModel.getNumberOfNodes(), INTERP_KERNEL.CellModel.getRepr(), INTERP_KERNEL.CellModel.isDynamic(), med_field_anal.meshDim, and INTERP_KERNEL.NORM_POLYHED.

void MEDCouplingUMesh::checkCoherency2 ( double  eps = 1e-12) const throw (INTERP_KERNEL::Exception) [virtual]
void MEDCouplingUMesh::setMeshDimension ( int  meshDim)
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.

Parameters:
typetype of cell to add.
sizenumber of nodes constituting this cell.
nodalConnOfCellthe connectivity of the cell to add.

References INTERP_KERNEL.CellModel.GetCellModel(), INTERP_KERNEL.CellModel.getDimension(), INTERP_KERNEL.CellModel.getRepr(), test_NonCoincidentDEC.size, and medClient_test.type.

void MEDCouplingUMesh::finishInsertingCells ( )
const std::set<INTERP_KERNEL::NormalizedCellType>& ParaMEDMEM.MEDCouplingUMesh.getAllTypes ( ) const
std::set< INTERP_KERNEL::NormalizedCellType > MEDCouplingUMesh::getAllGeoTypes ( ) const [virtual]
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.

References med_test1.begin, testRenumbering.conn, med_test1.end, and testMEDMEM.ret.

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 ParaMEDMEM.MEDCouplingUMesh._nodal_connec, ParaMEDMEM.MEDCouplingUMesh._nodal_connec_index, ParaMEDMEM.MEDCouplingUMesh.computeTypes(), ParaMEDMEM.TimeLabel.declareAsNew(), and ParaMEDMEM.DataArrayInt.SetArrayIn().

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]
int MEDCouplingUMesh::getNumberOfCellsWithType ( INTERP_KERNEL::NormalizedCellType  type) const [virtual]
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.MEDCouplingUMesh._nodal_connec, ParaMEDMEM.MEDCouplingUMesh._nodal_connec_index, and ParaMEDMEM.DataArrayInt.getConstPointer().

DataArrayInt * MEDCouplingUMesh::getCellIdsFullyIncludedInNodeIds ( const int partBg,
const int partEnd 
) const [virtual]
void MEDCouplingUMesh::getCoordinatesOfNode ( int  nodeId,
std::vector< double > &  coo 
) const [virtual]
std::string MEDCouplingUMesh::simpleRepr ( ) const [virtual]
std::string MEDCouplingUMesh::advancedRepr ( ) const [virtual]
std::string MEDCouplingUMesh::reprConnectivityOfThis ( ) const
int MEDCouplingUMesh::getNumberOfNodesInCell ( int  cellId) const
int MEDCouplingUMesh::getNumberOfCells ( ) const [virtual]
int MEDCouplingUMesh::getMeshDimension ( ) const [virtual]
int MEDCouplingUMesh::getMeshLength ( ) const

This method is for test reason. Normally the integer returned is not useable by user.

References ParaMEDMEM.MEDCouplingUMesh._nodal_connec, and ParaMEDMEM.DataArray.getNbOfElems().

void MEDCouplingUMesh::computeTypes ( )
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 ParaMEDMEM.MEDCouplingUMesh._nodal_connec, ParaMEDMEM.MEDCouplingUMesh.getMeshDimension(), ParaMEDMEM.MEDCouplingUMesh.getMeshLength(), and ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells().

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.

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

Reimplemented from ParaMEDMEM.MEDCouplingPointSet.

References ParaMEDMEM.DataArrayInt.alloc().

void MEDCouplingUMesh::serialize ( DataArrayInt *&  a1,
DataArrayDouble *&  a2 
) const [virtual]
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]
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 ParaMEDMEM.MEDCouplingUMesh.areCellsEqual0(), ParaMEDMEM.MEDCouplingUMesh.areCellsEqual1(), and ParaMEDMEM.MEDCouplingUMesh.areCellsEqual2().

bool MEDCouplingUMesh::areCellsEqual0 ( int  cell1,
int  cell2 
) const
bool MEDCouplingUMesh::areCellsEqual1 ( int  cell1,
int  cell2 
) const

This method is the last step of the MEDCouplingUMesh.zipConnectivityTraducer with policy 1.

bool MEDCouplingUMesh::areCellsEqual2 ( int  cell1,
int  cell2 
) const
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 TestMedCorba5.c1, TestMedCorba5.c2, ParaMEDMEM.MEDCouplingUMesh.getCoordinatesOfNode(), ParaMEDMEM.MEDCouplingUMesh.getNodeIdsOfCell(), ParaMEDMEM.MEDCouplingUMesh.getTypeOfCell(), TestMedCorba4.n1, and TestMedCorba4.n2.

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.MEDCouplingUMesh._nodal_connec, ParaMEDMEM.MEDCouplingUMesh._nodal_connec_index, ParaMEDMEM.DataArrayInt.alloc(), ParaMEDMEM.MEDCouplingUMesh.checkFullyDefined(), ParaMEDMEM.MEDCouplingUMesh.computeTypes(), testRenumbering.conn, INTERP_KERNEL.CellModel.fillSonCellNodalConnectivity2(), INTERP_KERNEL.CellModel.GetCellModel(), ParaMEDMEM.DataArrayInt.getConstPointer(), ParaMEDMEM.MEDCouplingUMesh.getMeshDimension(), ParaMEDMEM.DataArray.getNbOfElems(), INTERP_KERNEL.CellModel.getNumberOfSons2(), ParaMEDMEM.DataArrayInt.getPointer(), INTERP_KERNEL.NORM_POLYGON, INTERP_KERNEL.NORM_POLYHED, and medClient_test.type.

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 ParaMEDMEM.MEDCouplingUMesh.convertToPolyTypes(), and ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells().

void MEDCouplingUMesh::unPolyze ( )
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.MEDCouplingUMesh._nodal_connec, ParaMEDMEM.MEDCouplingUMesh._nodal_connec_index, ParaMEDMEM.DataArrayInt.alloc(), testRenumbering.conn, ParaMEDMEM.RefCountObject.decrRef(), MEDMEM.fill(), ParaMEDMEM.DataArrayInt.getConstPointer(), ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells(), ParaMEDMEM.MEDCouplingPointSet.getNumberOfNodes(), ParaMEDMEM.DataArrayInt.getPointer(), ParaMEDMEM.MEDCouplingUMesh.New(), ParaMEDMEM.DataArrayDouble.renumberAndReduce(), testMEDMEM.ret, 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'.

Parameters:
compTypeinput 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.
Returns:
the correspondance array old to new.

References ParaMEDMEM.DataArrayInt.alloc(), ParaMEDMEM.RefCountObject.decrRef(), MEDMEM.fill(), ParaMEDMEM.DataArrayInt.getPointer(), testRenumbering.id, Med_Gen_test.it, TestMedCorba2.m, ParaMEDMEM.DataArrayInt.New(), testMEDMEM.ret, and batchmode_medcorba_test.spaceDim.

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 :

Parameters:
compTypeis the comparison type. The possible values of this parameter are described in ParaMEDMEM.MEDCouplingUMesh.zipConnectivityTraducer method
arris an output parameter that returns a newly created instance. This array is of size 'other->getNumberOfCells()'.
Returns:
If 'other' is fully included in 'this 'true is returned. If not false is returned.

References MED_test2.mesh.

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 testRenumbering.conn, ParaMEDMEM.CPP_DEALLOC, and MEDMEM.fill().

MEDCouplingUMesh * MEDCouplingUMesh::buildDescendingConnectivity ( DataArrayInt desc,
DataArrayInt descIndx,
DataArrayInt revDesc,
DataArrayInt revDescIndx 
) const throw (INTERP_KERNEL::Exception)
DataArrayInt * MEDCouplingUMesh::mergeNodes ( double  precision,
bool &  areNodesMerged,
int newNbOfNodes 
) [virtual]
Parameters:
areNodesMergedif at least two nodes have been merged.
Returns:
old to new node correspondance.

Implements ParaMEDMEM.MEDCouplingPointSet.

References ParaMEDMEM.MEDCouplingPointSet.buildPermArrayForMergeNode(), ParaMEDMEM.DataArrayInt.getConstPointer(), ParaMEDMEM.MEDCouplingUMesh.renumberNodes(), and testMEDMEM.ret.

DataArrayInt * MEDCouplingUMesh::mergeNodes2 ( double  precision,
bool &  areNodesMerged,
int newNbOfNodes 
) [virtual]
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.

References coords, and test_NonCoincidentDEC.epsilon.

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

Parameters:
beginbegin of array containing the cell ids to keep.
endend of array of cell ids to keep. WARNING end param is not included ! Idem STL standard definitions.
keepCoordsthat 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 ParaMEDMEM.MEDCouplingUMesh.buildPartOfMySelfKeepCoords(), ParaMEDMEM.MEDCouplingUMesh.getMeshDimension(), ParaMEDMEM.RefCountObject.incrRef(), testMEDMEM.ret, and ParaMEDMEM.MEDCouplingPointSet.zipCoords().

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 ParaMEDMEM.MEDCouplingUMesh.buildPartOfMySelf(), and ParaMEDMEM.MEDCouplingUMesh.fillCellIdsToKeepFromNodeIds().

DataArrayInt * MEDCouplingUMesh::getCellIdsLyingOnNodes ( const int begin,
const int end,
bool  fullyIn 
) const
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 ParaMEDMEM.MEDCouplingUMesh.buildDescendingConnectivity(), ParaMEDMEM.MEDCouplingUMesh.buildPartOfMySelfNode(), ParaMEDMEM.RefCountObject.decrRef(), medClient_test.desc, ParaMEDMEM.MEDCouplingUMesh.New(), and testMEDMEM.ret.

MEDCouplingUMesh * MEDCouplingUMesh::buildUnstructured ( ) const throw (INTERP_KERNEL::Exception) [virtual]
void MEDCouplingUMesh::findBoundaryNodes ( std::vector< int > &  nodes) const [virtual]
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.

Parameters:
keepCoordsspecifies if ParaMEDMEM.MEDCouplingUMesh.zipCoords is called on returned mesh before being returned. If true zipCoords is NOT called, if false, zipCoords is called.
Returns:
mesh with ref counter equal to 1.

Implements ParaMEDMEM.MEDCouplingPointSet.

References ParaMEDMEM.MEDCouplingUMesh.buildDescendingConnectivity(), ParaMEDMEM.MEDCouplingUMesh.buildPartOfMySelf(), ParaMEDMEM.RefCountObject.decrRef(), medClient_test.desc, ParaMEDMEM.DataArrayInt.getConstPointer(), ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells(), ParaMEDMEM.MEDCouplingUMesh.New(), and testMEDMEM.ret.

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(), ParaMEDMEM.MEDCouplingUMesh.buildDescendingConnectivity(), ParaMEDMEM.MEDCouplingUMesh.checkFullyDefined(), ParaMEDMEM.RefCountObject.decrRef(), ParaMEDMEM.DataArrayInt.deltaShiftIndex(), medClient_test.desc, ParaMEDMEM.DataArrayInt.getConstPointer(), ParaMEDMEM.DataArrayInt.getIdsEqual(), ParaMEDMEM.DataArrayInt.getIJ(), ParaMEDMEM.DataArray.getNumberOfTuples(), ParaMEDMEM.DataArrayInt.getPointer(), ParaMEDMEM.MEDCouplingUMesh.New(), testMEDMEM.ret, and ParaMEDMEM.DataArray.setName().

void MEDCouplingUMesh::renumberNodes ( const int newNodeNumbers,
int  newNbOfNodes 
) [virtual]
void MEDCouplingUMesh::renumberNodes2 ( const int newNodeNumbers,
int  newNbOfNodes 
) [virtual]
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(), testRenumbering.conn, ParaMEDMEM.DataArray.copyStringInfoFrom(), ParaMEDMEM.RefCountObject.decrRef(), ParaMEDMEM.DataArrayInt.getPointer(), and ParaMEDMEM.DataArrayInt.New().

void MEDCouplingUMesh::getCellsInBoundingBox ( const double bbox,
double  eps,
std::vector< int > &  elems 
) [virtual]
void MEDCouplingUMesh::getCellsInBoundingBox ( const INTERP_KERNEL::DirectedBoundingBox bbox,
double  eps,
std::vector< int > &  elems 
) [virtual]
MEDCouplingFieldDouble * MEDCouplingUMesh::getMeasureField ( bool  isAbs) const [virtual]
DataArrayDouble * MEDCouplingUMesh::getPartMeasureField ( bool  isAbs,
const int begin,
const int end 
) const
MEDCouplingFieldDouble * MEDCouplingUMesh::getMeasureFieldOnNode ( bool  isAbs) const [virtual]
MEDCouplingFieldDouble * MEDCouplingUMesh::buildOrthogonalField ( ) const [virtual]
MEDCouplingFieldDouble * MEDCouplingUMesh::buildPartOrthogonalField ( const int begin,
const int end 
) const
MEDCouplingFieldDouble * MEDCouplingUMesh::buildDirectionVectorField ( ) const
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.MEDCouplingUMesh._nodal_connec, ParaMEDMEM.MEDCouplingUMesh._nodal_connec_index, testRenumbering.conn, ParaMEDMEM.DataArrayInt.getConstPointer(), ParaMEDMEM.MEDCouplingUMesh.getMeshDimension(), and ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells().

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.

Parameters:
ptreference point of the line
vnormalized director vector of the line
epsmax precision before throwing an exception
resoutput of size this->getNumberOfCells

References ParaMEDMEM.MEDCouplingUMesh._types, ParaMEDMEM.MEDCouplingUMesh.buildDirectionVectorField(), ParaMEDMEM.RefCountObject.decrRef(), MEDCouplingCorbaSwigTestClt.f, ParaMEDMEM.MEDCouplingFieldDouble.getArray(), ParaMEDMEM.DataArrayDouble.getConstPointer(), ParaMEDMEM.MEDCouplingPointSet.getCoords(), ParaMEDMEM.MEDCouplingUMesh.getMeshDimension(), ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells(), ParaMEDMEM.MEDCouplingPointSet.getNumberOfNodes(), ParaMEDMEM.MEDCouplingPointSet.getSpaceDimension(), TestMedCorba4.n1, 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 ParaMEDMEM.MEDCouplingUMesh.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 ParaMEDMEM.MEDCouplingUMesh.getCellsContainingPoints().

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

Parameters:
posinput 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, coords, ParaMEDMEM.DataArrayDouble.getConstPointer(), ParaMEDMEM.MEDCouplingUMesh.getMeshDimension(), ParaMEDMEM.MEDCouplingPointSet.getSpaceDimension(), and batchmode_medcorba_test.spaceDim.

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.MEDCouplingUMesh._nodal_connec, ParaMEDMEM.MEDCouplingUMesh._nodal_connec_index, testRenumbering.conn, INTERP_KERNEL.CellModel.GetCellModel(), ParaMEDMEM.DataArrayInt.getConstPointer(), ParaMEDMEM.MEDCouplingUMesh.getMeshDimension(), ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells(), ParaMEDMEM.MEDCouplingPointSet.getSpaceDimension(), ParaMEDMEM.MEDCouplingPointSet.isButterfly2DCell(), medcorba_test.msg, ParaMEDMEM.MEDCouplingPointSet.project2DCellOnXY(), and batchmode_medcorba_test.spaceDim.

void MEDCouplingUMesh::getBoundingBoxForBBTree ( std::vector< double > &  bbox) const
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.

Parameters:
mesh1Dis an unstructured mesh with MeshDim==1 and spaceDim==3. If not an exception will be thrown.
policyspecifies the type of extrusion chosen. 0 for translation (most simple), 1 for translation and rotation around point of 'mesh1D'.
Returns:
an unstructured mesh with meshDim==3 and spaceDim==3. The returned mesh has the same coords than 'this'.

References ParaMEDMEM.MEDCouplingUMesh.buildExtrudedMeshFromThisLowLev(), ParaMEDMEM.MEDCouplingUMesh.checkFullyDefined(), ParaMEDMEM.RefCountObject.decrRef(), ParaMEDMEM.MEDCouplingUMesh.fillExtCoordsUsingTranslAndAutoRotation(), ParaMEDMEM.MEDCouplingUMesh.fillExtCoordsUsingTranslation(), ParaMEDMEM.MEDCouplingUMesh.getMeshDimension(), ParaMEDMEM.MEDCouplingPointSet.getNumberOfNodes(), ParaMEDMEM.MEDCouplingPointSet.getSpaceDimension(), ParaMEDMEM.MEDCouplingUMesh.isContiguous1D(), ParaMEDMEM.MEDCouplingUMesh.isFullyQuadratic(), ParaMEDMEM.MEDCouplingUMesh.isPresenceOfQuadratic(), testMEDMEM.ret, ParaMEDMEM.MEDCouplingPointSet.setCoords(), ParaMEDMEM.MEDCouplingUMesh.updateTime(), and ParaMEDMEM.MEDCouplingPointSet.zipCoords().

bool MEDCouplingUMesh::isFullyQuadratic ( ) const
bool MEDCouplingUMesh::isPresenceOfQuadratic ( ) const
void MEDCouplingUMesh::convertQuadraticCellsToLinear ( ) throw (INTERP_KERNEL::Exception)
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 :

  • 1 only QUAD4. For QUAD4 the cut is done along 0-2 diagonal for QUAD4
  • 2 only QUAD4. For QUAD4 the cut is done along 1-3 diagonal for QUAD4

Implements ParaMEDMEM.MEDCouplingMesh.

bool MEDCouplingUMesh::areOnlySimplexCells ( ) const throw (INTERP_KERNEL::Exception)
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 ParaMEDMEM.MEDCouplingUMesh._nodal_connec, ParaMEDMEM.MEDCouplingUMesh._nodal_connec_index, ParaMEDMEM.MEDCouplingUMesh.checkFullyDefined(), ParaMEDMEM.MEDCouplingUMesh.computeTypes(), testRenumbering.conn, ParaMEDMEM.MEDCouplingUMesh.getMeshDimension(), ParaMEDMEM.MEDCouplingUMesh.getMeshLength(), ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells(), ParaMEDMEM.DataArrayInt.getPointer(), medClient_test.index, ParaMEDMEM.DataArrayInt.reAlloc(), INTERP_KERNEL.CellSimplify.simplifyDegeneratedCell(), and medClient_test.type.

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.

Exceptions:
when'this' is not a mesh with meshdim==2 and spacedim==3

References testRenumbering.conn, INTERP_KERNEL.NORM_POLYGON, and medClient_test.type.

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.

Exceptions:
when'this' is not a mesh with meshdim==2 and spacedim==3

References testRenumbering.conn, INTERP_KERNEL.NORM_POLYGON, and medClient_test.type.

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.

Exceptions:
when'this' is not a mesh with meshdim==3 and spacedim==3

References testRenumbering.conn, INTERP_KERNEL.NORM_POLYHED, and medClient_test.type.

void MEDCouplingUMesh::orientCorrectlyPolyhedrons ( ) throw (INTERP_KERNEL::Exception)
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.

Parameters:
vecoutput of size at least 3 used to store the normal vector (with norm equal to Area ) of searched plane.
posoutput of size at least 3 used to store a point owned of searched plane.

References testRenumbering.conn.

MEDCouplingFieldDouble * MEDCouplingUMesh::getEdgeRatioField ( ) const throw (INTERP_KERNEL::Exception)
MEDCouplingFieldDouble * MEDCouplingUMesh::getAspectRatioField ( ) const throw (INTERP_KERNEL::Exception)
MEDCouplingFieldDouble * MEDCouplingUMesh::getWarpField ( ) const throw (INTERP_KERNEL::Exception)
MEDCouplingFieldDouble * MEDCouplingUMesh::getSkewField ( ) const throw (INTERP_KERNEL::Exception)
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(), testRenumbering.conn, ParaMEDMEM.DataArrayInt.getPointer(), Med_Gen_test.it, TestMedCorba2.n, ParaMEDMEM.DataArrayInt.New(), testMEDMEM.ret, and medClient_test.types.

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'.

Exceptions:
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 testRenumbering.conn, ParaMEDMEM.DataArrayInt.getIdsEqual(), ParaMEDMEM.RefCountObject.incrRef(), ParaMEDMEM.DataArrayInt.splitByValueRange(), and medClient_test.types.

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(), medClient_test.desc, ParaMEDMEM.DataArrayInt.getMaxValue(), ParaMEDMEM.MEDCouplingUMesh.New(), ParaMEDMEM.DataArrayInt.New(), and testMEDMEM.ret.

DataArrayInt * MEDCouplingUMesh::sortCellsInMEDFileFrmt ( ) throw (INTERP_KERNEL::Exception)
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.MEDCouplingUMesh._nodal_connec, ParaMEDMEM.MEDCouplingUMesh._nodal_connec_index, ParaMEDMEM.MEDCouplingUMesh.checkFullyDefined(), testRenumbering.conn, ParaMEDMEM.DataArrayInt.getConstPointer(), ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells(), and medClient_test.types.

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.MEDCouplingUMesh._nodal_connec, ParaMEDMEM.MEDCouplingUMesh._nodal_connec_index, ParaMEDMEM.MEDCouplingUMesh.checkFullyDefined(), testRenumbering.conn, ParaMEDMEM.DataArrayInt.getConstPointer(), and ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells().

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 testRenumbering.conn, INTERP_KERNEL.CellModel.GetCellModel(), INTERP_KERNEL.CellModel.getRepr(), 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().

DataArrayInt * MEDCouplingUMesh::rearrange2ConsecutiveCellTypes ( )
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 ParaMEDMEM.MEDCouplingUMesh._nodal_connec, ParaMEDMEM.MEDCouplingUMesh._nodal_connec_index, ParaMEDMEM.MEDCouplingUMesh.buildPartOfMySelf(), ParaMEDMEM.MEDCouplingUMesh.checkFullyDefined(), testRenumbering.conn, ParaMEDMEM.DataArrayInt.getConstPointer(), ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells(), TestMedCorba2.m, and testMEDMEM.ret.

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(), med_test1.begin, testRenumbering.conn, med_test1.end, ParaMEDMEM.DataArrayInt.getPointer(), ParaMEDMEM.DataArrayInt.New(), testMEDMEM.ret, and medClient_test.type.

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(), testRenumbering.conn, ParaMEDMEM.DataArray.copyStringInfoFrom(), ParaMEDMEM.DataArrayInt.getPointer(), ParaMEDMEM.DataArrayInt.New(), testMEDMEM.ret, and medClient_test.types.

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 ParaMEDMEM.MEDCouplingUMesh.buildPartOfMySelf(), ParaMEDMEM.RefCountObject.decrRef(), ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells(), ParaMEDMEM.MEDCouplingUMesh.getTypeOfCell(), and testMEDMEM.ret.

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(), ParaMEDMEM.MEDCouplingUMesh.MergeUMeshes(), and ParaMEDMEM.UNSTRUCTURED.

DataArrayDouble * MEDCouplingUMesh::getBarycenterAndOwner ( ) const [virtual]
DataArrayDouble * MEDCouplingUMesh::getPartBarycenterAndOwner ( const int begin,
const int end 
) const
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(), ParaMEDMEM.MEDCouplingUMesh.New(), INTERP_KERNEL.NORM_POINT1, and testMEDMEM.ret.

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'.

References test_gibi.mesh1.

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.

References test_gibi.mesh1.

MEDCouplingUMesh * MEDCouplingUMesh::MergeUMeshesOnSameCoords ( const std::vector< const MEDCouplingUMesh * > &  meshes) [static]
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)

Parameters:
meshesinput non empty vector containing meshes having same coordiantes array and same mesh dimension.
compTypesee MEDCouplingUMesh.zipConnectivityTraducer
corroutput 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.
Returns:
The mesh lying on the same coordinates than those in meshes. All cells in 'meshes' are in returned mesh with
Exceptions:
ifmeshes 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(), ParaMEDMEM.MEDCouplingUMesh.MergeUMeshesOnSameCoords(), Med_Gen_test.nbOfMeshes, ParaMEDMEM.MEDCouplingUMesh.New(), testMEDMEM.ret, ParaMEDMEM.DataArray.setName(), and ParaMEDMEM.MEDCouplingUMesh.zipConnectivityTraducer().

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 med_test1.begin, coords, ParaMEDMEM.MEDCouplingUMesh.EPS_FOR_POLYH_ORIENTATION, and testGaussLocalization.p1.

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.

References med_test1.begin, coords, med_test1.end, testGaussLocalization.p1, and testGaussLocalization.p2.

void MEDCouplingUMesh::checkFullyDefined ( ) const throw (INTERP_KERNEL::Exception) [private, virtual]

This method checks that all arrays are set. If yes nothing done if no an exception is thrown.

Implements ParaMEDMEM.MEDCouplingPointSet.

References ParaMEDMEM.MEDCouplingPointSet._coords, ParaMEDMEM.MEDCouplingUMesh._nodal_connec, and ParaMEDMEM.MEDCouplingUMesh._nodal_connec_index.

void MEDCouplingUMesh::checkConnectivityFullyDefined ( ) const throw (INTERP_KERNEL::Exception) [private]

This method checks that all connectivity arrays are set. If yes nothing done if no an exception is thrown.

References ParaMEDMEM.MEDCouplingUMesh._nodal_connec, and ParaMEDMEM.MEDCouplingUMesh._nodal_connec_index.

void MEDCouplingUMesh::reprConnectivityOfThisLL ( std::ostringstream &  stream) const [private]
DataArrayInt * MEDCouplingUMesh::simplexizePol0 ( ) throw (INTERP_KERNEL::Exception) [private]
DataArrayInt * MEDCouplingUMesh::simplexizePol1 ( ) throw (INTERP_KERNEL::Exception) [private]
void MEDCouplingUMesh::renumberNodesInConn ( const int newNodeNumbers) [private]
void MEDCouplingUMesh::fillCellIdsToKeepFromNodeIds ( const int begin,
const int end,
bool  fullyIn,
std::vector< int > &  cellIdsKept 
) const [private]

Keeps from 'this' only cells which constituing point id are in the ids specified by ['begin','end'). The resulting cell ids are stored at the end of the 'cellIdsKept' parameter. 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.

Parameters:
begininput start of array of node ids.
endinput end of array of node ids.
fullyIninput that specifies if all node ids must be in ['begin','end') array to consider cell to be in.
cellIdsKeptin/out array where all candidate cell ids are put at the end.

References testRenumbering.conn, ParaMEDMEM.DataArrayInt.getConstPointer(), ParaMEDMEM.MEDCouplingUMesh.getNodalConnectivity(), ParaMEDMEM.MEDCouplingUMesh.getNodalConnectivityIndex(), ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells(), and Med_Gen_test.it.

MEDCouplingUMesh * MEDCouplingUMesh::buildExtrudedMeshFromThisLowLev ( int  nbOfNodesOf1Lev,
bool  isQuad 
) const [private]
DataArrayDouble * MEDCouplingUMesh::fillExtCoordsUsingTranslation ( const MEDCouplingUMesh mesh1D,
bool  isQuad 
) const [private]
DataArrayDouble * MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation ( const MEDCouplingUMesh mesh1D,
bool  isQuad 
) const throw (INTERP_KERNEL::Exception) [private]

This method incarnates the policy 1 for MEDCouplingUMesh.buildExtrudedMesh method.

Parameters:
mesh1Dis the input 1D mesh used for translation and automatic rotation computation.
Returns:
newCoords new coords filled by this method.
DataArrayDouble * MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation2D ( const MEDCouplingUMesh mesh1D,
bool  isQuad 
) const throw (INTERP_KERNEL::Exception) [private]
DataArrayDouble * MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation3D ( const MEDCouplingUMesh mesh1D,
bool  isQuad 
) const throw (INTERP_KERNEL::Exception) [private]
template<int SPACEDIM>
void MEDCouplingUMesh::findCommonCellsBase ( int  compType,
std::vector< int > &  res,
std::vector< int > &  resI 
) const [private]

This method common cells base regarding 'compType' comparison policy described in ParaMEDMEM.MEDCouplingUMesh.zipConnectivityTraducer for details. This method returns 2 values 'res' and 'resI'. If 'res' and 'resI' are not empty before calling this method they will be cleared before set. The format of 'res' and 'resI' is as explained here. resI.size()-1 is the number of set of cells equal. The nth set is [res.begin()+resI[n];res.begin()+resI[n+1]) with 0<=n<resI.size()-1

References ParaMEDMEM.MEDCouplingUMesh.areCellsEqualInPool(), testRenumbering.conn, coords, ParaMEDMEM.MEDCouplingUMesh.getBoundingBoxForBBTree(), ParaMEDMEM.MEDCouplingPointSet.getCaracteristicDimension(), ParaMEDMEM.DataArrayDouble.getConstPointer(), ParaMEDMEM.DataArrayInt.getConstPointer(), ParaMEDMEM.MEDCouplingPointSet.getCoords(), ParaMEDMEM.MEDCouplingUMesh.getNodalConnectivity(), ParaMEDMEM.MEDCouplingUMesh.getNodalConnectivityIndex(), ParaMEDMEM.MEDCouplingUMesh.getNumberOfCells(), and Med_Gen_test.it.

bool MEDCouplingUMesh::areCellsEqualInPool ( const std::vector< int > &  candidates,
int  compType,
std::vector< int > &  result 
) const [private]

This method find in candidate pool defined by 'candidates' the cells equal following the polycy 'compType'. If any true is returned and the results will be put at the end of 'result' output parameter. If not false is returned and result remains unchanged. The semantic of 'compType' is specified in MEDCouplingUMesh.zipConnectivityTraducer method. If in 'candidates' pool -1 value is considered as an empty value. WARNING this method returns only ONE set of result !

References ParaMEDMEM.MEDCouplingUMesh.areCellsEqual(), med_test1.end, and testMEDMEM.ret.

MEDCouplingUMesh * MEDCouplingUMesh::buildPartOfMySelfKeepCoords ( const int begin,
const int end 
) const [private]
template<int SPACEDIM>
void MEDCouplingUMesh::getCellsContainingPointsAlg ( const double coords,
const double pos,
int  nbOfPoints,
double  eps,
std::vector< int > &  elts,
std::vector< int > &  eltsIndex 
) const [private]
void MEDCouplingUMesh::fillInCompact3DMode ( int  spaceDim,
int  nbOfNodesInCell,
const int conn,
const double coo,
double zipFrmt 
) throw (INTERP_KERNEL::Exception) [static, private]

This method put in zip format into parameter 'zipFrmt' in full interlace mode. This format is often asked by INTERP_KERNEL algorithms to avoid many indirections into coordinates array.

References testRenumbering.conn, and batchmode_medcorba_test.spaceDim.

void MEDCouplingUMesh::appendExtrudedCell ( const int connBg,
const int connEnd,
int  nbOfNodesPerLev,
bool  isQuad,
std::vector< int > &  ret 
) [static, private]

This method takes in input a cell defined by its MEDcouplingUMesh connectivity [connBg,connEnd) and returns its extruded cell by inserting the result at the end of ret.

Parameters:
nbOfNodesPerLevin parameter that specifies the number of nodes of one slice of global dataset
isQuadspecifies the policy of connectivity. in/out parameter in which the result will be append

References testRenumbering.conn, INTERP_KERNEL.CellModel.GetCellModel(), INTERP_KERNEL.CellModel.getExtrudedType(), INTERP_KERNEL.NORM_POINT1, INTERP_KERNEL.NORM_POLYGON, INTERP_KERNEL.NORM_QUAD4, INTERP_KERNEL.NORM_QUAD8, INTERP_KERNEL.NORM_SEG2, INTERP_KERNEL.NORM_SEG3, INTERP_KERNEL.NORM_TRI3, and INTERP_KERNEL.NORM_TRI6.


Field Documentation

this iterator stores current position in _nodal_connec array.

const char MEDCouplingUMesh::PART_OF_NAME = "PartOf_" [static, private]
Copyright © 2007-2011 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