Public Member Functions | |
GRID () | |
GRID (const MED_EN::med_grid_type type) | |
GRID (const GRID &m) | |
GRID (driverTypes driverType, const string &fileName="", const string &meshName="") | |
GRID (const std::vector< std::vector< double > > &xyz_array, const std::vector< std::string > &coord_name, const std::vector< std::string > &coord_unit, const MED_EN::med_grid_type type=MED_EN::MED_CARTESIAN) | |
GRID & | operator= (const GRID &m) |
virtual | ~GRID () |
virtual void | init () |
void | fillCoordinates () const |
void | fillConnectivity () const |
void | makeUnstructured () |
void | fillMeshAfterRead () |
void | writeUnstructured (int index=0, const string &driverName="") |
void | read (int index=0) |
int | getNodeNumber (const int i, const int j=0, const int k=0) const |
int | getCellNumber (const int i, const int j=0, const int k=0) const |
MED_EN::med_grid_type | getGridType () const |
int | getArrayLength (const int Axis) const throw (MEDEXCEPTION) |
const double | getArrayValue (const int Axis, const int i) const throw (MEDEXCEPTION) |
const COORDINATE * | getCoordinateptr () const |
const double * | getCoordinates (MED_EN::medModeSwitch Mode) const |
const double | getCoordinate (int Number, int Axis) const |
int | getNumberOfTypes (MED_EN::medEntityMesh Entity) const |
int | getNumberOfTypesWithPoly (MED_EN::medEntityMesh Entity) const |
const MED_EN::medGeometryElement * | getTypes (MED_EN::medEntityMesh Entity) const |
MED_EN::medGeometryElement * | getTypesWithPoly (MED_EN::medEntityMesh Entity) const |
const CELLMODEL * | getCellsTypes (MED_EN::medEntityMesh Entity) const |
const int * | getGlobalNumberingIndex (MED_EN::medEntityMesh Entity) const |
int | getNumberOfElements (MED_EN::medEntityMesh Entity, MED_EN::medGeometryElement Type) const |
int | getNumberOfElementsWithPoly (MED_EN::medEntityMesh Entity, MED_EN::medGeometryElement Type) const |
bool | existConnectivity (MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity) const |
MED_EN::medGeometryElement | getElementType (MED_EN::medEntityMesh Entity, int Number) const |
MED_EN::medGeometryElement | getElementTypeWithPoly (MED_EN::medEntityMesh Entity, int Number) const |
void | calculateConnectivity (MED_EN::medModeSwitch Mode, MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity) const |
const CONNECTIVITY * | getConnectivityptr () const |
const int * | getConnectivity (MED_EN::medModeSwitch Mode, MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity, MED_EN::medGeometryElement Type) const |
const int * | getConnectivityIndex (MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity) const |
const int * | getReverseConnectivity (MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity=MED_EN::MED_CELL) const |
const int * | getReverseConnectivityIndex (MED_EN::medConnectivity ConnectivityType, MED_EN::medEntityMesh Entity=MED_EN::MED_CELL) const |
void | setGridType (MED_EN::med_grid_type gridType) |
Position to number conversion methods | |
getXXXNumber methods enable the user to convert an Axis [1,2,3] means one of directions: along i, j or k. For cell constituents (FACE or EDGE), Axis selects one of those having same
Exception for Axis out of range. For 2D grids, k is a dummy argument. | |
int | getEdgeNumber (const int Axis, const int i, const int j=0, const int k=0) const throw (MEDEXCEPTION) |
int | getFaceNumber (const int Axis, const int i, const int j=0, const int k=0) const throw (MEDEXCEPTION) |
Number to position conversion methods | |
getXXXPosition functions enable the user to convert a number into a
Exception for Number out of range. | |
void | getNodePosition (const int Number, int &i, int &j, int &k) const throw (MEDEXCEPTION) |
void | getCellPosition (const int Number, int &i, int &j, int &k) const throw (MEDEXCEPTION) |
void | getEdgePosition (const int Number, int &Axis, int &i, int &j, int &k) const throw (MEDEXCEPTION) |
void | getFacePosition (const int Number, int &Axis, int &i, int &j, int &k) const throw (MEDEXCEPTION) |
Protected Member Functions | |
CONNECTIVITY * | makeConnectivity (const MED_EN::medEntityMesh Entity, const MED_EN::medGeometryElement Geometry, const int NbEntities, int NbNodes, int nbMeshNodes, const int *NodeNumbers) const |
Protected Attributes | |
MED_EN::med_grid_type | _gridType |
int | _iArrayLength |
double * | _iArray |
int | _jArrayLength |
double * | _jArray |
int | _kArrayLength |
double * | _kArray |
bool | _is_coordinates_filled |
bool | _is_connectivity_filled |
bool | _is_default_gridType |
Friends | |
class | IMED_MESH_RDONLY_DRIVER |
class | IMED_MESH_WRONLY_DRIVER |
class | MED_MESH_RDONLY_DRIVER21 |
class | MED_MESH_WRONLY_DRIVER21 |
class | MED_MESH_RDONLY_DRIVER22 |
class | MED_MESH_WRONLY_DRIVER22 |
class | ENSIGHT_MESH_RDONLY_DRIVER |
GRID::GRID | ( | ) |
References init().
GRID::GRID | ( | const MED_EN::med_grid_type | type | ) |
References _gridType, _is_default_gridType, and init().
GRID::GRID | ( | const GRID & | m | ) |
GRID::GRID | ( | driverTypes | driverType, | |
const string & | fileName = "" , |
|||
const string & | meshName = "" | |||
) |
References MEDMEM::MESH::_drivers, MEDMEM::MESH::addDriver(), fillMeshAfterRead(), and init().
CONNECTIVITY * GRID::makeConnectivity | ( | const MED_EN::medEntityMesh | Entity, | |
const MED_EN::medGeometryElement | Geometry, | |||
const int | NbEntities, | |||
int | NbNodes, | |||
int | nbMeshNodes, | |||
const int * | NodeNumbers | |||
) | const [protected] |
Referenced by fillConnectivity().
void GRID::init | ( | ) | [virtual] |
Reimplemented from MEDMEM::MESH.
References _gridType, _iArray, _iArrayLength, _is_connectivity_filled, _is_coordinates_filled, _is_default_gridType, MEDMEM::MESH::_isAGrid, _jArray, _jArrayLength, _kArray, and _kArrayLength.
Referenced by GRID().
void GRID::fillCoordinates | ( | ) | const |
References MEDMEM::MESH::_coordinate, _iArray, _iArrayLength, _is_coordinates_filled, _jArray, _jArrayLength, _kArray, _kArrayLength, MEDMEM::MESH::_numberOfNodes, and MEDMEM::MESH::_spaceDimension.
Referenced by getCoordinate(), getCoordinateptr(), getCoordinates(), and makeUnstructured().
void GRID::fillConnectivity | ( | ) | const |
References MEDMEM::MESH::_connectivity, _iArrayLength, _is_connectivity_filled, _jArrayLength, _kArrayLength, MEDMEM::MESH::_spaceDimension, getEdgeNumber(), getFaceNumber(), and makeConnectivity().
Referenced by calculateConnectivity(), existConnectivity(), getCellsTypes(), getConnectivity(), getConnectivityIndex(), getConnectivityptr(), getElementType(), getGlobalNumberingIndex(), getReverseConnectivity(), getReverseConnectivityIndex(), and makeUnstructured().
void MEDMEM::GRID::makeUnstructured | ( | ) |
References fillConnectivity(), and fillCoordinates().
Referenced by writeUnstructured().
void GRID::fillMeshAfterRead | ( | ) |
void GRID::writeUnstructured | ( | int | index = 0 , |
|
const string & | driverName = "" | |||
) |
References MEDMEM::MESH::_drivers, MEDMEM::MESH::_isAGrid, and makeUnstructured().
void GRID::read | ( | int | index = 0 |
) | [virtual] |
Reimplemented from MEDMEM::MESH.
References MEDMEM::MESH::_drivers, MEDMEM::MESH::_isAGrid, and fillMeshAfterRead().
int MEDMEM::GRID::getNodeNumber | ( | const int | i, | |
const int | j = 0 , |
|||
const int | k = 0 | |||
) | const |
References _iArrayLength, and _jArrayLength.
int MEDMEM::GRID::getCellNumber | ( | const int | i, | |
const int | j = 0 , |
|||
const int | k = 0 | |||
) | const |
References _iArrayLength, and _jArrayLength.
MED_EN::med_grid_type MEDMEM::GRID::getGridType | ( | ) | const |
const COORDINATE * MEDMEM::GRID::getCoordinateptr | ( | ) | const [virtual] |
Get the COORDINATES object. Use it only if you need COORDINATES informations not provided by the GRID class via the MESH class.
Reimplemented from MEDMEM::MESH.
References MEDMEM::MESH::_coordinate, and fillCoordinates().
const double * MEDMEM::GRID::getCoordinates | ( | MED_EN::medModeSwitch | Mode | ) | const [virtual] |
Get the whole coordinates array in a given interlacing mode. The interlacing mode are :
Reimplemented from MEDMEM::MESH.
References MEDMEM::MESH::_coordinate, and fillCoordinates().
const double MEDMEM::GRID::getCoordinate | ( | int | number, | |
int | axis | |||
) | const [virtual] |
Get the coordinate n° number on axis n°axis
Reimplemented from MEDMEM::MESH.
References MEDMEM::MESH::_coordinate, and fillCoordinates().
int MEDMEM::GRID::getNumberOfTypes | ( | MED_EN::medEntityMesh | entity | ) | const [virtual] |
Get the number of different geometric types for a given entity type.
medEntityMesh entity : MED_CELL, MED_FACE, MED_EDGE, MED_NODE, MED_ALL_ENTITIES
Reimplemented from MEDMEM::MESH.
int MEDMEM::GRID::getNumberOfTypesWithPoly | ( | MED_EN::medEntityMesh | Entity | ) | const [virtual] |
Method equivalent to getNumberOfTypes except that it includes not only classical Types but polygons/polyhedra also.
Reimplemented from MEDMEM::MESH.
Referenced by getTypesWithPoly().
const medGeometryElement * GRID::getTypes | ( | MED_EN::medEntityMesh | entity | ) | const [virtual] |
return the GRID Geometric type, without computing all connectivity
Reimplemented from MEDMEM::MESH.
References MEDMEM::MESH::_spaceDimension.
Referenced by getTypesWithPoly().
MED_EN::medGeometryElement * GRID::getTypesWithPoly | ( | MED_EN::medEntityMesh | Entity | ) | const [virtual] |
Reimplemented from MEDMEM::MESH.
References getNumberOfTypesWithPoly(), and getTypes().
const CELLMODEL * MEDMEM::GRID::getCellsTypes | ( | MED_EN::medEntityMesh | Entity | ) | const [virtual] |
Get the whole list of CELLMODEL used by cells of given type (medEntityMesh).
REMARK : Don't use MED_NODE as medEntityMesh
Reimplemented from MEDMEM::MESH.
References MEDMEM::MESH::_connectivity, and fillConnectivity().
const int * MEDMEM::GRID::getGlobalNumberingIndex | ( | MED_EN::medEntityMesh | entity | ) | const [virtual] |
Return an array of size NumbreOfTypes+1 which contains, for each geometric type of the given entity, the first global element number of this type.
For exemple, if we have a mesh with 5 triangles and 4 quadrangle :
Reimplemented from MEDMEM::MESH.
References MEDMEM::MESH::_connectivity, and fillConnectivity().
int MEDMEM::GRID::getNumberOfElements | ( | MED_EN::medEntityMesh | entity, | |
MED_EN::medGeometryElement | Type | |||
) | const [virtual] |
Return the number of element of given geometric type of given entity. Return 0 if query is not defined.
Reimplemented from MEDMEM::MESH.
References _iArrayLength, _jArrayLength, _kArrayLength, MEDMEM::MESH::_numberOfNodes, and MEDMEM::MESH::_spaceDimension.
Referenced by getNumberOfElementsWithPoly().
int MEDMEM::GRID::getNumberOfElementsWithPoly | ( | MED_EN::medEntityMesh | Entity, | |
MED_EN::medGeometryElement | Type | |||
) | const [virtual] |
Reimplemented from MEDMEM::MESH.
References getNumberOfElements().
bool MEDMEM::GRID::existConnectivity | ( | MED_EN::medConnectivity | connectivityType, | |
MED_EN::medEntityMesh | entity | |||
) | const [virtual] |
Return true if the wanted connectivity exist, else return false (to use before a getSomething method).
Reimplemented from MEDMEM::MESH.
References MEDMEM::MESH::_connectivity, and fillConnectivity().
MED_EN::medGeometryElement MEDMEM::GRID::getElementType | ( | MED_EN::medEntityMesh | Entity, | |
int | Number | |||
) | const [virtual] |
Return the geometric type of global element Number of entity Entity.
Throw an exception if Entity is not defined or Number are wrong (too big).
Reimplemented from MEDMEM::MESH.
References MEDMEM::MESH::_connectivity, and fillConnectivity().
Referenced by getElementTypeWithPoly().
MED_EN::medGeometryElement MEDMEM::GRID::getElementTypeWithPoly | ( | MED_EN::medEntityMesh | Entity, | |
int | Number | |||
) | const [virtual] |
Method equivalent to getElementType except that it includes not only classical Types but polygons/polyhedra also.
Reimplemented from MEDMEM::MESH.
References getElementType().
void MEDMEM::GRID::calculateConnectivity | ( | MED_EN::medModeSwitch | Mode, | |
MED_EN::medConnectivity | ConnectivityType, | |||
MED_EN::medEntityMesh | entity | |||
) | const [virtual] |
Calculate the ask connectivity. Return an exception if this could not be done. Do nothing if connectivity already exist.
Reimplemented from MEDMEM::MESH.
References MEDMEM::MESH::_connectivity, and fillConnectivity().
const CONNECTIVITY * MEDMEM::GRID::getConnectivityptr | ( | ) | const [virtual] |
Reimplemented from MEDMEM::MESH.
References MEDMEM::MESH::_connectivity, and fillConnectivity().
const int * MEDMEM::GRID::getConnectivity | ( | MED_EN::medModeSwitch | Mode, | |
MED_EN::medConnectivity | ConnectivityType, | |||
MED_EN::medEntityMesh | entity, | |||
MED_EN::medGeometryElement | Type | |||
) | const [virtual] |
Return the required connectivity in the right mode for the given geometric type of the given entity.
To get connectivity for all geometric type, use Mode=MED_FULL_INTERLACE and Type=MED_ALL_ELEMENTS. You must also get the corresponding index array.
Reimplemented from MEDMEM::MESH.
References MEDMEM::MESH::_connectivity, and fillConnectivity().
const int * MEDMEM::GRID::getConnectivityIndex | ( | MED_EN::medConnectivity | ConnectivityType, | |
MED_EN::medEntityMesh | entity | |||
) | const [virtual] |
Return the required index array for a connectivity received in MED_FULL_ENTERLACE mode and MED_ALL_ELEMENTS type.
This array allow to find connectivity of each elements.
Example : Connectivity of i^{th} elements (1<=i<=NumberOfElement) begin at index ConnectivityIndex[i-1] and end at index ConnectivityIndex[i]-1 in Connectivity array (Connectivity[ConnectivityIndex[i-1]-1] is the first value)
Reimplemented from MEDMEM::MESH.
References MEDMEM::MESH::_connectivity, and fillConnectivity().
const int * MEDMEM::GRID::getReverseConnectivity | ( | MED_EN::medConnectivity | ConnectivityType, | |
MED_EN::medEntityMesh | Entity = MED_EN::MED_CELL | |||
) | const [virtual] |
Return the reverse connectivity required by ConnectivityType :
You must get ReverseConnectivityIndex array to use it.
Reimplemented from MEDMEM::MESH.
References MEDMEM::MESH::_connectivity, and fillConnectivity().
const int * MEDMEM::GRID::getReverseConnectivityIndex | ( | MED_EN::medConnectivity | ConnectivityType, | |
MED_EN::medEntityMesh | Entity = MED_EN::MED_CELL | |||
) | const [virtual] |
Return the index array required by ConnectivityType.
This array allow to find reverse connectivity of each elements.
Example : Reverse connectivity of i^{th} elements (1<=i<=NumberOfElement) begin at index ReverseConnectivityIndex[i-1] and end at index ReverseConnectivityIndex[i]-1 in ReverseConnectivity array ( ReverseConnectivity[ReverseConnectivityIndex[i-1]-1] is the first value)
Reimplemented from MEDMEM::MESH.
References MEDMEM::MESH::_connectivity, and fillConnectivity().
void MEDMEM::GRID::setGridType | ( | MED_EN::med_grid_type | gridType | ) |
References _gridType.
friend class IMED_MESH_RDONLY_DRIVER [friend] |
Reimplemented from MEDMEM::MESH.
friend class IMED_MESH_WRONLY_DRIVER [friend] |
Reimplemented from MEDMEM::MESH.
friend class MED_MESH_RDONLY_DRIVER21 [friend] |
Reimplemented from MEDMEM::MESH.
friend class MED_MESH_WRONLY_DRIVER21 [friend] |
Reimplemented from MEDMEM::MESH.
friend class MED_MESH_RDONLY_DRIVER22 [friend] |
Reimplemented from MEDMEM::MESH.
friend class MED_MESH_WRONLY_DRIVER22 [friend] |
Reimplemented from MEDMEM::MESH.
friend class ENSIGHT_MESH_RDONLY_DRIVER [friend] |
Reimplemented from MEDMEM::MESH.
MED_EN::med_grid_type MEDMEM::GRID::_gridType [protected] |
Referenced by fillMeshAfterRead(), GRID(), init(), and setGridType().
int MEDMEM::GRID::_iArrayLength [protected] |
Referenced by fillConnectivity(), fillCoordinates(), getCellNumber(), getNodeNumber(), getNumberOfElements(), GRID(), and init().
double* MEDMEM::GRID::_iArray [protected] |
Referenced by fillCoordinates(), GRID(), init(), and ~GRID().
int MEDMEM::GRID::_jArrayLength [protected] |
Referenced by fillConnectivity(), fillCoordinates(), getCellNumber(), getNodeNumber(), getNumberOfElements(), GRID(), and init().
double* MEDMEM::GRID::_jArray [protected] |
Referenced by fillCoordinates(), GRID(), init(), and ~GRID().
int MEDMEM::GRID::_kArrayLength [protected] |
Referenced by fillConnectivity(), fillCoordinates(), getNumberOfElements(), GRID(), and init().
double* MEDMEM::GRID::_kArray [protected] |
Referenced by fillCoordinates(), GRID(), init(), and ~GRID().
bool MEDMEM::GRID::_is_coordinates_filled [protected] |
Referenced by fillCoordinates(), fillMeshAfterRead(), GRID(), and init().
bool MEDMEM::GRID::_is_connectivity_filled [protected] |
Referenced by fillConnectivity(), fillMeshAfterRead(), GRID(), and init().
bool MEDMEM::GRID::_is_default_gridType [protected] |