24 #ifndef _GEMA_TRI_CELL_GEOMETRY_INFO_H_ 25 #define _GEMA_TRI_CELL_GEOMETRY_INFO_H_ 84 GmTriEdgeIntegrationRuleSet, GmLinearTriEdgeIntegrationRuleSetDefaults>
135 virtual bool isValid(
const GmMatrix& X,
double tol)
const { Q_UNUSED(tol);
return !GmGeometryUtils::tri3DIsColinear(X); }
150 static int tri6order[] = {0,3,1,4,2,5};
155 GmTriEdgeIntegrationRuleSet, GmQuadraticTriEdgeIntegrationRuleSetDefaults>
204 && !GmGeometryUtils::tri3DIsColinear(X.cols(0,2));;
Declaration of the 2D tri shapes inheriting from GmShape class Previosuly part of the gmShape2D....
Gauss Integration rule for triangle elements. Base on Felippa, IFEM, section 24.2.
Definition: gmTriIntegrationRule.h:42
GmTri3D6CellGeometryInfo(const GmTri6CellGeometryInfo &tri6)
Private constructor. Only a single Tri3D6 geometry info object is ever necessary, created by GmTriCel...
Definition: gmTriCellGeometryInfo.h:213
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 3, -1, 1, 1 > GmLinearTriIntegrationRuleSetDefaults
The set of default rules for a linear Tri ELEMENT. Template parameters 2 to 5 are the default rule nu...
Definition: gmTriCellGeometryInfo.h:55
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
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 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: gmTriCellGeometryInfo.h:209
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: gmTriCellGeometryInfo.h:111
Gauss rules.
Definition: gmIntegrationRule.h:75
void triangleCentroid(const GmVector &p1, const GmVector &p2, const GmVector &p3, GmVector &coord)
Returns the cartesian coordinate of the triangle centroid.
Definition: gmGeometryUtils.cpp:293
GmCellGeometryIntegrationRuleSet< GmTriGaussIntegrationRule, GmCellGeometryNullIntegrationRule, GmTriNewtonIntegrationRule, GmTriNewtonIntegrationRule > GmTriIntegrationRuleSet
The set of possible ELEMENT integration rules, per integration rule type, for the family of Tri eleme...
Definition: gmTriCellGeometryInfo.h:41
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
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: gmTriCellGeometryInfo.h:138
GmShape specialization for a Triangle with 6 nodes object.
Definition: gmTriShape.h:145
A helper class used to store the default rules for each rule type. Template parameters are the defaul...
Definition: gmCellGeometryIntegrationRuleSet.h:43
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: gmTriCellGeometryInfo.h:135
The Tri3D3 implementation.
Definition: gmTriCellGeometryInfo.h:125
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: gmTriCellGeometryInfo.h:202
Newton Integration rule for triangle elements. Accepts both open and closed rules.
Definition: gmTriIntegrationRule.h:65
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: gmTriCellGeometryInfo.h:198
GmTri6CellGeometryInfo(GmCellGeometryMetadata &&metadata)
Protected constructor. Only a single Tri6 geometry info object is ever necessary, created by GmTriCel...
Definition: gmTriCellGeometryInfo.h:182
Shape function handling base classe.
Definition: gmShape.h:37
GmTri3D3CellGeometryInfo(const GmTri3CellGeometryInfo &tri3)
Private constructor. Only a single Tri3D3 geometry info object is ever necessary, created by GmTriCel...
Definition: gmTriCellGeometryInfo.h:142
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: gmTriCellGeometryInfo.h:178
Declaration of the GmCellGeometryIntegrationRuleSet class & friends.
The Tri6 implementation.
Definition: gmTriCellGeometryInfo.h:153
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: gmTriCellGeometryInfo.h:131
virtual double dimension(const GmMatrix &X) const
Returns the Tri3 area.
Definition: gmTriCellGeometryInfo.h:93
A helper class used to store the class types for each rule type. Template parameters are the implemen...
Definition: gmCellGeometryIntegrationRuleSet.h:196
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 2, -1, -1, -1 > GmLinearTriEdgeIntegrationRuleSetDefaults
The set of default rules for a linear Tri EDGE. Template parameters 2 to 5 are the default rule numbe...
Definition: gmTriCellGeometryInfo.h:60
bool polygon2DIsCCW(const GmMatrix &X)
Returns true if the polygon delimited by the cell vertices is oriented CCW.
Definition: gmGeometryUtils.cpp:527
GmCellGeometryIntegrationRuleSet< GmTriGaussEdgeIntegrationRule, GmCellGeometryNullIntegrationRule, GmCellGeometryNullIntegrationRule, GmCellGeometryNullIntegrationRule > GmTriEdgeIntegrationRuleSet
The set of possible EDGE integration rules, per integration rule type, for the family of Tri elements...
Definition: gmTriCellGeometryInfo.h:45
Utilitary functions for working with geometry.
An auxiliary class that can be used as base for surface elements. Implements the needed integration r...
Definition: gmCellGeometryInfo.h:348
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
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: gmTriCellGeometryInfo.h:161
Gauss integration rule for Tri element borders.
Definition: gmTriIntegrationRule.h:95
#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
double triangleArea(const GmVector &p1, const GmVector &p2, const GmVector &p3)
Calculates the area of the triangle determined by points p1, p2 and p3 (2D or 3D),...
Definition: gmGeometryUtils.cpp:165
virtual double dimension(const GmMatrix &X) const
Returns the Tri6 area by numeric integration.
Definition: gmTriCellGeometryInfo.h:164
GmShape specialization for a 3D Triangle with 6 nodes object.
Definition: gmTriShape.h:202
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 6, -1, 2, 2 > GmQuadraticTriIntegrationRuleSetDefaults
The set of default rules for a quadratic Tri ELEMENT. Template parameters 2 to 5 are the default rule...
Definition: gmTriCellGeometryInfo.h:69
static const GmTri3CellGeometryInfo * instance()
Instance function for the Tri3 single geometry object.
Definition: gmTriCellGeometryInfo.cpp:33
bool pointInTesselatedPolygon_T6(const GmMatrix &X, const GmVector &p)
Returns true if the point p is inside the tesselated T6 polygon or false otherwise.
Definition: gmGeometryUtils.cpp:666
The Tri3 implementation.
Definition: gmTriCellGeometryInfo.h:82
The Tri3D6 implementation.
Definition: gmTriCellGeometryInfo.h:192
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
Declaration of the GmTriXxxxIntegrationRule family of classes, including border rules....
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: gmTriCellGeometryInfo.h:171
Declaration of the GmCellGeometryInfo base class.
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: gmTriCellGeometryInfo.h:90
static const GmTri6CellGeometryInfo * instance()
Instance function for the Tri6 single geometry object.
Definition: gmTriCellGeometryInfo.cpp:111
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition: gmVector.h:34
GmCellGeometryIntegrationRuleSetDefaultRules< GM_GAUSS_RULE_TYPE, 3, -1, -1, -1 > GmQuadraticTriEdgeIntegrationRuleSetDefaults
The set of default rules for a quadratic Tri EDGE. Template parameters 2 to 5 are the default rule nu...
Definition: gmTriCellGeometryInfo.h:74
GmShape specialization for a Triangle with 3 nodes object.
Definition: gmTriShape.h:111
arma::mat GmMatrix
The basic type for a GeMA matrix object. Currently based on an Armadillo matrix.
Definition: gmMatrix.h:38
GmTri3CellGeometryInfo(GmCellGeometryMetadata &&metadata)
Protected constructor. Only a single Tri3 geometry info object is ever necessary, created by GmTriCel...
Definition: gmTriCellGeometryInfo.h:115
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: gmTriCellGeometryInfo.h:106
GmShape specialization for a 3D Triangle with 3 nodes object.
Definition: gmTriShape.h:171
virtual void centroidCartesian(const GmMatrix &X, GmVector &coord) const
Returns the Tri6 centroid by numeric integration.
Definition: gmTriCellGeometryInfo.h:167
virtual void centroidCartesian(const GmMatrix &X, GmVector &coord) const
Returns the Tri3 centroid by calculating the mean of the vertices (simplex centroid)
Definition: gmTriCellGeometryInfo.h:99