24#ifndef _GEMA_PYRA_CELL_GEOMETRY_INFO_H_
25#define _GEMA_PYRA_CELL_GEOMETRY_INFO_H_
106 GmPyraEdgeIntegrationRuleSet, GmLinearPyraEdgeIntegrationRuleSetDefaults,
107 GmPyraFaceIntegrationRuleSet, GmLinearPyraFaceIntegrationRuleSetDefaults>
134 int ret = GM_GEOMETRY_STATE_VALID;
135 if (!GmGeometryUtils::isCoplanar3D(X.col(0), X.col(1), X.col(2), X.col(3), tol)) ret |= GM_GEOMETRY_STATE_NON_PLANAR;
136 if (!GmGeometryUtils::pyra5IsWellDefined(X, tol)) ret |= GM_GEOMETRY_STATE_BAD_ORIENTATION;
155 GmPyraEdgeIntegrationRuleSet, GmQuadraticPyraEdgeIntegrationRuleSetDefaults,
156 GmPyraFaceIntegrationRuleSet, GmQuadraticPyraFaceIntegrationRuleSetDefaults>
177 int ret = GM_GEOMETRY_STATE_VALID;
178 if (!GmGeometryUtils::pyra13ValidEdges(X)) ret |= GM_GEOMETRY_STATE_BAD_EDGE;
179 if (!GmGeometryUtils::pyra5IsWellDefined(X, tol)) ret |= GM_GEOMETRY_STATE_BAD_ORIENTATION;
180 if (!GmGeometryUtils::isCoplanar3D(X.col(0), X.col(1), X.col(2), X.col(3), tol)) ret |= GM_GEOMETRY_STATE_NON_PLANAR;
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 nume...
Definition gmCellGeometryInfo.cpp:114
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 nume...
Definition gmCellGeometryInfo.cpp:76
An auxiliary class that can be used as base for solid elements. Implements the needed integration rul...
Definition gmCellGeometryInfo.h:440
A helper class used to store the default rules for each rule type. Template parameters are the defaul...
Definition gmCellGeometryIntegrationRuleSet.h:44
A helper class used to store the class types for each rule type. Template parameters are the implemen...
Definition gmCellGeometryIntegrationRuleSet.h:197
A helper class used to store the default rules for elements with more than one face type (like wedges...
Definition gmCellGeometryIntegrationRuleSet.h:118
A type used to represent a 'unexistant" integration rule. Should be used as template parameter for Gm...
Definition gmCellGeometryIntegrationRuleSet.h:35
The Pyra13 implementation.
Definition gmPyraCellGeometryInfo.h:157
virtual GmShape * shapeInstance(int P, int Q) const
Shape function factory. Should return a NEW instance of the shape function object for this type....
Definition gmPyraCellGeometryInfo.h:162
GmPyra13CellGeometryInfo(GmCellGeometryMetadata &&metadata)
Protected constructor. Only a single Hex20 geometry info object is ever necessary,...
Definition gmPyraCellGeometryInfo.h:186
virtual bool localAxis(const GmMatrix &X, GmMatrix &R) const
Local axis for Pyra == Identity.
Definition gmPyraCellGeometryInfo.h:171
virtual int isValid(const GmMatrix &X, double tol) const
Virtual method that should be implemented if this geometry info supports the GM_CELL_GEOMETRY_VALID c...
Definition gmPyraCellGeometryInfo.h:175
virtual void centroidCartesian(const GmMatrix &X, GmVector &coord) const
Returns the Tet10 centroid by numeric integration.
Definition gmPyraCellGeometryInfo.h:168
virtual double dimension(const GmMatrix &X) const
Returns the Tet10 volume by numeric integration.
Definition gmPyraCellGeometryInfo.h:165
GmShape specialization for a Tetrahedron with 4 nodes object.
Definition gmPyraShape.h:133
The Pyra5 implementation.
Definition gmPyraCellGeometryInfo.h:108
virtual double dimension(const GmMatrix &X) const
Returns the Pyra5 volume.
Definition gmPyraCellGeometryInfo.h:116
virtual void centroidCartesian(const GmMatrix &X, GmVector &coord) const
Returns the Tet4 centroid by calculating the mean of the vertices (simplex centroid)
Definition gmPyraCellGeometryInfo.h:125
virtual bool localAxis(const GmMatrix &X, GmMatrix &R) const
Local axis for Pyra == Identity.
Definition gmPyraCellGeometryInfo.h:122
virtual int isValid(const GmMatrix &X, double tol) const
Virtual method that should be implemented if this geometry info supports the GM_CELL_GEOMETRY_VALID c...
Definition gmPyraCellGeometryInfo.h:132
GmPyra5CellGeometryInfo(GmCellGeometryMetadata &&metadata)
Protected constructor. Only a single Hex8 geometry info object is ever necessary, created by GmTetCel...
Definition gmPyraCellGeometryInfo.h:142
virtual GmShape * shapeInstance(int P, int Q) const
Shape function factory. Should return a NEW instance of the shape function object for this type....
Definition gmPyraCellGeometryInfo.h:113
GmShape specialization for a Pyramid with 5 nodes object.
Definition gmPyraShape.h:108
Gauss integration rule for Tet element borders (edges)
Definition gmPyraIntegrationRule.h:86
Newton Integration rule for pyramid elements. Should be included.
Definition gmPyraIntegrationRule.h:71
3D integration rules for Pyramid elements
Definition gmPyraIntegrationRule.h:41
Shape function handling base classe.
Definition gmShape.h:38
Declaration of the GmCellGeometryInfo base class.
Declaration of the GmCellGeometryIntegrationRuleSet class & friends.
#define GMC_API_EXPORT
Macro for controlling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_L...
Definition gmCoreConfig.h:35
Utilitary functions for working with geometry.
@ GM_GAUSS_RULE_TYPE
Gauss rules.
Definition gmIntegrationRule.h:75
arma::mat GmMatrix
The basic type for a GeMA matrix object. Currently based on an Armadillo matrix.
Definition gmMatrix.h:38
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 5, -1, -1, -1 > GmLinearPyraIntegrationRuleSetDefaults
The set of default rules for an Pyra5 ELEMENT. Template parameters 5 are the default rule numbers for...
Definition gmPyraCellGeometryInfo.h:58
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 3, -1, -1, -1 > GmLinearPyraTriFaceIntegrationRuleSetDefaults
For the Pyra5 FACE rules, we define a rule for triangular faces and a rule for quad faces,...
Definition gmPyraCellGeometryInfo.h:63
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 3, -1, -1, -1 > GmQuadraticPyraTriFaceIntegrationRuleSetDefaults
The set of default rules for an Pyra13 FACE. we define a rule for triangular faces and a rule for qua...
Definition gmPyraCellGeometryInfo.h:87
GmCellGeometryIntegrationRuleSet< GmPyraGaussFaceIntegrationRule, GmCellGeometryNullIntegrationRule, GmCellGeometryNullIntegrationRule, GmCellGeometryNullIntegrationRule > GmPyraFaceIntegrationRuleSet
The set of possible FACE integration rules, per integration rule type, for the family of Tet elements...
Definition gmPyraCellGeometryInfo.h:45
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 2, -1, -1, -1 > GmQuadraticPyraEdgeIntegrationRuleSetDefaults
The set of default rules for an Pyra13 EDGE. Template parameters 2 to 5 are the default rule numbers ...
Definition gmPyraCellGeometryInfo.h:96
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 5, -1, -1, -1 > GmQuadraticPyraIntegrationRuleSetDefaults
The set of default rules for an Pyra13 ELEMENT. Template parameters 5 are the default rule numbers fo...
Definition gmPyraCellGeometryInfo.h:81
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 2, -1, -1, -1 > GmLinearPyraEdgeIntegrationRuleSetDefaults
The set of default rules for an Pyra5 EDGE. Template parameters 2 to 5 are the default rule numbers f...
Definition gmPyraCellGeometryInfo.h:72
GmCellGeometryIntegrationRuleSet< GmPyraGaussEdgeIntegrationRule, GmCellGeometryNullIntegrationRule, GmCellGeometryNullIntegrationRule, GmCellGeometryNullIntegrationRule > GmPyraEdgeIntegrationRuleSet
The set of possible EDGE integration rules, per integration rule type, for the family of Tet elements...
Definition gmPyraCellGeometryInfo.h:49
GmCellGeometryIntegrationRuleSet< GmPyraGaussIntegrationRule, GmCellGeometryNullIntegrationRule, GmCellGeometryNullIntegrationRule, GmCellGeometryNullIntegrationRule > GmPyraIntegrationRuleSet
The set of possible ELEMENT integration rules, per integration rule type, for the family of Tet eleme...
Definition gmPyraCellGeometryInfo.h:41
Declaration of the GmPyraXxxxIntegrationRule family of classes, including border rules....
Declaration of the 3D Pyra shapes inheriting from GmShape class.
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition gmVector.h:34
double pyramidVolume(const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4, const GmVector &p5)
Calculates the volume of the given pyramid. Points follow the standard pyramid cell definition.
Definition gmGeometryUtils.cpp:240
void pyramidCentroid(const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4, const GmVector &p5, GmVector &coord)
Returns the cartesian coordinate of the pyramid centroid.
Definition gmGeometryUtils.cpp:388