24#ifndef _GEMA_INT2D_CELL_GEOMETRY_INFO_H_
25#define _GEMA_INT2D_CELL_GEOMETRY_INFO_H_
88 GmInt2DEdgeIntegrationRuleSet, GmLinearInt2DEdgeIntegrationRuleSetDefaults>
110 GmVector p1 = (X.col(1) + X.col(2)) * 0.5;
111 GmVector p0 = (X.col(0) + X.col(3)) * 0.5;
112 return GmGeometryUtils::computeLocalAxis2(p1 - p0, R);
119 int ret = GM_GEOMETRY_STATE_VALID;
146 GmVector p1 = (X.col(1) + X.col(2)) * 0.5;
147 GmVector p0 = (X.col(0) + X.col(3)) * 0.5;
148 return GmGeometryUtils::computeLocalAxis2(p1 - p0, R);
156 constexpr int order[] = { 0,1,5,2,3,4 };
158 int ret = GM_GEOMETRY_STATE_VALID;
175 GmInt2DEdgeIntegrationRuleSet, GmQuadraticInt2DEdgeIntegrationRuleSetDefaults>
187 Xm.col(0) = 0.5*(X.col(0)+X.col(3));
188 Xm.col(1) = 0.5*(X.col(1)+X.col(2));
189 Xm.col(2) = 0.5*(X.col(4)+X.col(5));
197 Xm.col(0) = 0.5*(X.col(0)+X.col(3));
198 Xm.col(1) = 0.5*(X.col(1)+X.col(2));
199 Xm.col(2) = 0.5*(X.col(4)+X.col(5));
205 GmVector p1 = (X.col(1) + X.col(2)) * 0.5;
206 GmVector p0 = (X.col(0) + X.col(3)) * 0.5;
207 return GmGeometryUtils::computeLocalAxis2(p1 - p0, R);
215 constexpr int order[] = {0,4,1,2,5,3};
217 int ret = GM_GEOMETRY_STATE_VALID;
245 GmVector p1 = (X.col(1) + X.col(2)) * 0.5;
246 GmVector p0 = (X.col(0) + X.col(3)) * 0.5;
247 return GmGeometryUtils::computeLocalAxis2(p1 - p0, R);
255 constexpr int order[] = {0,4,1,7,2,5,3,6};
257 int ret = GM_GEOMETRY_STATE_VALID;
static const GmCellGeometryInfo * geometryInfo(GmCellType type)
Returns the geometry info objct associated with type. NOT FOR GENERAL USE.
Definition gmCellGeometry.h:661
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 Int2DL4 implementation.
Definition gmInt2dCellGeometryInfo.h:89
virtual double dimension(const GmMatrix &X) const
Returns the Int2DL4 length at the "mid edge".
Definition gmInt2dCellGeometryInfo.h:97
virtual void centroidCartesian(const GmMatrix &X, GmVector &coord) const
Returns the Int2DL4 centroid as a Bar2 at the "mid edge".
Definition gmInt2dCellGeometryInfo.h:103
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 gmInt2dCellGeometryInfo.h:94
virtual bool localAxis(const GmMatrix &X, GmMatrix &R) const
Local axis 2D interface element.
Definition gmInt2dCellGeometryInfo.h:109
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 gmInt2dCellGeometryInfo.h:117
GmInt2DL4CellGeometryInfo(GmCellGeometryMetadata &&metadata)
Protected constructor. Only a single Int2DL4 geometry info object is ever necessary,...
Definition gmInt2dCellGeometryInfo.h:126
GmShape specialization for a 2D linear interface element with 4 nodes object.
Definition gmInt2DShape.h:139
The Int2DL6 implementation.
Definition gmInt2dCellGeometryInfo.h:137
virtual bool localAxis(const GmMatrix &X, GmMatrix &R) const
Local axis 2D interface element.
Definition gmInt2dCellGeometryInfo.h:145
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 gmInt2dCellGeometryInfo.h:153
GmInt2DL6CellGeometryInfo(GmCellGeometryMetadata &&metadata)
Private constructor. Only a single Int2DL6 geometry info object is ever necessary,...
Definition gmInt2dCellGeometryInfo.h:165
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 gmInt2dCellGeometryInfo.h:142
GmShape specialization for a 2D coupled interface element with 6 nodes object with 4 nodes (x,...
Definition gmInt2DShape.h:174
The Int2DQ6 implementation.
Definition gmInt2dCellGeometryInfo.h:176
GmInt2DQ6CellGeometryInfo(GmCellGeometryMetadata &&metadata)
Protected constructor. Only a single Int2DQ6 geometry info object is ever necessary,...
Definition gmInt2dCellGeometryInfo.h:224
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 gmInt2dCellGeometryInfo.h:212
virtual void centroidCartesian(const GmMatrix &X, GmVector &coord) const
Returns the Int2DQ6 centroid as a Bar3 at the "mid edge".
Definition gmInt2dCellGeometryInfo.h:194
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 gmInt2dCellGeometryInfo.h:181
virtual double dimension(const GmMatrix &X) const
Returns the Int2DQ6 length at the "mid edge".
Definition gmInt2dCellGeometryInfo.h:184
virtual bool localAxis(const GmMatrix &X, GmMatrix &R) const
Local axis 2D interface element.
Definition gmInt2dCellGeometryInfo.h:204
GmShape specialization for a 2D quadratic interface element with 6 nodes object.
Definition gmInt2DShape.h:190
The Int2DQ8 implementation.
Definition gmInt2dCellGeometryInfo.h:236
GmInt2DQ8CellGeometryInfo(GmCellGeometryMetadata &&metadata)
Private constructor. Only a single Int2DQ8 geometry info object is ever necessary,...
Definition gmInt2dCellGeometryInfo.h:264
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 gmInt2dCellGeometryInfo.h:241
virtual bool localAxis(const GmMatrix &X, GmMatrix &R) const
Local axis 2D interface element.
Definition gmInt2dCellGeometryInfo.h:244
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 gmInt2dCellGeometryInfo.h:252
GmShape specialization for a 2D quadratic interface element with 8 nodes object 2 nodes (x,...
Definition gmInt2DShape.h:218
1D Gauss Integration rules (for bar elements)
Definition gmBarIntegrationRule.h:37
1D Lobatto Integration rules (for bar elements)
Definition gmBarIntegrationRule.h:84
1D Newton cotes Integration rules (for bar elements)
Definition gmBarIntegrationRule.h:60
Gauss integration rule for Quad element borders.
Definition gmQuadIntegrationRule.h:131
Lobatto integration rule for Quad element borders.
Definition gmQuadIntegrationRule.h:145
Shape function handling base classe.
Definition gmShape.h:38
Declaration of the GmLineXxxxIntegrationRule family of classes Content previously in gmIntegrationRul...
Declaration of the GmCellGeometryInfo base class.
Declaration of the GmCellGeometryIntegrationRuleSet class & friends.
@ GM_BAR3
A bar cell 2D with 3 nodes.
Definition gmCellType.h:33
#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.
Declaration of the 2D shapes for interface elements inheriting from GmShape class Previosuly part of ...
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 2, 2, 2, 2 > GmLinearInt2DIntegrationRuleSetDefaults
The set of default rules for a linear 2D interface ELEMENT. Template parameters 2 to 5 are the defaul...
Definition gmInt2dCellGeometryInfo.h:59
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 3, 3, 3, 3 > GmQuadraticInt2DIntegrationRuleSetDefaults
The set of default rules for a quadratic 2D interface ELEMENT. Template parameters 2 to 5 are the def...
Definition gmInt2dCellGeometryInfo.h:73
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 3, 3, -1, -1 > GmQuadraticInt2DEdgeIntegrationRuleSetDefaults
The set of default rules for a quadratic 2D interface EDGE. Template parameters 2 to 5 are the defaul...
Definition gmInt2dCellGeometryInfo.h:78
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 2, 2, -1, -1 > GmLinearInt2DEdgeIntegrationRuleSetDefaults
The set of default rules for a linear 2D interface EDGE. Template parameters 2 to 5 are the default r...
Definition gmInt2dCellGeometryInfo.h:64
GmCellGeometryIntegrationRuleSet< GmQuadGaussEdgeIntegrationRule, GmQuadLobattoEdgeIntegrationRule, GmCellGeometryNullIntegrationRule, GmCellGeometryNullIntegrationRule > GmInt2DEdgeIntegrationRuleSet
The set of possible EDGE integration rules, per integration rule type, for the family of 2D interface...
Definition gmInt2dCellGeometryInfo.h:50
GmCellGeometryIntegrationRuleSet< GmLineGaussIntegrationRule, GmLineLobattoIntegrationRule, GmLineNewtonIntegrationRule, GmLineNewtonIntegrationRule > GmInt2DIntegrationRuleSet
The set of possible ELEMENT integration rules, per integration rule type, for the family of 2D interf...
Definition gmInt2dCellGeometryInfo.h:42
@ 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
Declaration of the GmQuadXxxxIntegrationRule family of classes, including border rules....
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition gmVector.h:34
void edgeCentroid(const GmVector &p1, const GmVector &p2, GmVector &coord)
Returns the cartesian coordinate of the edge centroid.
Definition gmGeometryUtils.cpp:252
double edgeLength(const GmVector &p1, const GmVector &p2)
Calculates the length of the edge determined by points p1 and p2.
Definition gmGeometryUtils.cpp:153
bool polygon2DIsCCW(const GmMatrix &X)
Returns true if the polygon delimited by the cell vertices is oriented CCW.
Definition gmGeometryUtils.cpp:496
GmMatrix shuffle(const GmMatrix &X, const int order[], int size)
Returns quad8 vertices in circular order.
Definition gmGeometryUtils.cpp:581