24 #ifndef _GEMA_CELL_GEOMETRY_INFO_H_ 25 #define _GEMA_CELL_GEOMETRY_INFO_H_ 33 #include <QAtomicPointer> 167 virtual GmShape* shapeInstance(
int P,
int Q)
const = 0;
243 virtual double dimension(
const GmMatrix& X)
const = 0;
249 virtual void centroidCartesian(
const GmMatrix& X,
GmVector& coord)
const = 0;
264 virtual bool isValid(
const GmMatrix& X,
double tol)
const { Q_UNUSED(tol); Q_UNUSED(X);
return true; }
275 if (arma::det(J) > tol) {
278 arma::svd_econ(U, s, V, J,
"left");
281 return s[s.n_elem - 1] / s[0];
314 template <
class RuleSet,
class RuleSetDefaults>
324 Q_UNUSED(P); Q_UNUSED(Q);
325 return RuleSet::instance<RuleSetDefaults>(
this, irType, rule1, rule2, rule3);
331 Q_UNUSED(irType); Q_UNUSED(rule1); Q_UNUSED(P); Q_UNUSED(Q);
338 Q_UNUSED(faceType); Q_UNUSED(irType); Q_UNUSED(rule1); Q_UNUSED(rule2); Q_UNUSED(P); Q_UNUSED(Q);
347 template <
class RuleSet,
class RuleSetDefaults,
class EdgeRuleSet,
class EdgeRuleSetDefaults>
357 Q_UNUSED(P); Q_UNUSED(Q);
358 return RuleSet::instance<RuleSetDefaults>(
this, irType, rule1, rule2, rule3);
364 Q_UNUSED(P); Q_UNUSED(Q);
365 return EdgeRuleSet::edgeInstance<EdgeRuleSetDefaults>(
this, irType, rule1);
371 Q_UNUSED(faceType); Q_UNUSED(irType); Q_UNUSED(rule1); Q_UNUSED(rule2); Q_UNUSED(P); Q_UNUSED(Q);
379 template <
class RuleSet,
class RuleSetDefaults,
class EdgeRuleSet,
class EdgeRuleSetDefaults,
class FaceRuleSet,
class FaceRuleSetDefaults>
389 Q_UNUSED(P); Q_UNUSED(Q);
390 return RuleSet::instance<RuleSetDefaults>(
this, irType, rule1, rule2, rule3);
396 Q_UNUSED(P); Q_UNUSED(Q);
397 return EdgeRuleSet::edgeInstance<EdgeRuleSetDefaults>(
this, irType, rule1);
403 Q_UNUSED(P); Q_UNUSED(Q);
404 return FaceRuleSet::faceInstance<FaceRuleSetDefaults>(
this, faceType, irType, rule1, rule2);
GmIntegrationRuleType
The type of desired integration rule (Gauss quadrature, Lobatto quadrature, etc)
Definition: gmIntegrationRule.h:67
Can the cell geometry info type check wheter a point is inside a cell?
Definition: gmCellGeometryInfo.h:50
GmCellGeometryInfoSurfaceElement(GmCellGeometryMetadata &&metadata)
Constructor receiving as parameter a metadata object that will be MOVED to the new object.
Definition: gmCellGeometryInfo.h:352
An auxiliary class that can be used as base for line (bar) elements. Implements the needed integratio...
Definition: gmCellGeometryInfo.h:315
An auxiliary class that can be used as base for solid elements. Implements the needed integration rul...
Definition: gmCellGeometryInfo.h:380
NOT a cell type. Stores the number of available types.
Definition: gmCellType.h:77
GmCellGeometryInfoSolidElement(GmCellGeometryMetadata &&metadata)
Constructor receiving as parameter a metadata object that will be MOVED to the new object.
Definition: gmCellGeometryInfo.h:384
Declaration of usefull configuration definitions for the Core library.
GmCellGeometryInfo(GmCellGeometryMetadata &&metadata)
Standard move constructor receiving the type metadata.
Definition: gmCellGeometryInfo.h:160
Declaration of the GmCellType enum.
virtual GmBorderIntegrationRule * edgeIntegrationRule(GmIntegrationRuleType irType, int rule1, int P, int Q) const
A factory function that returns a new border integration rule object suited for this kind of element....
Definition: gmCellGeometryInfo.h:362
Declaration of the GmMatrix class.
GmCellGeometryInfoLineElement(GmCellGeometryMetadata &&metadata)
Constructor receiving as parameter a metadata object that will be MOVED to the new object.
Definition: gmCellGeometryInfo.h:319
Not a capability type. Stores the number of capabilities in the enum.
Definition: gmCellGeometryInfo.h:53
Declaration of the GmIntegrationRule class and its helper decendants.
GmCellGeometryInfo(const GmCellGeometryInfo &other)
Standard copy constructor receiving the type metadata.
Definition: gmCellGeometryInfo.h:157
Integration rule base classe.
Definition: gmIntegrationRule.h:88
Shape function handling base classe.
Definition: gmShape.h:37
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: gmCellGeometryInfo.h:264
virtual GmIntegrationRule * integrationRule(GmIntegrationRuleType irType, int rule1, int rule2, int rule3, int P, int Q) const
A factory function that returns a new integration rule object suited for this kind of element.
Definition: gmCellGeometryInfo.h:387
virtual GmIntegrationRule * integrationRule(GmIntegrationRuleType irType, int rule1, int rule2, int rule3, int P, int Q) const
Element integration rule factory. See comments on the base class.
Definition: gmCellGeometryInfo.h:322
Can the cell geometry info type check if a cell is valid?
Definition: gmCellGeometryInfo.h:48
GmCellGeometryCapabilities
An enum storing the possible geometric capabilities for a cell geometry info type that can be queried...
Definition: gmCellGeometryInfo.h:42
Border integration rule base classe.
Definition: gmBorderIntegrationRule.h:37
virtual double quality(const GmMatrix &J, double tol) const
Virtual method that should be implemented if this geometry info supports the GM_CELL_GEOMETRY_QUALITY...
Definition: gmCellGeometryInfo.h:273
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: gmCellGeometryInfo.h:292
virtual GmBorderIntegrationRule * edgeIntegrationRule(GmIntegrationRuleType irType, int rule1, int P, int Q) const
A factory function that returns a new border integration rule object suited for this kind of element....
Definition: gmCellGeometryInfo.h:394
An auxiliary class that can be used as base for surface elements. Implements the needed integration r...
Definition: gmCellGeometryInfo.h:348
Declaration of the GmVector class.
virtual GmBorderIntegrationRule * faceIntegrationRule(int faceType, GmIntegrationRuleType irType, int rule1, int rule2, int P, int Q) const
A factory function that returns a new border integration rule object suited for this kind of element....
Definition: gmCellGeometryInfo.h:369
#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 GmBorderIntegrationRule * faceIntegrationRule(int faceType, GmIntegrationRuleType irType, int rule1, int rule2, int P, int Q) const
A factory function that returns a new border integration rule object suited for this kind of element....
Definition: gmCellGeometryInfo.h:401
GmCellType
Mesh Cell types. Don't change type orders or add types without reading comments below.
Definition: gmCellType.h:30
virtual GmBorderIntegrationRule * edgeIntegrationRule(GmIntegrationRuleType irType, int rule1, int P, int Q) const
A factory function that returns a new border integration rule object suited for this kind of element....
Definition: gmCellGeometryInfo.h:329
virtual GmIntegrationRule * integrationRule(GmIntegrationRuleType irType, int rule1, int rule2, int rule3, int P, int Q) const
A factory function that returns a new integration rule object suited for this kind of element.
Definition: gmCellGeometryInfo.h:355
Definition: gmCellGeometryInfo.h:153
static QMutex _cellIntegrationRulesMutex
The mutex protecting _cellIntegrationRules.
Definition: gmCellGeometryInfo.h:307
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition: gmVector.h:34
virtual GmBorderIntegrationRule * faceIntegrationRule(int faceType, GmIntegrationRuleType irType, int rule1, int rule2, int P, int Q) const
A factory function that returns a new border integration rule object suited for this kind of element....
Definition: gmCellGeometryInfo.h:336
arma::mat GmMatrix
The basic type for a GeMA matrix object. Currently based on an Armadillo matrix.
Definition: gmMatrix.h:38
GmCellFamilyType
Mesh cell type families. Use to group all quad, tri, etc elements in a "family". Its start value is a...
Definition: gmCellType.h:106
Can the cell geometry info type give a cell quality measure?
Definition: gmCellGeometryInfo.h:49