#include <MEDMEM_Grid.hxx>

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) | |
| Reads a GRID form the file. | |
| 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) | |
| Constructor specifying the axes of the grid. | |
| GRID & | operator= (const GRID &m) |
| virtual | ~GRID () |
| virtual void | init () |
| virtual bool | deepCompare (const GMESH &other) const |
| virtual void | printMySelf (std::ostream &os) const |
| print my contents | |
| virtual const MESH * | convertInMESH () const |
| Create an unstructured MESH. Call removeReference() after having finished using it!!! | |
| virtual int | getMeshDimension () const |
| Return mesh dimension. | |
| virtual bool | getIsAGrid () const |
| It is a grid. | |
| virtual int | getNumberOfNodes () const |
| Return number of nodes. | |
| virtual std::string | getCoordinatesSystem () const |
| virtual const std::string * | getCoordinatesNames () const |
| virtual const std::string * | getCoordinatesUnits () const |
| virtual int | getNumberOfTypes (MED_EN::medEntityMesh Entity) const |
| virtual int | getNumberOfElements (MED_EN::medEntityMesh Entity, MED_EN::medGeometryElement Type) const |
| virtual const MED_EN::medGeometryElement * | getTypes (MED_EN::medEntityMesh Entity) const |
| virtual MED_EN::medGeometryElement | getElementType (MED_EN::medEntityMesh Entity, int Number) const |
| virtual SUPPORT * | getBoundaryElements (MED_EN::medEntityMesh Entity) const throw (MEDEXCEPTION) |
| virtual SUPPORT * | getSkin (const SUPPORT *Support3D) throw (MEDEXCEPTION) |
| virtual SUPPORT * | buildSupportOnNodeFromElementList (const std::list< int > &listOfElt, MED_EN::medEntityMesh entity) const throw (MEDEXCEPTION) |
| virtual void | fillSupportOnNodeFromElementList (const std::list< int > &listOfElt, SUPPORT *supportToFill) const throw (MEDEXCEPTION) |
| virtual FIELD< double > * | getVolume (const SUPPORT *Support, bool isAbs=true) const throw (MEDEXCEPTION) |
| virtual FIELD< double > * | getArea (const SUPPORT *Support) const throw (MEDEXCEPTION) |
| virtual FIELD< double > * | getLength (const SUPPORT *Support) const throw (MEDEXCEPTION) |
| virtual FIELD< double > * | getNormal (const SUPPORT *Support) const throw (MEDEXCEPTION) |
| virtual FIELD< double > * | getBarycenter (const SUPPORT *Support) const throw (MEDEXCEPTION) |
| virtual vector< vector< double > > | getBoundingBox () const |
| 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) |
| 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 | |
| virtual bool | isEmpty () const |
| Return true if contains no elements. | |
Protected Attributes | |
| MED_EN::med_grid_type | _gridType |
| COORDINATE * | _coordinate |
| int | _iArrayLength |
| double * | _iArray |
| int | _jArrayLength |
| double * | _jArray |
| int | _kArrayLength |
| double * | _kArray |
| bool | _is_default_gridType |
Friends | |
| class | MED_MESH_RDONLY_DRIVER |
| class | MED_MESH_WRONLY_DRIVER |
| class | ENSIGHT_MESH_RDONLY_DRIVER |
| GRID::GRID | ( | ) |
References init, and MESSAGE_MED.
| GRID::GRID | ( | const MED_EN::med_grid_type | type | ) |
| GRID::GRID | ( | const GRID & | m | ) |
| GRID::GRID | ( | driverTypes | driverType, |
| const string & | fileName, | ||
| const string & | driverName | ||
| ) |
Reads a GRID form the file.
| driverType | - type of driver to read the specified file |
| fileName | - the file name to read |
| driverName | - name of a grid to read |
References BEGIN_OF_MED, MEDMEM.DRIVERFACTORY.buildDriverForMesh(), END_OF_MED, MEDMEM.GRID.init(), and MED_EN.RDONLY.
| GRID::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 |
||
| ) |
Constructor specifying the axes of the grid.
This constructor describes the grid by specifying the location of the nodes on each of the axis. The dimension of the grid is implicitly defined by the size of vector xyz_array.
| xyz_array | specifies the node coordinates for each direction |
| coord_name | names of the different coordinates |
| coord_unit | names of the different coordinate units |
| type | grid type (MED_POLAR, MED_CARTESIAN) |
References MEDMEM.GRID._coordinate, MEDMEM.GRID._gridType, MEDMEM.GRID._iArray, MEDMEM.GRID._iArrayLength, MEDMEM.GRID._is_default_gridType, MEDMEM.GRID._jArray, MEDMEM.GRID._jArrayLength, MEDMEM.GRID._kArray, MEDMEM.GRID._kArrayLength, MEDMEM.GMESH._spaceDimension, med_test1.begin, med_test1.end, MEDMEM.GRID.init(), MED_EN.MED_CARTESIAN, MED_EN.MED_POLAR, and MEDMEM.COORDINATE.setCoordinatesSystem().
| GRID::~GRID | ( | ) | [virtual] |
References MEDMEM.GRID._coordinate, MEDMEM.GRID._iArray, MEDMEM.GRID._jArray, MEDMEM.GRID._kArray, and MESSAGE_MED.
| bool GRID::isEmpty | ( | ) | const [protected, virtual] |
Return true if contains no elements.
Implements MEDMEM.GMESH.
References MEDMEM.GRID._coordinate, and MEDMEM.GRID._iArrayLength.
| void GRID::init | ( | ) | [virtual] |
| bool GRID::deepCompare | ( | const GMESH & | gother | ) | const [virtual] |
Returns true if mesh other has same coordinates (to 1E-15 precision ) and same connectivity as the calling object. Information like name or description is not taken into account for the comparison.
Implements MEDMEM.GMESH.
References MEDMEM.GRID._coordinate, MEDMEM.GRID._gridType, MEDMEM.GRID._iArray, MEDMEM.GRID._iArrayLength, MEDMEM.GRID._jArray, MEDMEM.GRID._jArrayLength, MEDMEM.GRID._kArray, MEDMEM.GRID._kArrayLength, MEDMEM.COORDINATE.getCoordinates(), MEDMEM.GRID.getIsAGrid(), MEDMEM.GMESH.getIsAGrid(), MEDMEM.COORDINATE.getNumberOfNodes(), MEDMEM.GMESH.getSpaceDimension(), MED_EN.MED_FULL_INTERLACE, and test_NonCoincidentDEC.size.
| void GRID::printMySelf | ( | std::ostream & | os | ) | const [virtual] |
print my contents
Implements MEDMEM.GMESH.
| const MESH * GRID::convertInMESH | ( | ) | const [virtual] |
Create an unstructured MESH. Call removeReference() after having finished using it!!!
Implements MEDMEM.GMESH.
References MEDMEM.GRID._coordinate, MEDMEM.GRID._gridType, MEDMEM.GMESH._groupCell, MEDMEM.GMESH._groupEdge, MEDMEM.GMESH._groupFace, MEDMEM.GMESH._groupNode, MEDMEM.GRID._iArray, MEDMEM.GRID._iArrayLength, MEDMEM.GRID._jArray, MEDMEM.GRID._jArrayLength, MEDMEM.GRID._kArray, MEDMEM.GRID._kArrayLength, MEDMEM.GMESH._spaceDimension, MEDMEM.MESHING.addGroup(), testRenumbering.conn, coords, MEDMEM.COORDINATE.getCoordinates(), MEDMEM.GRID.getCoordinatesNames(), MEDMEM.GRID.getCoordinatesSystem(), MEDMEM.GRID.getCoordinatesUnits(), MEDMEM.GMESH.getName(), MEDMEM.GRID.getNodeNumber(), MEDMEM.GRID.getNumberOfElements(), MEDMEM.GRID.getNumberOfNodes(), MEDMEM.GRID.getNumberOfTypes(), MEDMEM.GMESH.getSpaceDimension(), MEDMEM.GRID.getTypes(), LOCALIZED, MED_EN.MED_ALL_ELEMENTS, MED_EN.MED_BODY_FITTED, MED_EN.MED_CELL, MED_EN.MED_EDGE, MED_EN.MED_FACE, MED_EN.MED_FULL_INTERLACE, MED_test2.mesh, TestMedCorba4.n1, MEDMEM.PointerOf< T >.set(), MEDMEM.MESHING.setConnectivity(), MEDMEM.MESHING.setCoordinates(), MEDMEM.MESHING.setCoordinatesNames(), MEDMEM.MESHING.setCoordinatesUnits(), MEDMEM.GMESH.setName(), MEDMEM.MESHING.setNumberOfElements(), MEDMEM.MESHING.setNumberOfTypes(), MEDMEM.MESHING.setTypes(), and test_NonCoincidentDEC.size.
| int GRID::getMeshDimension | ( | ) | const [virtual] |
| bool GRID::getIsAGrid | ( | ) | const [virtual] |
It is a grid.
Implements MEDMEM.GMESH.
| int GRID::getNumberOfNodes | ( | ) | const [virtual] |
Return number of nodes.
Implements MEDMEM.GMESH.
References MEDMEM.GRID._coordinate, MEDMEM.GRID._gridType, MEDMEM.GRID._iArrayLength, MEDMEM.GRID._jArrayLength, MEDMEM.GRID._kArrayLength, MEDMEM.GMESH._spaceDimension, MEDMEM.COORDINATE.getNumberOfNodes(), and MED_EN.MED_BODY_FITTED.
| std::string GRID::getCoordinatesSystem | ( | ) | const [virtual] |
Returns "CARTESIAN", "CYLINDRICAL" or "SPHERICAL"
Implements MEDMEM.GMESH.
References MEDMEM.GRID._coordinate, and MEDMEM.COORDINATE.getCoordinatesSystem().
| const std::string * GRID::getCoordinatesNames | ( | ) | const [virtual] |
Returns an array with names of coordinates.
Example :
Implements MEDMEM.GMESH.
References MEDMEM.GRID._coordinate, and MEDMEM.COORDINATE.getCoordinatesNames().
| const std::string * GRID::getCoordinatesUnits | ( | ) | const [virtual] |
Returns an array with units of coordinates (cm, m, mm, ...) It could be empty. We suppose we are IS (meter).
Implements MEDMEM.GMESH.
References MEDMEM.GRID._coordinate, and MEDMEM.COORDINATE.getCoordinatesUnits().
| int 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
Implements MEDMEM.GMESH.
References MESSAGE_MED.
| int 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.
Implements MEDMEM.GMESH.
References MEDMEM.GRID._iArrayLength, MEDMEM.GRID._jArrayLength, MEDMEM.GRID._kArrayLength, MEDMEM.GMESH._spaceDimension, MEDMEM.GRID.getMeshDimension(), MEDMEM.GRID.getNumberOfNodes(), MED_EN.MED_ALL_ELEMENTS, MED_EN.MED_CELL, MED_EN.MED_EDGE, MED_EN.MED_FACE, MED_EN.MED_HEXA8, MED_EN.MED_NODE, MED_EN.MED_NONE, MED_EN.MED_QUAD4, MED_EN.MED_SEG2, MESSAGE_MED, and medMeshing_test.numberOfElements.
| const medGeometryElement * GRID::getTypes | ( | MED_EN::medEntityMesh | entity | ) | const [virtual] |
return the GRID Geometric type, without computing all connectivity
Implements MEDMEM.GMESH.
References MEDMEM.GMESH._spaceDimension, LOCALIZED, MED_EN.MED_CELL, MED_EN.MED_EDGE, MED_EN.MED_FACE, MED_EN.MED_HEXA8, MED_EN.MED_NODE, MED_EN.MED_POINT1, MED_EN.MED_QUAD4, and MED_EN.MED_SEG2.
| MED_EN::medGeometryElement GRID::getElementType | ( | MED_EN::medEntityMesh | Entity, |
| int | Number | ||
| ) | const [virtual] |
Return the geometric type of global element Number of entity Entity.
Implements MEDMEM.GMESH.
References MEDMEM.GRID.getTypes().
| SUPPORT * GRID::getBoundaryElements | ( | MED_EN::medEntityMesh | Entity | ) | const throw (MEDEXCEPTION) [virtual] |
Returns a support which reference all elements on the boundary of mesh. For a d-dimensional mesh, a boundary element is defined as a d-1 dimension element that is referenced by only one element in the full descending connectivity.
This method can also return the list of nodes that belong to the boundary elements.
WARNING: This method can recalculate descending connectivity from partial to full form, so that partial SUPPORT on d-1 dimension elements becomes invalid.
| Entity | entity on which the boundary is desired. It has to be either MED_NODE or the d-1 dimension entity type (MED_FACE in 3D, MED_EDGE in 2D). |
Implements MEDMEM.GMESH.
References LOCALIZED, MED_EN.MED_ALL_ELEMENTS, MED_EN.MED_EDGE, MED_EN.MED_FACE, MED_EN.MED_NODE, and MED_EN.MED_POLAR.
| SUPPORT * GRID::getSkin | ( | const SUPPORT * | Support3D | ) | throw (MEDEXCEPTION) [virtual] |
Implements MEDMEM.GMESH.
| SUPPORT * GRID::buildSupportOnNodeFromElementList | ( | const std::list< int > & | listOfElt, |
| MED_EN::medEntityMesh | entity | ||
| ) | const throw (MEDEXCEPTION) [virtual] |
Implements MEDMEM.GMESH.
| void GRID::fillSupportOnNodeFromElementList | ( | const std::list< int > & | listOfElt, |
| SUPPORT * | supportToFill | ||
| ) | const throw (MEDEXCEPTION) [virtual] |
Implements MEDMEM.GMESH.
| FIELD< double > * GRID::getVolume | ( | const SUPPORT * | Support, |
| bool | isAbs = true |
||
| ) | const throw (MEDEXCEPTION) [virtual] |
Implements MEDMEM.GMESH.
| FIELD< double > * GRID::getArea | ( | const SUPPORT * | Support | ) | const throw (MEDEXCEPTION) [virtual] |
Implements MEDMEM.GMESH.
| FIELD< double > * GRID::getLength | ( | const SUPPORT * | Support | ) | const throw (MEDEXCEPTION) [virtual] |
Implements MEDMEM.GMESH.
| FIELD< double > * GRID::getNormal | ( | const SUPPORT * | Support | ) | const throw (MEDEXCEPTION) [virtual] |
Implements MEDMEM.GMESH.
| FIELD< double > * GRID::getBarycenter | ( | const SUPPORT * | Support | ) | const throw (MEDEXCEPTION) [virtual] |
Implements MEDMEM.GMESH.
| vector< vector< double > > GRID::getBoundingBox | ( | ) | const [virtual] |
Implements MEDMEM.GMESH.
| int GRID::getEdgeNumber | ( | const int | Axis, |
| const int | i, | ||
| const int | j = 0, |
||
| const int | k = 0 |
||
| ) | const throw (MEDEXCEPTION) |
Edge position to number conversion method
References BEGIN_OF_MED, END_OF_MED, med_test_grid.I, med_test_grid.J, med_test_grid.K, LOCALIZED, and MED_EXCEPTION.
| int GRID::getFaceNumber | ( | const int | Axis, |
| const int | i, | ||
| const int | j = 0, |
||
| const int | k = 0 |
||
| ) | const throw (MEDEXCEPTION) |
Returns a NODE, EDGE, FACE, CELL number by its position in the grid. Axis [1,2,3] means one of directions: along i, j or k For Cell contituents (FACE or EDGE), Axis selects one of those having same (i,j,k):
References BEGIN_OF_MED, END_OF_MED, med_test_grid.I, med_test_grid.J, med_test_grid.K, LOCALIZED, and MED_EXCEPTION.
| void GRID::getNodePosition | ( | const int | Number, |
| int & | i, | ||
| int & | j, | ||
| int & | k | ||
| ) | const throw (MEDEXCEPTION) |
Node number to position conversion method
References BEGIN_OF_MED, END_OF_MED, med_test_grid.I, med_test_grid.J, LOCALIZED, and MED_EXCEPTION.
| void GRID::getCellPosition | ( | const int | Number, |
| int & | i, | ||
| int & | j, | ||
| int & | k | ||
| ) | const throw (MEDEXCEPTION) |
Cell number to position conversion method
References BEGIN_OF_MED, END_OF_MED, med_test_grid.I, and med_test_grid.J.
| void GRID::getEdgePosition | ( | const int | Number, |
| int & | Axis, | ||
| int & | i, | ||
| int & | j, | ||
| int & | k | ||
| ) | const throw (MEDEXCEPTION) |
Edge number to poistion conversion method
References BEGIN_OF_MED, END_OF_MED, med_test_grid.I, med_test_grid.J, med_test_grid.K, LOCALIZED, and MED_EXCEPTION.
| void GRID::getFacePosition | ( | const int | Number, |
| int & | Axis, | ||
| int & | i, | ||
| int & | j, | ||
| int & | k | ||
| ) | const throw (MEDEXCEPTION) |
Face number to position convertion method
References BEGIN_OF_MED, END_OF_MED, med_test_grid.I, med_test_grid.J, med_test_grid.K, LOCALIZED, and MED_EXCEPTION.
| MED_EN::med_grid_type MEDMEM.GRID::getGridType | ( | ) | const |
| int GRID::getArrayLength | ( | const int | Axis | ) | const throw (MEDEXCEPTION) |
Returns the number of nodes on axis number Axis (axis numbering starts at 1).
References LOCALIZED, and MED_EXCEPTION.
| const double GRID::getArrayValue | ( | const int | Axis, |
| const int | i | ||
| ) | const throw (MEDEXCEPTION) |
Returns the value of node coordinate i on axis Axis.
References LOCALIZED, and MED_EXCEPTION.
| void MEDMEM.GRID::setGridType | ( | MED_EN::med_grid_type | gridType | ) |
friend class MED_MESH_RDONLY_DRIVER [friend] |
Reimplemented from MEDMEM.GMESH.
friend class MED_MESH_WRONLY_DRIVER [friend] |
Reimplemented from MEDMEM.GMESH.
friend class ENSIGHT_MESH_RDONLY_DRIVER [friend] |
Reimplemented from MEDMEM.GMESH.
MED_EN::med_grid_type MEDMEM.GRID._gridType [protected] |
COORDINATE* MEDMEM.GRID._coordinate [protected] |
int MEDMEM.GRID._iArrayLength [protected] |
double* MEDMEM.GRID._iArray [protected] |
int MEDMEM.GRID._jArrayLength [protected] |
double* MEDMEM.GRID._jArray [protected] |
int MEDMEM.GRID._kArrayLength [protected] |
double* MEDMEM.GRID._kArray [protected] |
bool MEDMEM.GRID._is_default_gridType [protected] |