24#ifndef _GEMA_HEX_CELL_GEOMETRY_INFO_H_
25#define _GEMA_HEX_CELL_GEOMETRY_INFO_H_
97 GmHexEdgeIntegrationRuleSet, GmLinearHexEdgeIntegrationRuleSetDefaults,
98 GmHexFaceIntegrationRuleSet, GmLinearHexFaceIntegrationRuleSetDefaults>
121 int ret = GM_GEOMETRY_STATE_VALID;
122 if (!GmGeometryUtils::hex8PlanarFaces(X, tol)) ret |= GM_GEOMETRY_STATE_NON_PLANAR;
123 if (!GmGeometryUtils::hex8IsWellDefined(X)) ret |= GM_GEOMETRY_STATE_BAD_ORIENTATION;
147 GmHexEdgeIntegrationRuleSet, GmQuadraticHexEdgeIntegrationRuleSetDefaults,
148 GmHexFaceIntegrationRuleSet, GmQuadraticHexFaceIntegrationRuleSetDefaults>
166 int ret = GM_GEOMETRY_STATE_VALID;
168 if (!GmGeometryUtils::hex8PlanarFaces(X, tol)) ret |= GM_GEOMETRY_STATE_NON_PLANAR;
169 if (!GmGeometryUtils::hex8IsWellDefined(X)) ret |= GM_GEOMETRY_STATE_BAD_ORIENTATION;
188 GmHexEdgeIntegrationRuleSet, GmQuadraticHexEdgeIntegrationRuleSetDefaults,
189 GmHexFaceIntegrationRuleSet, GmQuadraticHexFaceIntegrationRuleSetDefaults>
207 int ret = GM_GEOMETRY_STATE_VALID;
210 if (!GmGeometryUtils::hex8PlanarFaces(X, tol)) ret |= GM_GEOMETRY_STATE_NON_PLANAR;
211 if (!GmGeometryUtils::hex8IsWellDefined(X)) ret |= GM_GEOMETRY_STATE_BAD_ORIENTATION;
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 type used to represent a 'unexistant" integration rule. Should be used as template parameter for Gm...
Definition gmCellGeometryIntegrationRuleSet.h:35
The hex20 implementation.
Definition gmHexCellGeometryInfo.h:149
virtual void centroidCartesian(const GmMatrix &X, GmVector &coord) const
Returns the Hex20 centroid by numeric integration.
Definition gmHexCellGeometryInfo.h:160
virtual double dimension(const GmMatrix &X) const
Returns the Hex20 volume by numeric integration.
Definition gmHexCellGeometryInfo.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 gmHexCellGeometryInfo.h:154
GmHex20CellGeometryInfo(GmCellGeometryMetadata &&metadata)
Protected constructor. Only a single Hex20 geometry info object is ever necessary,...
Definition gmHexCellGeometryInfo.h:175
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 gmHexCellGeometryInfo.h:165
virtual bool localAxis(const GmMatrix &X, GmMatrix &R) const
Computes the cell local axis system, with R = [X, Y, Z] and X, Y and Z being the local axis unit vect...
Definition gmHexCellGeometryInfo.h:162
GmShape specialization for a Hexahedron with 20 nodes object.
Definition gmHexShape.h:133
The hex27 implementation.
Definition gmHexCellGeometryInfo.h:190
virtual bool localAxis(const GmMatrix &X, GmMatrix &R) const
Computes the cell local axis system, with R = [X, Y, Z] and X, Y and Z being the local axis unit vect...
Definition gmHexCellGeometryInfo.h:203
virtual void centroidCartesian(const GmMatrix &X, GmVector &coord) const
Returns the Hex27 centroid by numeric integration.
Definition gmHexCellGeometryInfo.h:201
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 gmHexCellGeometryInfo.h:205
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 gmHexCellGeometryInfo.h:195
virtual double dimension(const GmMatrix &X) const
Returns the Hex27 volume by numeric integration.
Definition gmHexCellGeometryInfo.h:198
GmHex27CellGeometryInfo(const GmHex20CellGeometryInfo &hex20)
Protected constructor. Only a single Hex27 geometry info object is ever necessary,...
Definition gmHexCellGeometryInfo.h:216
GmShape specialization for a Hexahedron with 27 nodes object.
Definition gmHexShape.h:156
The hex8 implementation.
Definition gmHexCellGeometryInfo.h:99
GmHex8CellGeometryInfo(GmCellGeometryMetadata &&metadata)
Protected constructor. Only a single Hex8 geometry info object is ever necessary, created by GmHexCel...
Definition gmHexCellGeometryInfo.h:134
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 gmHexCellGeometryInfo.h:120
virtual double dimension(const GmMatrix &X) const
Returns the Hex8 volume.
Definition gmHexCellGeometryInfo.h:107
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_CONTAIN...
Definition gmHexCellGeometryInfo.h:128
virtual void centroidCartesian(const GmMatrix &X, GmVector &coord) const
Returns the Hex8 centroid by decomposing it into 6 tetrahedra and weighting each coordinate by the te...
Definition gmHexCellGeometryInfo.h:113
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 gmHexCellGeometryInfo.h:104
virtual bool localAxis(const GmMatrix &X, GmMatrix &R) const
Computes the cell local axis system, with R = [X, Y, Z] and X, Y and Z being the local axis unit vect...
Definition gmHexCellGeometryInfo.h:130
GmShape specialization for a Hexahedron with 8 nodes object.
Definition gmHexShape.h:110
Gauss integration rule for Hex element borders (edges)
Definition gmHexIntegrationRule.h:173
Gauss integration rule for Hex element borders (faces)
Definition gmHexIntegrationRule.h:134
3D Isotropic / anisotropic Gauss integration rules for Hex elements
Definition gmHexIntegrationRule.h:45
Lobatto integration rule for Hex element borders (edges)
Definition gmHexIntegrationRule.h:186
Lobatto integration rule for Hex element borders (faces)
Definition gmHexIntegrationRule.h:147
3D Isotropic / anisotropic Lobatto integration rules for Hex elements
Definition gmHexIntegrationRule.h:93
3D Isotropic / anisotropic Newton cotes integration rules for Hex elements
Definition gmHexIntegrationRule.h:69
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.
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 2, 2, 2, 2 > GmQuadraticHexIntegrationRuleSetDefaults
The set of default rules for an Hex20/27 ELEMENT. Template parameters 2 to 5 are the default rule num...
Definition gmHexCellGeometryInfo.h:77
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 2, 2, -1, -1 > GmLinearHexFaceIntegrationRuleSetDefaults
The set of default rules for an Hex8 FACE. Template parameters 2 to 5 are the default rule numbers fo...
Definition gmHexCellGeometryInfo.h:63
GmCellGeometryIntegrationRuleSet< GmHexGaussIntegrationRule, GmHexLobattoIntegrationRule, GmHexNewtonIntegrationRule, GmHexNewtonIntegrationRule > GmHexIntegrationRuleSet
The set of possible ELEMENT integration rules, per integration rule type, for the family of Hex eleme...
Definition gmHexCellGeometryInfo.h:41
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 2, 2, -1, -1 > GmQuadraticHexFaceIntegrationRuleSetDefaults
The set of default rules for an Hex20/27 FACE. Template parameters 2 to 5 are the default rule number...
Definition gmHexCellGeometryInfo.h:82
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 2, 2, -1, -1 > GmQuadraticHexEdgeIntegrationRuleSetDefaults
The set of default rules for an Hex20/27 EDGE. Template parameters 2 to 5 are the default rule number...
Definition gmHexCellGeometryInfo.h:87
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 2, 2, 2, 2 > GmLinearHexIntegrationRuleSetDefaults
The set of default rules for an Hex8 ELEMENT. Template parameters 2 to 5 are the default rule numbers...
Definition gmHexCellGeometryInfo.h:58
GmCellGeometryIntegrationRuleSet< GmHexGaussFaceIntegrationRule, GmHexLobattoFaceIntegrationRule, GmCellGeometryNullIntegrationRule, GmCellGeometryNullIntegrationRule > GmHexFaceIntegrationRuleSet
The set of possible FACE integration rules, per integration rule type, for the family of Hex elements...
Definition gmHexCellGeometryInfo.h:45
GmCellGeometryIntegrationRuleSet< GmHexGaussEdgeIntegrationRule, GmHexLobattoEdgeIntegrationRule, GmCellGeometryNullIntegrationRule, GmCellGeometryNullIntegrationRule > GmHexEdgeIntegrationRuleSet
The set of possible EDGE integration rules, per integration rule type, for the family of Hex elements...
Definition gmHexCellGeometryInfo.h:49
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 2, 2, -1, -1 > GmLinearHexEdgeIntegrationRuleSetDefaults
The set of default rules for an Hex8 EDGE. Template parameters 2 to 5 are the default rule numbers fo...
Definition gmHexCellGeometryInfo.h:68
Declaration of the GmHexXxxxxIntegrationRule family of classes, including border rules....
Declaration of the 3D Hex shapes inheriting from GmShape class Previosuly part of the gmShape3D....
@ 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
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition gmVector.h:34
void hexahedronCentroid(const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4, const GmVector &p5, const GmVector &p6, const GmVector &p7, const GmVector &p8, GmVector &coord)
Definition gmGeometryUtils.cpp:294
double hexahedronVolume(const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4, const GmVector &p5, const GmVector &p6, const GmVector &p7, const GmVector &p8)
Calculates the volume of the given hexahedron. Points follow the standard Hex cell definition.
Definition gmGeometryUtils.cpp:199
bool hex27ValidFacesCenter(const GmMatrix &X, double tol)
Returns true if face center point is collinear with the face. Assumes that the quad faces are planar.
Definition gmGeometryUtils.cpp:1039
bool hex20ValidEdges(const GmMatrix &X, double proportion_max)
Returns true if the points defined between the edges of hex20 follows: 1) Their projection to the 3d ...
Definition gmGeometryUtils.cpp:951