24#ifndef _GEMA_QUAD_CELL_GEOMETRY_INFO_H_
25#define _GEMA_QUAD_CELL_GEOMETRY_INFO_H_
84 GmQuadEdgeIntegrationRuleSet, GmLinearQuadEdgeIntegrationRuleSetDefaults>
113 int ret = GM_GEOMETRY_STATE_VALID;
145 int ret = GM_GEOMETRY_STATE_VALID;
168static int quad8order[] = { 0,4,1,5,2,6,3,7 };
173 GmQuadEdgeIntegrationRuleSet, GmQuadraticQuadEdgeIntegrationRuleSetDefaults>
196 int ret = GM_GEOMETRY_STATE_VALID;
228 int ret = GM_GEOMETRY_STATE_VALID;
230 ret |= GM_GEOMETRY_STATE_NON_PLANAR;
254 GmQuadEdgeIntegrationRuleSet, GmQuadraticQuadEdgeIntegrationRuleSetDefaults>
276 int ret = GM_GEOMETRY_STATE_VALID;
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 surface elements. Implements the needed integration r...
Definition gmCellGeometryInfo.h:408
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 Quad3D4 implementation.
Definition gmQuadCellGeometryInfo.h:135
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:155
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:140
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 gmQuadCellGeometryInfo.h:144
virtual bool localAxis(const GmMatrix &X, GmMatrix &R) const
Local axis for Quad == Identity.
Definition gmQuadCellGeometryInfo.h:151
GmQuad3D4CellGeometryInfo(const GmQuad4CellGeometryInfo &quad4)
Private constructor. Only a single Quad3D4 geometry info object is ever necessary,...
Definition gmQuadCellGeometryInfo.h:159
GmShape specialization for a 3D Quadrilateral with 4 nodes object.
Definition gmQuadShape.h:206
The Quad3D8 implementation.
Definition gmQuadCellGeometryInfo.h:218
virtual bool localAxis(const GmMatrix &X, GmMatrix &R) const
Local axis for Quad == Identity.
Definition gmQuadCellGeometryInfo.h:236
GmQuad3D8CellGeometryInfo(const GmQuad8CellGeometryInfo &quad8)
Private constructor. Only a single Quad3D8 geometry info object is ever necessary,...
Definition gmQuadCellGeometryInfo.h:244
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:223
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 gmQuadCellGeometryInfo.h:227
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:240
GmShape specialization for a 3D Quadrilateral with 8 nodes object.
Definition gmQuadShape.h:239
The Quad4 implementation.
Definition gmQuadCellGeometryInfo.h:85
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
virtual double dimension(const GmMatrix &X) const
Returns the Quad4 area.
Definition gmQuadCellGeometryInfo.h:93
virtual bool localAxis(const GmMatrix &X, GmMatrix &R) const
Local axis for Quad == Identity.
Definition gmQuadCellGeometryInfo.h:105
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 gmQuadCellGeometryInfo.h:110
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 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:120
GmQuad4CellGeometryInfo(GmCellGeometryMetadata &&metadata)
Protected constructor. Only a single Quad4 geometry info object is ever necessary,...
Definition gmQuadCellGeometryInfo.h:124
GmShape specialization for a Quadrilateral with 4 nodes object.
Definition gmQuadShape.h:121
The Quad8 implementation.
Definition gmQuadCellGeometryInfo.h:174
virtual void centroidCartesian(const GmMatrix &X, GmVector &coord) const
Returns the Quad8 centroid by numeric integration.
Definition gmQuadCellGeometryInfo.h:185
virtual bool localAxis(const GmMatrix &X, GmMatrix &R) const
Local axis for Quad == Identity.
Definition gmQuadCellGeometryInfo.h:188
GmQuad8CellGeometryInfo(GmCellGeometryMetadata &&metadata)
Protected constructor. Only a single Quad8 geometry info object is ever necessary,...
Definition gmQuadCellGeometryInfo.h:207
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:203
virtual double dimension(const GmMatrix &X) const
Returns the Quad8 area by numeric integration.
Definition gmQuadCellGeometryInfo.h:182
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:179
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 gmQuadCellGeometryInfo.h:192
GmShape specialization for a Quadrilateral with 8 nodes object.
Definition gmQuadShape.h:152
The Quad9 implementation.
Definition gmQuadCellGeometryInfo.h:255
virtual double dimension(const GmMatrix &X) const
Returns the Quad9 area by numeric integration.
Definition gmQuadCellGeometryInfo.h:263
GmQuad9CellGeometryInfo(const GmQuad8CellGeometryInfo &quad8)
Private constructor. Only a single Quad9 geometry info object is ever necessary, created by GmQuadCel...
Definition gmQuadCellGeometryInfo.h:283
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 gmQuadCellGeometryInfo.h:272
virtual void centroidCartesian(const GmMatrix &X, GmVector &coord) const
Returns the Quad9 centroid by numeric integration.
Definition gmQuadCellGeometryInfo.h:266
virtual bool localAxis(const GmMatrix &X, GmMatrix &R) const
Local axis for Quad == Identity.
Definition gmQuadCellGeometryInfo.h:269
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:260
GmShape specialization for a Quadrilateral with 9 nodes object.
Definition gmQuadShape.h:182
Gauss integration rule for Quad element borders.
Definition gmQuadIntegrationRule.h:131
2D Isotropic / anisotropic Gauss integration rules for Quad elements
Definition gmQuadIntegrationRule.h:43
Lobatto integration rule for Quad element borders.
Definition gmQuadIntegrationRule.h:145
2D Isotropic / anisotropic Lobatto integration rules for Quad elements
Definition gmQuadIntegrationRule.h:89
2D Isotropic / anisotropic Newton cotes integration rules for Quad elements
Definition gmQuadIntegrationRule.h:66
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, 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
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
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
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
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
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
Declaration of the GmQuadXxxxIntegrationRule family of classes, including border rules....
Declaration of the 2D Quad shapes inheriting from GmShape class Previosuly part of the gmShape2D....
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition gmVector.h:34
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:273
bool polygon3DIsPlanar(const GmMatrix &X, double tol)
Returns true if the polygon delimited by the cell vertices is planar.
Definition gmGeometryUtils.cpp:556
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:614
bool polygon2DIsSelfIntersecting(const GmMatrix &X)
Returns true if the polygon delimited by the cell vertices is self-intersecting, or false otherwise.
Definition gmGeometryUtils.cpp:467
bool polygon2DIsCCW(const GmMatrix &X)
Returns true if the polygon delimited by the cell vertices is oriented CCW.
Definition gmGeometryUtils.cpp:496
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:192
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:669
GmMatrix shuffle(const GmMatrix &X, const int order[], int size)
Returns quad8 vertices in circular order.
Definition gmGeometryUtils.cpp:581