![]() |
GemaCoreLib
The GeMA Core library
|
An auxiliary class that can be used as base for solid elements. Implements the needed integration rule factories (main element + edge + face). More...
#include <gmCellGeometryInfo.h>
Public Member Functions | |
GmCellGeometryInfoSolidElement (GmCellGeometryMetadata &&metadata) | |
Constructor receiving as parameter a metadata object that will be MOVED to the new object. | |
virtual GmIntegrationRule * | integrationRule (GmIntegrationRuleType irType, int rule1, int rule2, int rule3, int P, int Q) const |
A factory function that returns a new integration rule object suited for this kind of element. More... | |
virtual GmBorderIntegrationRule * | edgeIntegrationRule (GmIntegrationRuleType irType, int rule1, int P, int Q) const |
A factory function that returns a new border integration rule object suited for this kind of element. Edge rules are used to integrate functions over an element edge. This function is undefined for line elements and should return NULL in those cases. More... | |
virtual GmBorderIntegrationRule * | faceIntegrationRule (int faceType, GmIntegrationRuleType irType, int rule1, int rule2, int P, int Q) const |
A factory function that returns a new border integration rule object suited for this kind of element. Face rules are used to integrate functions over an element face. This function is undefined for line or 2D elements and should return NULL in those cases. More... | |
![]() | |
GmCellGeometryInfo (const GmCellGeometryInfo &other) | |
Standard copy constructor receiving the type metadata. | |
GmCellGeometryInfo (GmCellGeometryMetadata &&metadata) | |
Standard move constructor receiving the type metadata. | |
virtual GmShape * | shapeInstance (int P, int Q) const =0 |
Shape function factory. Should return a NEW instance of the shape function object for this type. Should return NULL if the type has no associated shape function. P and Q are needed only when working with hierarchical element types and will have a value of 0 for "normal" types. | |
virtual double | dimension (const GmMatrix &X) const =0 |
Virtual function responsible for returning 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. Element node coordinates are given by the X matrix (with node coordinates organized by column). See comments on the length(), area() and volume() functions for the GmCellGeometry class. | |
virtual void | centroidCartesian (const GmMatrix &X, GmVector &coord) const =0 |
Virtual function responsible for filling the coord vector with the cartesian coordinates of the cell centroid, with nodes defined by the X matrix (with node coordinates organized by column). See comments on GmCellGeometry::centroidCartesian(). | |
virtual bool | isValid (const GmMatrix &X, double tol) const |
Virtual method that should be implemented if this geometry info supports the GM_CELL_GEOMETRY_VALID capability. It should implement geometry checks, like orientation, convexity or self intersection checks to check a cell validity. If the capability is not implemented, this function should simply return true. The X matrix holds the cell node coordinates organized by column. The tol is the relative tolerance used for planar/colinear tests. | |
virtual double | quality (const GmMatrix &J, double tol) const |
Virtual method that should be implemented if this geometry info supports the GM_CELL_GEOMETRY_QUALITY capability. It should return 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 capability is not implemented, this function should simply return 0.0. The J matrix is the Jacobian. | |
virtual bool | contains (const GmMatrix &X, const GmVector &coord) const |
Virtual method that should be implemented if this geometry info supports the GM_CELL_GEOMETRY_CONTAINS capability. It should returns true if the cell contains the point specified by the given cartesian coordinates 'coord'. If the capability is not implemented, this function should simply return false. The X matrix holds the cell node coordinates organized by column. | |
const GmIntegrationRule * | cellIntegrationRule () const |
Returns the default integration rule for the current geometry type. | |
double | dimensionByIntegration (const GmMatrix &X, const GmIntegrationRule *ir=NULL) const |
Given a cell geometry defined by matrix X (with node coordinates organized by column) performs a numerical integration using the given integration rule to calculate either the cell length, area or volume, depending on the cell type. If ir is NULL, the default integration rule for the type is used. More... | |
void | centroidByIntegration (const GmMatrix &X, GmVector &coord, const GmIntegrationRule *ir=NULL) const |
Given a cell geometry defined by matrix X (with node coordinates organized by column) performs a numerical integration using the given integration rule to calculate the cell centroid, filling coord. If ir is NULL, the default integration rule for the type is used. | |
![]() | |
GmCellGeometryMetadata (const GmCellGeometryMetadata &other)=default | |
Copy constructor. | |
GmCellGeometryMetadata (GmCellGeometryMetadata &&other)=default | |
Move constructor. | |
Additional Inherited Members | |
![]() | |
GmCellType | _type |
The cell type. | |
const char * | _name |
The cell type name. | |
GmCellFamilyType | _family |
The family that this cell type belongs to. | |
bool | _interface |
Is this cell an interface element? | |
bool | _hierarchical |
Is this cell an hierarchical element (needing P & Q order parameters?) | |
int | _order |
The cell order (1: linear, 2: quadratic, 3: cubic, ...) | |
GmCellType | _eqLinearType |
The equivalent linear element. | |
int | _nnodes |
Number of cell nodes. | |
int | _nvertices |
Number of cell vertices. Excludes "quadratic" nodes and extra dof nodes. See comments for GmCellGeometry::numVertices(). | |
int | _nextraDofNodes |
Number of extra dof nodes. Usually 0. See comments for GmCellGeometry::numVertices(). | |
int | _ncoord |
The number of cartesian coordinates for nodes of this cell type. | |
int | _nedges |
Number of cell edges. | |
int | _nfaces |
Number of cell faces. | |
int | _nfaceTypes |
Number of face types for a 3D element. 1 For surface elements. | |
bool | _capabilities [GM_CELL_GEOMETRY_CAPABILITY_COUNT] |
QVector< EdgeNodeData > | _edgeNodeInfo |
Node information for each cell's edge. Size equal to "nedges". | |
QVector< QVector< int > > | _faceEdgeInfo |
Edge information for each cell's face, ordered according to the cell's face description. Empty for 1D elements. | |
QVector< QVector< int > > | _edgeFaceInfo |
Face information for each cell's edge. | |
QVector< FaceNodeData > | _faceNodeInfo |
Node information for each cell's face. Size equal to "nfaces". Empty for 1D elements. | |
QVector< QVector< int > > | _nodeIncidenceInfo |
Node incidence information for each cell's node. Size equal to "nnodes". | |
QVector< int > | _volumeNodeInfo |
Mid volume node list. | |
An auxiliary class that can be used as base for solid elements. Implements the needed integration rule factories (main element + edge + face).
|
inlinevirtual |
A factory function that returns a new border integration rule object suited for this kind of element. Edge rules are used to integrate functions over an element edge. This function is undefined for line elements and should return NULL in those cases.
Parameter irType defines the kind on integration rule that should be used (Gauss or Lobatto, for example). Parameter rule1 is used to pass an specific rule type for derived classes and should be ignored if irrelevant. A value of -1 means that the rule parameter is unused.
If the given parameters are different from -1 and do not express a valid rule, or irType is not valid or unimplemented for this kind of element, returns NULL. In particular, implementations of this routine should return a default (valid) rule for the element when called with irType == auto and all rule values equal to -1.
P and Q are needed only when working with hierarchical element types, where they can be used to define default rule values. For "normal" elements, 0 will be provided for both P and Q.
Implements GmCellGeometryInfo.
|
inlinevirtual |
A factory function that returns a new border integration rule object suited for this kind of element. Face rules are used to integrate functions over an element face. This function is undefined for line or 2D elements and should return NULL in those cases.
The faceType parameter can be used to identify the desired face type for elements with more than one face type (like a wedge that has 3 quadrilateral faces and 2 triangular faces). In that case, faceType should be a GmCellFaceType value. If the element has only one face type, -1 can be passed to the faceType parameter (if the value is not -1, it MUST be equal to one of the type's face type).
Parameter irType defines the kind on integration rule that should be used (Gauss or Lobatto, for example). Parameters rule1 and rule2 are used to pass an specific rule type for derived classes and should be ignored if irrelevant. A value of -1 means that the rule parameter is unused.
If the given parameters are different from -1 and do not express a valid rule, or irType is not valid or unimplemented for this kind of element, returns NULL. In particular, implementations of this routine should return a default (valid) rule for the element when called with irType == auto and all rule values equal to -1.
P and Q are needed only when working with hierarchical element types, where they can be used to define default rule values. For "normal" elements, 0 will be provided for both P and Q.
Implements GmCellGeometryInfo.
|
inlinevirtual |
A factory function that returns a new integration rule object suited for this kind of element.
Parameter irType defines the kind on integration rule that should be used (Gauss or Lobatto, for example). Parameters rule1, rule2 and rule3 are used to pass an specific rule type for derived classes and should be ignored if irrelevant. A value of -1 means that the rule parameter is unused.
If the given parameters are different from -1 and do not express a valid rule, or irType is not valid or unimplemented for this kind of element, returns NULL. In particular, implementations of this routine should return a default (valid) rule for the element when called with irType == auto and all rule values equal to -1.
P and Q are needed only when working with hierarchical element types, where they can be used to define default rule values. For "normal" elements, 0 will be provided for both P and Q.
Implements GmCellGeometryInfo.