24 #ifndef _GEMA_QUAD_CELL_GEOMETRY_INFO_H_ 25 #define _GEMA_QUAD_CELL_GEOMETRY_INFO_H_ 84 GmQuadEdgeIntegrationRuleSet, GmLinearQuadEdgeIntegrationRuleSetDefaults>
154 static int quad8order[] = { 0,4,1,5,2,6,3,7 };
159 GmQuadEdgeIntegrationRuleSet, GmQuadraticQuadEdgeIntegrationRuleSetDefaults>
226 GmQuadEdgeIntegrationRuleSet, GmQuadraticQuadEdgeIntegrationRuleSetDefaults>
bool pointInConvexPolygon(const GmMatrix &X, const GmVector &p)
Returns true if the point p is inside the polygon delimited by the cell vertices (convex hull),...
Definition: gmGeometryUtils.cpp:645
bool polygon3DIsPlanar(const GmMatrix &X, double tol)
Returns true if the polygon delimited by the cell vertices is planar.
Definition: gmGeometryUtils.cpp:587
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: gmQuadCellGeometryInfo.h:165
GmShape specialization for a 3D Quadrilateral with 4 nodes object.
Definition: gmQuadShape.h:202
GmShape specialization for a Quadrilateral with 4 nodes object.
Definition: gmQuadShape.h:117
Lobatto integration rule for Quad element borders.
Definition: gmQuadIntegrationRule.h:144
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
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: gmQuadCellGeometryInfo.h:90
The Quad8 implementation.
Definition: gmQuadCellGeometryInfo.h:157
Gauss rules.
Definition: gmIntegrationRule.h:75
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 c...
Definition: gmQuadCellGeometryInfo.h:241
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: gmQuadCellGeometryInfo.h:134
virtual void centroidCartesian(const GmMatrix &X, GmVector &coord) const
Returns the Quad8 centroid by numeric integration.
Definition: gmQuadCellGeometryInfo.h:171
GmCellGeometryIntegrationRuleSet< GmQuadGaussEdgeIntegrationRule, GmQuadLobattoEdgeIntegrationRule, GmCellGeometryNullIntegrationRule, GmCellGeometryNullIntegrationRule > GmQuadEdgeIntegrationRuleSet
The set of possible EDGE integration rules, per integration rule type, for the family of Quad element...
Definition: gmQuadCellGeometryInfo.h:45
GmMatrix shuffle(const GmMatrix &X, const int order[], int size)
Returns quad8 vertices in circular order.
Definition: gmGeometryUtils.cpp:612
A type used to represent a 'unexistant" integration rule. Should be used as template parameter for Gm...
Definition: gmCellGeometryIntegrationRuleSet.h:35
double quadArea(const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4)
Calculates the area of a quad defined by points p1 to p4 (2D or 3D), defined in CCW order.
Definition: gmGeometryUtils.cpp:196
GmShape specialization for a Quadrilateral with 8 nodes object.
Definition: gmQuadShape.h:148
The Quad3D4 implementation.
Definition: gmQuadCellGeometryInfo.h:128
GmQuad3D4CellGeometryInfo(const GmQuad4CellGeometryInfo &quad4)
Private constructor. Only a single Quad3D4 geometry info object is ever necessary,...
Definition: gmQuadCellGeometryInfo.h:145
virtual void centroidCartesian(const GmMatrix &X, GmVector &coord) const
Returns the Quad9 centroid by numeric integration.
Definition: gmQuadCellGeometryInfo.h:238
2D Isotropic / anisotropic Lobatto integration rules for Quad elements
Definition: gmQuadIntegrationRule.h:88
A helper class used to store the default rules for each rule type. Template parameters are the defaul...
Definition: gmCellGeometryIntegrationRuleSet.h:43
virtual void centroidCartesian(const GmMatrix &X, GmVector &coord) const
Returns the Quad4 centroid by decomposing it into two triangles and weighting each coordinate by the ...
Definition: gmQuadCellGeometryInfo.h:99
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 c...
Definition: gmQuadCellGeometryInfo.h:175
2D Isotropic / anisotropic Gauss integration rules for Quad elements
Definition: gmQuadIntegrationRule.h:42
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: gmQuadCellGeometryInfo.h:183
GmQuad9CellGeometryInfo(const GmQuad8CellGeometryInfo &quad8)
Private constructor. Only a single Quad9 geometry info object is ever necessary, created by GmQuadCel...
Definition: gmQuadCellGeometryInfo.h:249
Shape function handling base classe.
Definition: gmShape.h:37
Declaration of the GmCellGeometryIntegrationRuleSet class & friends.
virtual double dimension(const GmMatrix &X) const
Returns the Quad9 area by numeric integration.
Definition: gmQuadCellGeometryInfo.h:235
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 3, 3, 3, 3 > GmQuadraticQuadIntegrationRuleSetDefaults
The set of default rules for a quadratic Quad ELEMENT. Template parameters 2 to 5 are the default rul...
Definition: gmQuadCellGeometryInfo.h:69
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 c...
Definition: gmQuadCellGeometryInfo.h:207
A helper class used to store the class types for each rule type. Template parameters are the implemen...
Definition: gmCellGeometryIntegrationRuleSet.h:196
GmShape specialization for a 3D Quadrilateral with 8 nodes object.
Definition: gmQuadShape.h:235
bool pointInTesselatedPolygon_Q8(const GmMatrix &X, const GmVector &p)
Returns true if the point p is inside the tesselated Q8 polygon or false otherwise.
Definition: gmGeometryUtils.cpp:700
bool polygon2DIsCCW(const GmMatrix &X)
Returns true if the polygon delimited by the cell vertices is oriented CCW.
Definition: gmGeometryUtils.cpp:527
Utilitary functions for working with geometry.
The Quad3D8 implementation.
Definition: gmQuadCellGeometryInfo.h:197
2D Isotropic / anisotropic Newton cotes integration rules for Quad elements
Definition: gmQuadIntegrationRule.h:65
An auxiliary class that can be used as base for surface elements. Implements the needed integration r...
Definition: gmCellGeometryInfo.h:348
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: gmQuadCellGeometryInfo.h:141
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
GmQuad3D8CellGeometryInfo(const GmQuad8CellGeometryInfo &quad8)
Private constructor. Only a single Quad3D8 geometry info object is ever necessary,...
Definition: gmQuadCellGeometryInfo.h:216
void quadCentroid(const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4, GmVector &coord)
Returns the cartesian coordinate of the quad centroid.
Definition: gmGeometryUtils.cpp:304
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 c...
Definition: gmQuadCellGeometryInfo.h:138
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 3, 3, -1, -1 > GmQuadraticQuadEdgeIntegrationRuleSetDefaults
The set of default rules for a quadratic Quad EDGE. Template parameters 2 to 5 are the default rule n...
Definition: gmQuadCellGeometryInfo.h:74
The Quad4 implementation.
Definition: gmQuadCellGeometryInfo.h:82
GmCellGeometryIntegrationRuleSet< GmQuadGaussIntegrationRule, GmQuadLobattoIntegrationRule, GmQuadNewtonIntegrationRule, GmQuadNewtonIntegrationRule > GmQuadIntegrationRuleSet
The set of possible ELEMENT integration rules, per integration rule type, for the family of Quad elem...
Definition: gmQuadCellGeometryInfo.h:41
#define GMC_API_EXPORT
Macro for controling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_LI...
Definition: gmCoreConfig.h:35
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: gmQuadCellGeometryInfo.h:212
virtual double dimension(const GmMatrix &X) const
Returns the Quad8 area by numeric integration.
Definition: gmQuadCellGeometryInfo.h:168
Declaration of the GmQuadXxxxIntegrationRule family of classes, including border rules....
virtual double dimension(const GmMatrix &X) const
Returns the Quad4 area.
Definition: gmQuadCellGeometryInfo.h:93
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: gmQuadCellGeometryInfo.h:114
GmQuad8CellGeometryInfo(GmCellGeometryMetadata &&metadata)
Protected constructor. Only a single Quad8 geometry info object is ever necessary,...
Definition: gmQuadCellGeometryInfo.h:187
Declaration of the 2D Quad shapes inheriting from GmShape class Previosuly part of the gmShape2D....
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 c...
Definition: gmQuadCellGeometryInfo.h:107
bool polygon2DIsSelfIntersecting(const GmMatrix &X)
Returns true if the polygon delimited by the cell vertices is self-intersecting, or false otherwise.
Definition: gmGeometryUtils.cpp:498
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 2, 2, 2, 2 > GmLinearQuadIntegrationRuleSetDefaults
The set of default rules for a linear Quad ELEMENT. Template parameters 2 to 5 are the default rule n...
Definition: gmQuadCellGeometryInfo.h:55
static const GmQuad8CellGeometryInfo * instance()
Instance function for the Quad8 single geometry object.
Definition: gmQuadCellGeometryInfo.cpp:114
static const GmQuad4CellGeometryInfo * instance()
Instance function for the Quad4 single geometry object.
Definition: gmQuadCellGeometryInfo.cpp:34
Declaration of the GmCellGeometryInfo base class.
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition: gmVector.h:34
GmShape specialization for a Quadrilateral with 9 nodes object.
Definition: gmQuadShape.h:178
arma::mat GmMatrix
The basic type for a GeMA matrix object. Currently based on an Armadillo matrix.
Definition: gmMatrix.h:38
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: gmQuadCellGeometryInfo.h:203
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: gmQuadCellGeometryInfo.h:232
The Quad9 implementation.
Definition: gmQuadCellGeometryInfo.h:224
GmQuad4CellGeometryInfo(GmCellGeometryMetadata &&metadata)
Protected constructor. Only a single Quad4 geometry info object is ever necessary,...
Definition: gmQuadCellGeometryInfo.h:118
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 2, 2, -1, -1 > GmLinearQuadEdgeIntegrationRuleSetDefaults
The set of default rules for a linear Quad EDGE. Template parameters 2 to 5 are the default rule numb...
Definition: gmQuadCellGeometryInfo.h:60
Gauss integration rule for Quad element borders.
Definition: gmQuadIntegrationRule.h:130