20 #ifndef GEOS_FINITEELEMENT_ELEMENTFORMULATIONS_H1TRIANGLEFACELAGRANGE1GAUSS_HPP_
21 #define GEOS_FINITEELEMENT_ELEMENTFORMULATIONS_H1TRIANGLEFACELAGRANGE1GAUSS_HPP_
50 template<
typename NUM_Q_POINTS >
61 template<
typename SubregionType >
74 static_assert( ( NUM_Q_POINTS::value == 1 ||
75 NUM_Q_POINTS::value == 4 ||
76 NUM_Q_POINTS::value == 6 ),
77 "NUM_Q_POINTS::value must be 1, 4, or 6!" );
183 real64 const r = pointCoord[0];
184 real64 const s = pointCoord[1];
186 N[0] = (1.0 - r - s) * r * s;
202 real64 const qCoords[2] = {quadratureParentCoords0( q ), quadratureParentCoords1( q ) };
227 template< localIndex NUMDOFSPERTRIALSUPPORTPOINT,
bool UPPER >
234 real64 const & scaleFactor );
252 constexpr
static real64 parentArea = 0.5;
256 constexpr
static real64 weight = parentArea;
373 template<
typename NUM_Q_POINTS >
374 template< localIndex NUMDOFSPERTRIALSUPPORTPOINT,
bool UPPER >
380 [maxSupportPoints * NUMDOFSPERTRIALSUPPORTPOINT]
381 [maxSupportPoints * NUMDOFSPERTRIALSUPPORTPOINT],
382 real64 const & scaleFactor )
389 template<
typename NUM_Q_POINTS >
395 real64 ( & N )[numNodes] )
397 real64 const r = coords[0];
398 real64 const s = coords[1];
405 template<
typename NUM_Q_POINTS >
414 real64 const qCoords[2] = {quadratureParentCoords0( q ), quadratureParentCoords1( q ) };
420 template<
typename NUM_Q_POINTS >
426 real64 ( & N )[numNodes] )
428 return calcN( q, N );
433 template<
typename NUM_Q_POINTS >
439 real64 const (&X)[numNodes][3] )
442 real64 n[3] = { ( X[1][1] - X[0][1] ) * ( X[2][2] - X[0][2] ) - ( X[2][1] - X[0][1] ) * ( X[1][2] - X[0][2] ),
443 ( X[2][0] - X[0][0] ) * ( X[1][2] - X[0][2] ) - ( X[1][0] - X[0][0] ) * ( X[2][2] - X[0][2] ),
444 ( X[1][0] - X[0][0] ) * ( X[2][1] - X[0][1] ) - ( X[2][0] - X[0][0] ) * ( X[1][1] - X[0][1] )};
446 return sqrt( n[0] * n[0] + n[1] * n[1] + n[2] * n[2] ) * weight * quadratureWeight( q );
453 template<
typename NUM_Q_POINTS >
#define GEOS_HOST_DEVICE
Marks a host-device function.
#define GEOS_UNUSED_VAR(...)
Mark an unused variable and silence compiler warnings.
#define GEOS_FORCE_INLINE
Marks a function or lambda for inlining.
#define GEOS_UNUSED_PARAM(X)
Mark an unused argument and silence compiler warnings.
Device-compatible (non virtual) Base class for all finite element formulations.
constexpr static localIndex numQuadraturePoints
The number of quadrature points per element.
constexpr static localIndex maxSupportPoints
The maximum number of support points per element.
constexpr static localIndex numNodes
The number of nodes per element.
GEOS_HOST_DEVICE FiniteElementBase_impl & operator=(FiniteElementBase_impl const &)=default
Default copy assignment operator.
Base class for FEM element implementations.
GEOS_HOST_DEVICE static GEOS_FORCE_INLINE void calcBubbleN(real64 const (&pointCoord)[2], real64(&N)[1])
Calculate shape bubble functions values at a given point in the parent space.
static GEOS_HOST_DEVICE void getPermutation(int(&permutation)[numNodes])
Calculate the node permutation between the parent element and the geometric element....
GEOS_HOST_DEVICE localIndex getMaxSupportPoints()
Get the maximum number of support points.
static GEOS_HOST_DEVICE void calcN(localIndex const q, StackVariables const &stack, real64(&N)[numNodes])
Calculate shape functions values for each support point at a quadrature point.
static GEOS_HOST_DEVICE real64 transformedQuadratureWeight(localIndex const q, real64 const (&X)[numNodes][3])
Calculate the integration weights for a quadrature point.
GEOS_HOST_DEVICE localIndex getNumSupportPoints()
Get the number of support points.
static GEOS_HOST_DEVICE void calcN(localIndex const q, real64(&N)[numNodes])
Calculate shape functions values for each support point at a quadrature point.
static GEOS_HOST_DEVICE void calcBubbleN(localIndex const q, real64(&N)[1])
Calculate shape bubble functions values at a quadrature point.
static GEOS_HOST_DEVICE localIndex getNumSupportPoints(StackVariables const &stack)
Get the number of support points.
DO_NOT_DOCUMENT GEOS_HOST_DEVICE localIndex getNumQuadraturePoints()
Get the number of quadrature points.
static GEOS_HOST_DEVICE void addGradGradStabilization(StackVariables const &stack, real64(&matrix)[maxSupportPoints *NUMDOFSPERTRIALSUPPORTPOINT][maxSupportPoints *NUMDOFSPERTRIALSUPPORTPOINT], real64 const &scaleFactor)
Empty method, here for compatibility with methods that require a stabilization of the grad-grad bilin...
static GEOS_HOST_DEVICE localIndex getNumQuadraturePoints(StackVariables const &stack)
Get the number of quadrature points.
typename Base::template MeshData< SubregionType > MeshData
Mesh data structure for the element.
GEOS_HOST_DEVICE static GEOS_FORCE_INLINE void calcN(real64 const (&coords)[2], real64(&N)[numNodes])
Calculate shape functions values at a single point.
H1_TriangleFace_Lagrange1_Gauss()
Constructor.
const H1_TriangleFace_Lagrange1_Gauss_impl< NUM_Q_POINTS > * getImpl() const
Get the device-compatible implementation type.
H1_TriangleFace_Lagrange1_Gauss_impl< NUM_Q_POINTS > * getImpl()
Get the device-compatible implementation type.
virtual ~H1_TriangleFace_Lagrange1_Gauss() override final=default
Destructor.
double real64
64-bit floating point type.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
Kernel variables (dof numbers, jacobian and residual) located on the stack.