template<typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE, int NUM_DOF_PER_TEST_SP, int NUM_DOF_PER_TRIAL_SP>
class geosx::finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, NUM_DOF_PER_TEST_SP, NUM_DOF_PER_TRIAL_SP >
Define the base interface for finite element kernels.
- Template Parameters
-
SUBREGION_TYPE | The type of subregion that the kernel will act on. |
CONSTITUTIVE_TYPE | The type of constitutive model present in the subregion. |
NUM_TEST_SUPPORT_POINTS_PER_ELEM | The number of test space support points per element. |
NUM_TRIAL_SUPPORT_POINTS_PER_ELEM | The number of trial space support points per element. |
NUM_DOF_PER_TEST_SP | The number of DOF per test support point. |
NUM_DOF_PER_TRIAL_SP | The number of DOF per trial support point. |
KernelBase defines an interface for implementing finite element kernels that will be callable by the family of kernel launch functions. Specific physics kernels may or may not derive from KernelBase, but must follow the same interface in order to be callable from the generic launching functions.
The template parameters of KernelBase should be duplicated as part of the interface, EXCEPT for NUM_DOF_PER_TEST_SP
and NUM_DOF_PER_TRIAL_SP
. These values should be set internally by the physics solver since each physics discretization will have a constant intrinsic value for these quantities. For example, when solving or the heat equation with scalar temperature as the primary variable at the support point, these will have a value of 1. In contrast, when solving a solid mechanics problem, with vector displacement as the primary variable at the support point, these will have a value of 3. Note that the interface provided by geosx::finiteElement::RegionBasedKernelApplication will construct a kernel assuming only the first 4 template arguments.
Definition at line 132 of file KernelBase.hpp.
template<typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE, int NUM_DOF_PER_TEST_SP, int NUM_DOF_PER_TRIAL_SP>
Performs the complete phase for the kernel.
- Template Parameters
-
STACK_VARIABLE_TYPE | The type of StackVariable that holds the stack variables. This is most likely a defined in a type that derives from KernelBase. |
- Parameters
-
k | The element index. |
stack | The StackVariable object that hold the stack variables. |
- Returns
- The maximum contribution to the residual.
The operations typically found in complete are the mapping of the local Jacobian and Residual into the global Jacobian and Residual.
Definition at line 250 of file KernelBase.hpp.
template<typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE, int NUM_DOF_PER_TEST_SP, int NUM_DOF_PER_TRIAL_SP>
template<typename POLICY , typename KERNEL_TYPE >
Kernel Launcher.
- Template Parameters
-
POLICY | The RAJA policy to use for the launch. |
NUM_QUADRATURE_POINTS | The number of quadrature points per element. |
KERNEL_TYPE | The type of Kernel to execute. |
- Parameters
-
numElems | The number of elements to process in this launch. |
kernelComponent | The instantiation of KERNEL_TYPE to execute. |
- Returns
- The maximum residual contribution.
This is a generic launching function for all of the finite element kernels that follow the interface set by KernelBase.
Definition at line 276 of file KernelBase.hpp.
template<typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE, int NUM_DOF_PER_TEST_SP, int NUM_DOF_PER_TRIAL_SP>
Performs a state update at a quadrature point.
- Template Parameters
-
STACK_VARIABLE_TYPE | The type of StackVariable that holds the stack variables. This is most likely a defined in a type that derives from KernelBase. |
- Parameters
-
k | The element index. |
q | The quadrature point index. |
stack | The StackVariable object that hold the stack variables. |
The operations found here are the mapping from the support points to the quadrature point, calculation of gradients, etc. From this data the state of the constitutive model is updated if required by the physics package.
Definition at line 225 of file KernelBase.hpp.
template<typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE, int NUM_DOF_PER_TEST_SP, int NUM_DOF_PER_TRIAL_SP>
Performs the setup phase for the kernel.
- Template Parameters
-
STACK_VARIABLE_TYPE | The type of StackVariable that holds the stack variables. This is most likely a defined in a type that derives from KernelBase. |
- Parameters
-
k | The element index. |
stack | The StackVariable object that hold the stack variables. |
The operations typically found in setup are thing such as the collection of global data into local stack storage.
Definition at line 200 of file KernelBase.hpp.
template<typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE, int NUM_DOF_PER_TEST_SP, int NUM_DOF_PER_TRIAL_SP>
CONSTITUTIVE_TYPE::KernelWrapper const geosx::finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, NUM_DOF_PER_TEST_SP, NUM_DOF_PER_TRIAL_SP >::m_constitutiveUpdate |
|
protected |
The constitutive update object used to update the constitutive state, and extract constitutive data.
Definition at line 309 of file KernelBase.hpp.
template<typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE, int NUM_DOF_PER_TEST_SP, int NUM_DOF_PER_TRIAL_SP>
constexpr int geosx::finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, NUM_DOF_PER_TEST_SP, NUM_DOF_PER_TRIAL_SP >::numDofPerTestSupportPoint = NUM_DOF_PER_TEST_SP |
|
static |
Compile time value for the number of degrees of freedom per test function support point.
Definition at line 145 of file KernelBase.hpp.
template<typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE, int NUM_DOF_PER_TEST_SP, int NUM_DOF_PER_TRIAL_SP>
constexpr int geosx::finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, NUM_DOF_PER_TEST_SP, NUM_DOF_PER_TRIAL_SP >::numDofPerTrialSupportPoint = NUM_DOF_PER_TRIAL_SP |
|
static |
Compile time value for the number of degrees of freedom per trial function support point.
Definition at line 149 of file KernelBase.hpp.