GEOSX
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
geosx::finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, NUM_DOF_PER_TEST_SP, NUM_DOF_PER_TRIAL_SP > Class Template Reference

Define the base interface for finite element kernels. More...

#include <KernelBase.hpp>

Inheritance diagram for geosx::finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, NUM_DOF_PER_TEST_SP, NUM_DOF_PER_TRIAL_SP >:
Inheritance graph
[legend]

Classes

struct  StackVariables
 Kernel variables allocated on the stack. More...
 

Public Member Functions

 KernelBase (SUBREGION_TYPE const &elementSubRegion, FE_TYPE const &finiteElementSpace, CONSTITUTIVE_TYPE *const inputConstitutiveType)
 Constructor. More...
 
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE void setup (localIndex const k, StackVariables &stack) const
 Performs the setup phase for the kernel. More...
 
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE void quadraturePointKernel (localIndex const k, localIndex const q, StackVariables &stack) const
 Performs a state update at a quadrature point. More...
 
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE real64 complete (localIndex const k, StackVariables &stack) const
 Performs the complete phase for the kernel. More...
 

Static Public Member Functions

template<typename POLICY , typename KERNEL_TYPE >
static real64 kernelLaunch (localIndex const numElems, KERNEL_TYPE const &kernelComponent)
 Kernel Launcher. More...
 

Static Public Attributes

static constexpr int numTestSupportPointsPerElem = FE_TYPE::numNodes
 
static constexpr int numTrialSupportPointsPerElem = FE_TYPE::numNodes
 
static constexpr int numDofPerTestSupportPoint = NUM_DOF_PER_TEST_SP
 
static constexpr int numDofPerTrialSupportPoint = NUM_DOF_PER_TRIAL_SP
 
static constexpr int numQuadraturePointsPerElem = FE_TYPE::numQuadraturePoints
 Compile time value for the number of quadrature points per element.
 

Protected Attributes

traits::ViewTypeConst< typename SUBREGION_TYPE::NodeMapType::base_type > const m_elemsToNodes
 The element to nodes map.
 
arrayView1d< integer const > const m_elemGhostRank
 The element ghost rank array.
 
CONSTITUTIVE_TYPE::KernelWrapper const m_constitutiveUpdate
 
FE_TYPE const & m_finiteElementSpace
 

Detailed Description

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_TYPEThe type of subregion that the kernel will act on.
CONSTITUTIVE_TYPEThe type of constitutive model present in the subregion.
NUM_TEST_SUPPORT_POINTS_PER_ELEMThe number of test space support points per element.
NUM_TRIAL_SUPPORT_POINTS_PER_ELEMThe number of trial space support points per element.
NUM_DOF_PER_TEST_SPThe number of DOF per test support point.
NUM_DOF_PER_TRIAL_SPThe number of DOF per trial support point.

General KernelBase Description

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.

Constructor & Destructor Documentation

◆ KernelBase()

template<typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE, int NUM_DOF_PER_TEST_SP, int NUM_DOF_PER_TRIAL_SP>
geosx::finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, NUM_DOF_PER_TEST_SP, NUM_DOF_PER_TRIAL_SP >::KernelBase ( SUBREGION_TYPE const &  elementSubRegion,
FE_TYPE const &  finiteElementSpace,
CONSTITUTIVE_TYPE *const  inputConstitutiveType 
)
inline

Constructor.

Parameters
elementSubRegionReference to the SUBREGION_TYPE(class template parameter) object.
inputConstitutiveTypeThe constitutive object.
finiteElementSpacePlaceholder for the finite element space object, which currently doesn't do much.

Definition at line 162 of file KernelBase.hpp.

Member Function Documentation

◆ complete()

template<typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE, int NUM_DOF_PER_TEST_SP, int NUM_DOF_PER_TRIAL_SP>
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE real64 geosx::finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, NUM_DOF_PER_TEST_SP, NUM_DOF_PER_TRIAL_SP >::complete ( localIndex const  k,
StackVariables stack 
) const
inline

Performs the complete phase for the kernel.

Template Parameters
STACK_VARIABLE_TYPEThe type of StackVariable that holds the stack variables. This is most likely a defined in a type that derives from KernelBase.
Parameters
kThe element index.
stackThe StackVariable object that hold the stack variables.
Returns
The maximum contribution to the residual.

KernelBase::complete() Description

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.

◆ kernelLaunch()

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 >
static real64 geosx::finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, NUM_DOF_PER_TEST_SP, NUM_DOF_PER_TRIAL_SP >::kernelLaunch ( localIndex const  numElems,
KERNEL_TYPE const &  kernelComponent 
)
inlinestatic

Kernel Launcher.

Template Parameters
POLICYThe RAJA policy to use for the launch.
NUM_QUADRATURE_POINTSThe number of quadrature points per element.
KERNEL_TYPEThe type of Kernel to execute.
Parameters
numElemsThe number of elements to process in this launch.
kernelComponentThe 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.

◆ quadraturePointKernel()

template<typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE, int NUM_DOF_PER_TEST_SP, int NUM_DOF_PER_TRIAL_SP>
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE void geosx::finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, NUM_DOF_PER_TEST_SP, NUM_DOF_PER_TRIAL_SP >::quadraturePointKernel ( localIndex const  k,
localIndex const  q,
StackVariables stack 
) const
inline

Performs a state update at a quadrature point.

Template Parameters
STACK_VARIABLE_TYPEThe type of StackVariable that holds the stack variables. This is most likely a defined in a type that derives from KernelBase.
Parameters
kThe element index.
qThe quadrature point index.
stackThe StackVariable object that hold the stack variables.

KernelBase::quadraturePointKernel() Description

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.

◆ setup()

template<typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE, int NUM_DOF_PER_TEST_SP, int NUM_DOF_PER_TRIAL_SP>
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE void geosx::finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, NUM_DOF_PER_TEST_SP, NUM_DOF_PER_TRIAL_SP >::setup ( localIndex const  k,
StackVariables stack 
) const
inline

Performs the setup phase for the kernel.

Template Parameters
STACK_VARIABLE_TYPEThe type of StackVariable that holds the stack variables. This is most likely a defined in a type that derives from KernelBase.
Parameters
kThe element index.
stackThe StackVariable object that hold the stack variables.

KernelBase::setup() Description

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.

Member Data Documentation

◆ m_constitutiveUpdate

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.

◆ m_finiteElementSpace

template<typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE, int NUM_DOF_PER_TEST_SP, int NUM_DOF_PER_TRIAL_SP>
FE_TYPE const& geosx::finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, NUM_DOF_PER_TEST_SP, NUM_DOF_PER_TRIAL_SP >::m_finiteElementSpace
protected

The finite element space/discretization object for the element type in the SUBREGION_TYPE.

Definition at line 313 of file KernelBase.hpp.

◆ numDofPerTestSupportPoint

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.

◆ numDofPerTrialSupportPoint

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.

◆ numTestSupportPointsPerElem

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 >::numTestSupportPointsPerElem = FE_TYPE::numNodes
static

Compile time value for the number of test function support points per element.

Definition at line 137 of file KernelBase.hpp.

◆ numTrialSupportPointsPerElem

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 >::numTrialSupportPointsPerElem = FE_TYPE::numNodes
static

Compile time value for the number of trial function support points per element.

Definition at line 141 of file KernelBase.hpp.


The documentation for this class was generated from the following file: