20 #if defined(GEOS_USE_DEVICE)
21 #define CALC_FEM_SHAPE_IN_KERNEL
26 #ifndef GEOS_FINITEELEMENT_ELEMENTFORMULATIONS_FINITEELEMENTBASE_HPP_
27 #define GEOS_FINITEELEMENT_ELEMENTFORMULATIONS_FINITEELEMENTBASE_HPP_
31 #include "finiteElement/PDEUtilities.hpp"
32 #include "LvArray/src/tensorOps.hpp"
62 #ifdef CALC_FEM_SHAPE_IN_KERNEL
116 template<
typename SUBREGION_TYPE >
135 template<
typename SUBREGION_TYPE >
139 SUBREGION_TYPE
const & cellSubRegion,
159 template<
typename LEAF,
typename SUBREGION_TYPE >
163 SUBREGION_TYPE
const & cellSubRegion,
167 LEAF::template fillMeshData< SUBREGION_TYPE >( nodeManager,
181 template<
typename SUBREGION_TYPE >
202 template<
typename LEAF,
typename SUBREGION_TYPE >
206 typename LEAF::StackVariables & stack )
const
208 LEAF::setupStack( cellIndex, meshData, stack );
250 template<
typename LEAF >
254 return LEAF::getNumSupportPoints( stack );
277 template<
typename LEAF >
281 real64 const (&X)[LEAF::maxSupportPoints][3],
282 real64 ( &gradN )[LEAF::maxSupportPoints][3] )
const;
296 template<
typename LEAF >
300 real64 const (&X)[LEAF::maxSupportPoints][3],
301 typename LEAF::StackVariables
const & stack,
302 real64 ( &gradN )[LEAF::maxSupportPoints][3] )
const;
315 template<
typename LEAF >
320 real64 ( &gradN )[LEAF::maxSupportPoints][3] )
const;
333 template<
typename LEAF >
338 typename LEAF::StackVariables
const & stack,
339 real64 ( &gradN )[LEAF::maxSupportPoints][3] )
const;
352 template< localIndex NUMDOFSPERTRIALSUPPORTPOINT, localIndex MAXSUPPORTPOINTS,
bool UPPER >
357 [MAXSUPPORTPOINTS * NUMDOFSPERTRIALSUPPORTPOINT]
358 [MAXSUPPORTPOINTS * NUMDOFSPERTRIALSUPPORTPOINT],
359 real64 const & scaleFactor )
376 template<
typename LEAF, localIndex NUMDOFSPERTRIALSUPPORTPOINT,
bool UPPER = false >
380 [LEAF::maxSupportPoints * NUMDOFSPERTRIALSUPPORTPOINT]
381 [LEAF::maxSupportPoints * NUMDOFSPERTRIALSUPPORTPOINT],
382 real64 const scaleFactor = 1.0 )
const
385 LEAF::maxSupportPoints,
404 template< localIndex NUMDOFSPERTRIALSUPPORTPOINT, localIndex MAXSUPPORTPOINTS >
408 real64 const ( &dofs )[MAXSUPPORTPOINTS][NUMDOFSPERTRIALSUPPORTPOINT],
409 real64 ( & targetVector )[MAXSUPPORTPOINTS][NUMDOFSPERTRIALSUPPORTPOINT],
410 real64 const scaleFactor )
431 template<
typename LEAF, localIndex NUMDOFSPERTRIALSUPPORTPOINT >
436 real64 const ( &dofs )[LEAF::maxSupportPoints]
437 [NUMDOFSPERTRIALSUPPORTPOINT],
438 real64 ( & targetVector )[LEAF::maxSupportPoints]
439 [NUMDOFSPERTRIALSUPPORTPOINT],
440 real64 const scaleFactor = 1.0 )
const
443 addEvaluatedGradGradStabilization< NUMDOFSPERTRIALSUPPORTPOINT, LEAF::maxSupportPoints >( stack,
473 template<
int NUM_SUPPORT_POINTS >
477 real64 const (&var)[NUM_SUPPORT_POINTS],
485 template<
int NUM_SUPPORT_POINTS,
490 real64 const (&var)[NUM_SUPPORT_POINTS][NUM_COMPONENTS],
518 template<
int NUM_SUPPORT_POINTS,
519 typename GRADIENT_TYPE >
522 real64 const (&var)[NUM_SUPPORT_POINTS][3],
537 template<
int NUM_SUPPORT_POINTS,
538 typename GRADIENT_TYPE >
541 real64 const (&var)[NUM_SUPPORT_POINTS][3] );
559 template<
int NUM_SUPPORT_POINTS,
560 typename GRADIENT_TYPE >
563 real64 const (&var)[NUM_SUPPORT_POINTS],
576 template<
int NUM_SUPPORT_POINTS,
577 typename GRADIENT_TYPE >
580 real64 const (&var)[NUM_SUPPORT_POINTS][3],
581 real64 ( &gradVar )[3][3] );
602 template<
int NUM_SUPPORT_POINTS,
603 typename GRADIENT_TYPE >
606 GRADIENT_TYPE
const & gradN,
607 real64 const (&var)[NUM_SUPPORT_POINTS],
641 template<
int NUM_SUPPORT_POINTS,
642 typename GRADIENT_TYPE >
645 real64 const (&var_detJxW)[6],
646 real64 ( &R )[NUM_SUPPORT_POINTS][3] );
653 template<
int NUM_SUPPORT_POINTS,
654 typename GRADIENT_TYPE >
657 real64 const (&var_detJxW)[3][3],
658 real64 ( &R )[NUM_SUPPORT_POINTS][3] );
668 template<
int NUM_SUPPORT_POINTS >
671 real64 const (&forcingTerm_detJxW)[3],
672 real64 ( &R )[NUM_SUPPORT_POINTS][3] );
691 template<
int NUM_SUPPORT_POINTS,
692 typename GRADIENT_TYPE >
695 real64 const (&var_detJxW)[3][3],
696 real64 const (&N)[NUM_SUPPORT_POINTS],
697 real64 const (&forcingTerm_detJxW)[3],
698 real64 ( &R )[NUM_SUPPORT_POINTS][3] );
705 template<
int NUM_SUPPORT_POINTS,
706 typename GRADIENT_TYPE >
709 real64 const (&var_detJxW)[6],
710 real64 const (&N)[NUM_SUPPORT_POINTS],
711 real64 const (&forcingTerm_detJxW)[3],
712 real64 ( &R )[NUM_SUPPORT_POINTS][3] );
723 "2nd-dimension of gradN array does not match number of quadrature points" );
726 "3rd-dimension of gradN array does not match number of support points" );
729 "4th-dimension of gradN array does not match 3" );
742 "2nd-dimension of gradN array does not match number of quadrature points" );
786 return PDEUtilities::FunctionSpace::H1;
791 struct FiniteElementBase::FunctionSpaceHelper< 3 >
796 return PDEUtilities::FunctionSpace::H1vector;
804 return FunctionSpaceHelper< N >::getFunctionSpace();
807 template<
typename LEAF >
812 real64 const (&X)[LEAF::maxSupportPoints][3],
813 real64 (& gradN)[LEAF::maxSupportPoints][3] )
const
816 return LEAF::calcGradN( q, X, gradN );
819 template<
typename LEAF >
824 real64 const (&X)[LEAF::maxSupportPoints][3],
825 typename LEAF::StackVariables
const & stack,
826 real64 ( & gradN )[LEAF::maxSupportPoints][3] )
const
829 return LEAF::calcGradN( q, X, stack, gradN );
832 template<
typename LEAF >
838 real64 (& gradN)[LEAF::maxSupportPoints][3] )
const
842 LvArray::tensorOps::copy< LEAF::maxSupportPoints, 3 >( gradN,
m_viewGradN[ k ][ q ] );
847 template<
typename LEAF >
853 typename LEAF::StackVariables
const & stack,
854 real64 (& gradN)[LEAF::maxSupportPoints][3] )
const
859 LvArray::tensorOps::copy< LEAF::maxSupportPoints, 3 >( gradN,
m_viewGradN[ k ][ q ] );
868 template<
int NUM_SUPPORT_POINTS >
872 real64 const (&var)[NUM_SUPPORT_POINTS],
875 value = LvArray::tensorOps::AiBi< NUM_SUPPORT_POINTS >( N, var );
878 template<
int NUM_SUPPORT_POINTS,
883 real64 const (&var)[NUM_SUPPORT_POINTS][NUM_COMPONENTS],
884 real64 (& value)[NUM_COMPONENTS] )
887 LvArray::tensorOps::Ri_eq_AjiBj< 3, NUM_SUPPORT_POINTS >(
value, var, N );
895 template<
int NUM_SUPPORT_POINTS,
896 typename GRADIENT_TYPE >
900 real64 const (&var)[NUM_SUPPORT_POINTS][3],
903 gradVar[0] = gradN[0][0] * var[0][0];
904 gradVar[1] = gradN[0][1] * var[0][1];
905 gradVar[2] = gradN[0][2] * var[0][2];
906 gradVar[3] = gradN[0][2] * var[0][1] + gradN[0][1] * var[0][2];
907 gradVar[4] = gradN[0][2] * var[0][0] + gradN[0][0] * var[0][2];
908 gradVar[5] = gradN[0][1] * var[0][0] + gradN[0][0] * var[0][1];
910 for(
int a=1; a<NUM_SUPPORT_POINTS; ++a )
912 gradVar[0] = gradVar[0] + gradN[a][0] * var[ a ][0];
913 gradVar[1] = gradVar[1] + gradN[a][1] * var[ a ][1];
914 gradVar[2] = gradVar[2] + gradN[a][2] * var[ a ][2];
915 gradVar[3] = gradVar[3] + gradN[a][2] * var[ a ][1] + gradN[a][1] * var[ a ][2];
916 gradVar[4] = gradVar[4] + gradN[a][2] * var[ a ][0] + gradN[a][0] * var[ a ][2];
917 gradVar[5] = gradVar[5] + gradN[a][1] * var[ a ][0] + gradN[a][0] * var[ a ][1];
921 template<
int NUM_SUPPORT_POINTS,
922 typename GRADIENT_TYPE >
926 real64 const (&var)[NUM_SUPPORT_POINTS][3] )
928 real64 result = gradN[0][0] * var[0][0] + gradN[0][1] * var[0][1] + gradN[0][2] * var[0][2];
930 for(
int a=1; a<NUM_SUPPORT_POINTS; ++a )
932 result = result + gradN[a][0] * var[a][0] + gradN[a][1] * var[a][1] + gradN[a][2] * var[a][2];
937 template<
int NUM_SUPPORT_POINTS,
938 typename GRADIENT_TYPE >
942 real64 const (&var)[NUM_SUPPORT_POINTS],
945 LvArray::tensorOps::Ri_eq_AjiBj< 3, NUM_SUPPORT_POINTS >( gradVar, gradN, var );
948 template<
int NUM_SUPPORT_POINTS,
949 typename GRADIENT_TYPE >
953 real64 const (&var)[NUM_SUPPORT_POINTS][3],
954 real64 (& gradVar)[3][3] )
956 LvArray::tensorOps::Rij_eq_AkiBkj< 3, 3, NUM_SUPPORT_POINTS >( gradVar, var, gradN );
961 template<
int NUM_SUPPORT_POINTS,
962 typename GRADIENT_TYPE >
966 GRADIENT_TYPE
const & gradN,
967 real64 const (&var)[NUM_SUPPORT_POINTS],
971 value = N[0] * var[0];
972 for(
int i = 0; i < 3; ++i )
974 gradVar[i] = var[0] * gradN[0][i];
977 for(
int a=1; a<NUM_SUPPORT_POINTS; ++a )
980 for(
int i = 0; i < 3; ++i )
982 gradVar[i] = gradVar[i] + var[ a ] * gradN[a][i];
989 template<
int NUM_SUPPORT_POINTS,
990 typename GRADIENT_TYPE >
994 real64 const (&var_detJxW)[6],
995 real64 (& R)[NUM_SUPPORT_POINTS][3] )
997 for(
int a=0; a<NUM_SUPPORT_POINTS; ++a )
999 R[a][0] = R[a][0] + var_detJxW[0] * gradN[a][0] + var_detJxW[5] * gradN[a][1] + var_detJxW[4] * gradN[a][2];
1000 R[a][1] = R[a][1] + var_detJxW[5] * gradN[a][0] + var_detJxW[1] * gradN[a][1] + var_detJxW[3] * gradN[a][2];
1001 R[a][2] = R[a][2] + var_detJxW[4] * gradN[a][0] + var_detJxW[3] * gradN[a][1] + var_detJxW[2] * gradN[a][2];
1006 template<
int NUM_SUPPORT_POINTS,
1007 typename GRADIENT_TYPE >
1011 real64 const (&var_detJxW)[3][3],
1012 real64 (& R)[NUM_SUPPORT_POINTS][3] )
1014 for(
int a=0; a<NUM_SUPPORT_POINTS; ++a )
1016 LvArray::tensorOps::Ri_add_AijBj< 3, 3 >( R[a], var_detJxW, gradN[a] );
1020 template<
int NUM_SUPPORT_POINTS >
1024 real64 const (&var_detJxW)[3],
1025 real64 ( & R )[NUM_SUPPORT_POINTS][3] )
1027 for(
int a=0; a<NUM_SUPPORT_POINTS; ++a )
1029 LvArray::tensorOps::scaledAdd< 3 >( R[a], var_detJxW, N[a] );
1034 template<
int NUM_SUPPORT_POINTS,
1035 typename GRADIENT_TYPE >
1039 real64 const (&var_detJxW)[6],
1040 real64 const (&N)[NUM_SUPPORT_POINTS],
1041 real64 const (&forcingTerm_detJxW)[3],
1042 real64 (& R)[NUM_SUPPORT_POINTS][3] )
1044 for(
int a=0; a<NUM_SUPPORT_POINTS; ++a )
1046 R[a][0] = R[a][0] + var_detJxW[0] * gradN[a][0] + var_detJxW[5] * gradN[a][1] + var_detJxW[4] * gradN[a][2] + forcingTerm_detJxW[0] * N[a];
1047 R[a][1] = R[a][1] + var_detJxW[5] * gradN[a][0] + var_detJxW[1] * gradN[a][1] + var_detJxW[3] * gradN[a][2] + forcingTerm_detJxW[1] * N[a];
1048 R[a][2] = R[a][2] + var_detJxW[4] * gradN[a][0] + var_detJxW[3] * gradN[a][1] + var_detJxW[2] * gradN[a][2] + forcingTerm_detJxW[2] * N[a];
1052 template<
int NUM_SUPPORT_POINTS,
1053 typename GRADIENT_TYPE >
1057 real64 const (&var_detJxW)[3][3],
1058 real64 const (&N)[NUM_SUPPORT_POINTS],
1059 real64 const (&forcingTerm_detJxW)[3],
1060 real64 (& R)[NUM_SUPPORT_POINTS][3] )
1062 for(
int a=0; a<NUM_SUPPORT_POINTS; ++a )
1064 R[a][0] = R[a][0] + var_detJxW[0][0] * gradN[a][0] + var_detJxW[0][1] * gradN[a][1] + var_detJxW[0][2] * gradN[a][2] + forcingTerm_detJxW[0] * N[a];
1065 R[a][1] = R[a][1] + var_detJxW[1][0] * gradN[a][0] + var_detJxW[1][1] * gradN[a][1] + var_detJxW[1][2] * gradN[a][2] + forcingTerm_detJxW[1] * N[a];
1066 R[a][2] = R[a][2] + var_detJxW[2][0] * gradN[a][0] + var_detJxW[2][1] * gradN[a][1] + var_detJxW[2][2] * gradN[a][2] + forcingTerm_detJxW[2] * N[a];
1076 #define USING_FINITEELEMENTBASE \
1077 using FiniteElementBase::value; \
1078 using FiniteElementBase::symmetricGradient; \
1079 using FiniteElementBase::gradient; \
1080 using FiniteElementBase::valueAndGradient; \
1081 using FiniteElementBase::plusGradNajAij; \
1082 using FiniteElementBase::plusNaFi; \
1083 using FiniteElementBase::plusGradNajAijPlusNaFi;
#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_ERROR_IF_NE_MSG(lhs, rhs, msg)
Raise a hard error if two values are not equal.
This class provides an interface to ObjectManagerBase in order to manage edge data.
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data.
The NodeManager class provides an interface to ObjectManagerBase in order to manage node data.
Base class for FEM element implementations.
static GEOS_HOST_DEVICE void value(real64 const (&N)[NUM_SUPPORT_POINTS], real64 const (&var)[NUM_SUPPORT_POINTS][NUM_COMPONENTS], real64(&value)[NUM_COMPONENTS])
Compute the interpolated value of a vector variable.
virtual GEOS_HOST_DEVICE localIndex getNumSupportPoints() const =0
Virtual getter for the number of support points per element.
static GEOS_HOST_DEVICE void plusGradNajAijPlusNaFi(GRADIENT_TYPE const &gradN, real64 const (&var_detJxW)[3][3], real64 const (&N)[NUM_SUPPORT_POINTS], real64 const (&forcingTerm_detJxW)[3], real64(&R)[NUM_SUPPORT_POINTS][3])
Inner product of each basis function gradient with a rank-2 symmetric tensor added to the product eac...
virtual GEOS_HOST_DEVICE localIndex getMaxSupportPoints() const =0
Get the maximum number of support points for this element.
static void fillMeshData(NodeManager const &nodeManager, EdgeManager const &edgeManager, FaceManager const &faceManager, SUBREGION_TYPE const &cellSubRegion, MeshData< SUBREGION_TYPE > &meshData)
Method to fill a MeshData object.
arrayView2d< real64 const > getDetJView() const
Getter for m_viewDetJ.
GEOS_HOST_DEVICE static GEOS_FORCE_INLINE void setupStack(localIndex const &cellIndex, MeshData< SUBREGION_TYPE > const &meshData, StackVariables &stack)
Empty setup method.
static GEOS_HOST_DEVICE void plusGradNajAijPlusNaFi(GRADIENT_TYPE const &gradN, real64 const (&var_detJxW)[6], real64 const (&N)[NUM_SUPPORT_POINTS], real64 const (&forcingTerm_detJxW)[3], real64(&R)[NUM_SUPPORT_POINTS][3])
Inner product of each basis function gradient with a rank-2 tensor added to the product each shape fu...
virtual GEOS_HOST_DEVICE ~FiniteElementBase()
Destructor.
static GEOS_HOST_DEVICE void gradient(GRADIENT_TYPE const &gradN, real64 const (&var)[NUM_SUPPORT_POINTS], real64(&gradVar)[3])
Calculate the gradient of a scalar valued support field at a point using the input basis function gra...
static GEOS_HOST_DEVICE void plusGradNajAij(GRADIENT_TYPE const &gradN, real64 const (&var_detJxW)[3][3], real64(&R)[NUM_SUPPORT_POINTS][3])
Inner product of each basis function gradient with a rank-2 symmetric tensor.
FiniteElementBase & operator=(FiniteElementBase const &)=delete
Deleted copy assignment operator.
GEOS_HOST_DEVICE void setup(localIndex const &cellIndex, typename LEAF::template MeshData< SUBREGION_TYPE > const &meshData, typename LEAF::StackVariables &stack) const
Abstract setup method, possibly computing cell-dependent properties.
arrayView4d< real64 const > m_viewGradN
View to potentially hold pre-calculated shape function gradients.
GEOS_HOST_DEVICE FiniteElementBase(FiniteElementBase const &source)
Copy Constructor.
GEOS_HOST_DEVICE static GEOS_FORCE_INLINE 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...
GEOS_HOST_DEVICE real64 getGradN(localIndex const k, localIndex const q, real64 const (&X)[LEAF::maxSupportPoints][3], typename LEAF::StackVariables const &stack, real64(&gradN)[LEAF::maxSupportPoints][3]) const
Get the shape function gradients.
void setDetJView(arrayView2d< real64 const > const &source)
Sets m_viewDetJ equal to an input view.
static GEOS_HOST_DEVICE void plusGradNajAij(GRADIENT_TYPE const &gradN, real64 const (&var_detJxW)[6], real64(&R)[NUM_SUPPORT_POINTS][3])
Inner product of each basis function gradient with a rank-2 symmetric tensor.
FiniteElementBase()=default
Default Constructor.
GEOS_HOST_DEVICE real64 getGradN(localIndex const k, localIndex const q, int const X, real64(&gradN)[LEAF::maxSupportPoints][3]) const
Get the shape function gradients.
GEOS_HOST_DEVICE localIndex numSupportPoints(typename LEAF::StackVariables const &stack) const
Getter for the number of support points per element.
static GEOS_HOST_DEVICE void symmetricGradient(GRADIENT_TYPE const &gradN, real64 const (&var)[NUM_SUPPORT_POINTS][3], real64(&gradVar)[6])
Calculate the symmetric gradient of a vector valued support field at a point using the stored basis f...
virtual GEOS_HOST_DEVICE localIndex getNumQuadraturePoints() const =0
Virtual getter for the number of quadrature points per element.
static void initialize(NodeManager const &nodeManager, EdgeManager const &edgeManager, FaceManager const &faceManager, SUBREGION_TYPE const &cellSubRegion, typename LEAF::template MeshData< SUBREGION_TYPE > &meshData)
Abstract initialization method.
GEOS_HOST_DEVICE static GEOS_FORCE_INLINE void addEvaluatedGradGradStabilization(StackVariables const &stack, real64 const (&dofs)[MAXSUPPORTPOINTS][NUMDOFSPERTRIALSUPPORTPOINT], real64(&targetVector)[MAXSUPPORTPOINTS][NUMDOFSPERTRIALSUPPORTPOINT], real64 const scaleFactor)
Empty method, here for compatibility with methods that require a stabilization of the grad-grad bilin...
FiniteElementBase & operator=(FiniteElementBase &&)=delete
Deleted move assignment operator.
static GEOS_HOST_DEVICE real64 symmetricGradientTrace(GRADIENT_TYPE const &gradN, real64 const (&var)[NUM_SUPPORT_POINTS][3])
Calculate the trace of the symmetric gradient of a vector valued support field (i....
GEOS_HOST_DEVICE void addGradGradStabilizationMatrix(typename LEAF::StackVariables const &stack, real64(&matrix)[LEAF::maxSupportPoints *NUMDOFSPERTRIALSUPPORTPOINT][LEAF::maxSupportPoints *NUMDOFSPERTRIALSUPPORTPOINT], real64 const scaleFactor=1.0) const
Add stabilization of grad-grad bilinear form to input matrix.
static GEOS_HOST_DEVICE void plusNaFi(real64 const (&N)[NUM_SUPPORT_POINTS], real64 const (&forcingTerm_detJxW)[3], real64(&R)[NUM_SUPPORT_POINTS][3])
Product of each shape function with a vector forcing term.
constexpr static GEOS_HOST_DEVICE PDEUtilities::FunctionSpace getFunctionSpace()
Getter for the function space.
GEOS_HOST_DEVICE GEOS_FORCE_INLINE void addEvaluatedGradGradStabilizationVector(typename LEAF::StackVariables const &stack, real64 const (&dofs)[LEAF::maxSupportPoints][NUMDOFSPERTRIALSUPPORTPOINT], real64(&targetVector)[LEAF::maxSupportPoints][NUMDOFSPERTRIALSUPPORTPOINT], real64 const scaleFactor=1.0) const
Add a grad-grad stabilization operator evaluated at a provided vector of dofs to input vector.
GEOS_HOST_DEVICE real64 getGradN(localIndex const k, localIndex const q, real64 const (&X)[LEAF::maxSupportPoints][3], real64(&gradN)[LEAF::maxSupportPoints][3]) const
Get the shape function gradients.
static GEOS_HOST_DEVICE void value(real64 const (&N)[NUM_SUPPORT_POINTS], real64 const (&var)[NUM_SUPPORT_POINTS], real64 &value)
Compute the interpolated value of a variable.
constexpr static int numSamplingPointsPerDirection
Number of sampling points.
arrayView4d< real64 const > getGradNView() const
Getter for m_viewGradN.
FiniteElementBase(FiniteElementBase &&)=default
Default Move constructor.
static GEOS_HOST_DEVICE void gradient(GRADIENT_TYPE const &gradN, real64 const (&var)[NUM_SUPPORT_POINTS][3], real64(&gradVar)[3][3])
Calculate the gradient of a vector valued support field at a point using the input basis function gra...
GEOS_HOST_DEVICE real64 getGradN(localIndex const k, localIndex const q, int const X, typename LEAF::StackVariables const &stack, real64(&gradN)[LEAF::maxSupportPoints][3]) const
Get the shape function gradients.
arrayView2d< real64 const > m_viewDetJ
void setGradNView(arrayView4d< real64 const > const &source)
Sets m_viewGradN equal to an input view.
static GEOS_HOST_DEVICE void valueAndGradient(real64 const (&N)[NUM_SUPPORT_POINTS], GRADIENT_TYPE const &gradN, real64 const (&var)[NUM_SUPPORT_POINTS], real64 &value, real64(&gradVar)[3])
Calculate the value and gradient of a scalar valued support field at a point using the input basis fu...
double real64
64-bit floating point type.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
ArrayView< T, 4, USD > arrayView4d
Alias for 4D array view.
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
An helper struct to determine the function space.
Variables used to initialize the class.
Kernel variables allocated on the stack.
GEOS_HOST_DEVICE StackVariables()