GemaCoreLib
The GeMA Core library
Public Member Functions | List of all members
GmHElement Class Referenceabstract

Hierarchical element. More...

#include <gmElement.h>

Inheritance diagram for GmHElement:
Inheritance graph
[legend]
Collaboration diagram for GmHElement:
Collaboration graph
[legend]

Public Member Functions

virtual int hPOrder () const =0
 Returns the element P order. This is really a mesh parameter that can be queried through the element as a (huge) convenience.
 
virtual int hQOrder () const =0
 Returns the element Q order. This is really a mesh parameter that can be queried through the element as a (huge) convenience.
 
virtual GmCellGeometry geometry () const
 See comments on the base class.
 
virtual const GmShapeshape () const
 See comments on the base class.
 
virtual const GmShapelinearShape () const
 See comments on the base class.
 
- Public Member Functions inherited from GmElement
virtual void naturalCenter (GmVector &coord) const
 
virtual void borderNormal (const GmValueAccessor *nodeAccessor, int border, const GmVector *coord, GmVector &n) const
 Returns (by filling n) the normal vector, pointing outwards, for the given border and border point (in natural coordinates). More...
 
virtual bool borderNormalIsConstant (int border) const
 Returns true if the given border normal is constant (independs from the border position)
 
virtual void borderTangent (const GmValueAccessor *nodeAccessor, int border, GmVector &t) const
 Returns (by filling t) the tangential vector, aligned with nodal incidence.
 
- Public Member Functions inherited from GmCell
virtual ~GmCell ()
 Virtual destructor.
 
virtual int cellId () const =0
 Returns a number identifying the cell. It should be possible to use this id as an index to GmCellMesh::cell() or to get values from a cell attribute accessor.
 
virtual GmCellMeshmesh () const =0
 Returns the "father" mesh for this cell.
 
virtual bool active () const =0
 Is this cell active ? When looping over the cell list, this function should be probably called to ensure that only active cells are processed. Alternatively, use the GmForeachActiveCell() macro.
 
virtual void pushProxy (lua_State *L, const GmLogCategory &logger)=0
 Pushes a proxy object for the current cell onto the Lua stack. More...
 
virtual GmCellType type () const =0
 Returns the cell type.
 
const char * typeStr () const
 Returns a name describing the cell type.
 
virtual int numNodes () const =0
 Returns the number of nodes of this cell. Equivalent to typeToNumNodes(type()) but usually much more efficient;.
 
virtual int numGhostNodes () const
 Returns the number of ghost nodes of this cell, if any.
 
virtual int totalNumNodes () const
 Returns the total number of nodes of the cell, including normal nodes & ghost nodes.
 
virtual int nodeIndex (int localIndex) const =0
 Returns the global node index used to locate node coordinates for each of the cell nodes. More...
 
virtual void nodes (int *nodeList, bool ghost) const =0
 Fills the vector nodeList with the set of cell nodes, including or not eventual ghost nodes depending on the boolean ghost parameter. The vector size must be equal to numNodes() if ghost is false or equal to totalNumNodes() if true. Returned indices follow the same rule detailed for nodeIndex() with respect to ghost nodes.
 
virtual int propertyIndex (int propertySet) const =0
 Given a property set number, returns the line of the property set that contains property values for this cell. The returned value can be used to get a property from a property accessor retrieved from this mesh. More...
 
virtual void setActive (bool active)=0
 Marks the cell as active or inactive. Inactive cells are not processed by several of the algorithms, such as analysis processes.
 
virtual bool setNodes (const int *nodeList)
 Function allowing editable meshes to set the node list of newlly created cells. More...
 
virtual int addGhostNode (int globalIndex)
 Adds a new ghost node to the cell, returning the new node local index or -1 if there was a problem adding the node. More...
 
virtual void removeGhostNode (int localIndex)
 Removes a ghost node from the cell definition given its local index. More...
 
virtual bool setProperties (const int *propList, int nprop)
 Function allowing editable meshes to set the property indices of newlly created cells. More...
 
GmCelladjacentCell (int sideIndex, int *adjSideIndex=NULL) const
 Returns the adjacent cell sharing the given side, represented by a cell edge index for surface meshes or by a cell face index for solid mehses. More...
 
double length (const GmValueAccessor *coordAccessor, int edgeIndex=0, GmCellGeometryMode linearMode=GM_CELLGEOM_AUTO) const
 Returns the length of a 1D element, the length of a 2D interface element, or the length of the given edge for other element types, with node coordinates given by the provided accessor. More...
 
double length (const GmMatrix &X, int edgeIndex=0, GmCellGeometryMode linearMode=GM_CELLGEOM_AUTO) const
 Returns the length of a 1D element, the length of a 2D interface element, or the length of the given edge for other element types, with node coordinates defined by the X matrix (with node coordinates organized by column) More...
 
double area (const GmValueAccessor *coordAccessor, int faceIndex=0, GmCellGeometryMode linearMode=GM_CELLGEOM_AUTO) const
 Returns the area of a 2D (non interface) element, the area of a 3D interface element, or the area of the given face for 3D (non interface) element types, with node coordinates given by the provided accessor. More...
 
double area (const GmMatrix &X, int faceIndex=0, GmCellGeometryMode linearMode=GM_CELLGEOM_AUTO) const
 Returns the area of a 2D (non interface) element, the area of a 3D interface element, or the area of the given face for 3D (non interface) element types, with node coordinates defined by the X matrix (with node coordinates organized by column) More...
 
double volume (const GmValueAccessor *coordAccessor, GmCellGeometryMode linearMode=GM_CELLGEOM_AUTO) const
 Returns the volume of a 3D element with node coordinates given by the provided accessor. More...
 
double volume (const GmMatrix &X, GmCellGeometryMode linearMode=GM_CELLGEOM_AUTO) const
 Returns the volume of a 3D element with node coordinates defined by the X matrix (with node coordinates organized by column) More...
 
double characteristicLength (const GmValueAccessor *coordAccessor, GmCellGeometryMode linearMode=GM_CELLGEOM_AUTO) const
 Returns the cell characteristic length, defined as the length for 1D and 2D interface elements, the square root of the area for non iterface 2D and 3D interface elements and the cubic root of the volume for non interface 3D elements. More...
 
double characteristicLength (const GmMatrix &X, GmCellGeometryMode linearMode=GM_CELLGEOM_AUTO) const
 Returns the cell characteristic length, defined as the length for 1D and 2D interface elements, the square root of the area for non iterface 2D and 3D interface elements and the cubic root of the volume for non interface 3D elements. More...
 
double characteristicDimension (const GmValueAccessor *coordAccessor, GmCellGeometryMode linearMode=GM_CELLGEOM_AUTO) const
 Returns the cell characteristic dimension, defined as the length for 1D and 2D interface elements, the area for non iterface 2D and 3D interface elements and the volume for non interface 3D elements. More...
 
double characteristicDimension (const GmMatrix &X, GmCellGeometryMode linearMode=GM_CELLGEOM_AUTO) const
 Returns the cell characteristic dimension, defined as the length for 1D and 2D interface elements, the area for non iterface 2D and 3D interface elements and the volume for non interface 3D elements. More...
 
void centroidCartesian (const GmValueAccessor *coordAccessor, GmVector &coord, GmCellGeometryMode linearMode=GM_CELLGEOM_AUTO) const
 Fills the coord vector with the cartesian coordinates for the cell centroid. More...
 
void centroidCartesian (const GmMatrix &X, GmVector &coord, GmCellGeometryMode linearMode=GM_CELLGEOM_AUTO) const
 Fills the coord vector with the cartesian coordinates for the cell centroid. More...
 
virtual bool isValid (const GmValueAccessor *nodeAccessor, double tol=1e-5) const
 Checks if cell is geometrically valid tol is the relative tolerance for face planar test. More...
 
virtual double quality (const GmValueAccessor *nodeAccessor, double tol=1e-5) const
 Returns a normalized quality measure of the cell geometry, from 0 to 1, where 0.0 means very bad and 1.0 very good. If the cell geometry type does not implements the quality capability, this function will always return 0.0.
 
virtual bool contains (const GmValueAccessor *nodeAccessor, const GmVector &coord) const
 Returns true if the cell contains the point specified by the given cartesian coordinates 'coord'. If the cell geometry type does not implements the contains capability, this function will always return false.
 
void fillNodeMatrix (const GmValueAccessor *nodeAccessor, GmMatrix &m, bool transposed=false, GmCellFillMode mode=GM_CELL_NODES) const
 Given a node accessor, fills the matrix 'm' with the coordinates of the cell nodes. More...
 
void fillFaceNodeMatrix (const GmValueAccessor *nodeAccessor, GmMatrix &m, int faceIndex, bool transposed=false, GmCellFillMode mode=GM_CELL_NODES) const
 Similar to fillNodeMatrix() but filling m with the node coordinates for the given 3D element face. Nodes are orderer according to the equivalent face element type, as returned by GmCellGeomtry::faceElement() or faceLinearElement() if mode is GM_CELL_VERTICES. NOT defined if the face type is GM_INV_CELL_TYPE (this includes all surface elements). More...
 
void fillEdgeNodeMatrix (const GmValueAccessor *nodeAccessor, GmMatrix &m, int edgeIndex, bool transposed=false, GmCellFillMode mode=GM_CELL_NODES) const
 Similar to fillNodeMatrix() but filling m with the node coordinates for the given element edge. Nodes are orderer according to the equivalent edge element type, as returned by GmCellGeomtry::edgeElement() or edgeLinearElement() if mode is GM_CELL_VERTICES. NOT defined if the edge type is GM_INV_CELL_TYPE (this includes all bar elements). More...
 
void fillDeformedNodeMatrix (const GmValueAccessor *nodeAccessor, const GmValueAccessor *uAccessor, GmMatrix &m, GmVector &u, bool transposed=false, GmCellFillMode mode=GM_CELL_NODES) const
 
void fillDeformedFaceNodeMatrix (const GmValueAccessor *nodeAccessor, const GmValueAccessor *uAccessor, GmMatrix &m, GmVector &u, int faceIndex, bool transposed=false, GmCellFillMode mode=GM_CELL_NODES) const
 Similar to fillDeformedNodeMatrix() but filling m & u with the node coordinates / deformation for the given element face. Nodes are orderer according to the. More...
 
void fillDeformedEdgeNodeMatrix (const GmValueAccessor *nodeAccessor, const GmValueAccessor *uAccessor, GmMatrix &m, GmVector &u, int edgeIndex, bool transposed=false, GmCellFillMode mode=GM_CELL_NODES) const
 Similar to fillDeformedNodeMatrix() but filling m & u with the node coordinates / deformation for the given element edge. Nodes are orderer according to the equivalent edge element type, as returned by GmCellGeomtry::edgeElement() or edgeLinearElement() if mode is GM_CELL_VERTICES. More...
 
virtual int meshId () const =0
 Returns the meshId associated with mesh(). Ugly. Needed by the GeMA mesh implementation.
 
virtual void replaceCellId (int id, bool keepActiveFlag)
 Updates the cell id. For those who really know what they are doing. This function is a very specific function that should not be called lightly. It exists on behalf of the state dumping code and for helping other mesh implementations wisshng to encode extra iformation on the cell id. More...
 
virtual void replaceGhostNodes (int *ghostNodes, int numNodes)
 Replaces the full set of ghost nodes of the cell. This function is a very specific function that should not be called lightly. It exists on behalf of the state dumping code. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from GmCell
static int typeToNumNodes (GmCellType type)
 Returns the number of nodes associated to the cell type.
 
static const char * typeToStr (GmCellType type)
 Converts a cell type to a string.
 
static int strToType (QString str)
 Converts a string to a cell type. Returns -1 if no match is found.
 

Detailed Description

Hierarchical element.


The documentation for this class was generated from the following file: