GEOS
Classes | Namespaces | Macros | Functions
KernelBase.hpp File Reference
#include "common/DataTypes.hpp"
#include "common/TimingMacros.hpp"
#include "constitutive/ConstitutivePassThru.hpp"
#include "finiteElement/FiniteElementDispatch.hpp"
#include "mesh/MeshLevel.hpp"
#include "common/GEOS_RAJA_Interface.hpp"

Go to the source code of this file.

Classes

class  geos::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. More...
 
struct  geos::finiteElement::KernelBase< SUBREGION_TYPE, CONSTITUTIVE_TYPE, FE_TYPE, NUM_DOF_PER_TEST_SP, NUM_DOF_PER_TRIAL_SP >::StackVariables
 Kernel variables allocated on the stack. More...
 
class  geos::finiteElement::KernelFactory< KERNEL_TYPE, ARGS >
 Used to forward arguments to a class that implements the KernelBase interface. More...
 

Namespaces

 geos
 
 finiteElement
 

Macros

#define SELECTED_FE_TYPES   BASE_FE_TYPES
 This macro allows solvers to select a subset of FE_TYPES on which the dispatch is done. If none are selected, by default all the FE_TYPES apply.
 

Functions

template<typename POLICY , typename CONSTITUTIVE_BASE , typename SUBREGION_TYPE , typename KERNEL_FACTORY >
static real64 geos::finiteElement::regionBasedKernelApplication (MeshLevel &mesh, arrayView1d< string const > const &targetRegions, string const &finiteElementName, string const &constitutiveStringName, KERNEL_FACTORY &kernelFactory)
 Performs a loop over specific regions (by type and name) and calls a kernel launch on the subregions with compile time knowledge of sub-loop bounds such as number of nodes and quadrature points per element. More...
 

Function Documentation

◆ regionBasedKernelApplication()

template<typename POLICY , typename CONSTITUTIVE_BASE , typename SUBREGION_TYPE , typename KERNEL_FACTORY >
static real64 geos::finiteElement::regionBasedKernelApplication ( MeshLevel mesh,
arrayView1d< string const > const &  targetRegions,
string const &  finiteElementName,
string const &  constitutiveStringName,
KERNEL_FACTORY &  kernelFactory 
)
static

Performs a loop over specific regions (by type and name) and calls a kernel launch on the subregions with compile time knowledge of sub-loop bounds such as number of nodes and quadrature points per element.

Template Parameters
POLICYThe RAJA launch policy to pass to the kernel launch.
CONSTITUTIVE_BASEThe common base class for constitutive pass-thru/dispatch which gives the kernel launch compile time knowledge of the constitutive model. This is achieved through a call to the ConstitutivePassThru function which should have a specialization for CONSTITUTIVE_BASE implemented in order to perform the compile time dispatch.
SUBREGION_TYPEThe type of subregion to loop over. TODO make this a parameter pack?
KERNEL_FACTORYThe type of kernelFactory, typically an instantiation of KernelFactory, and must adhere to that interface.
Parameters
meshThe MeshLevel object.
targetRegionsThe names of the target regions(of type SUBREGION_TYPE) to apply the KERNEL_TEMPLATE.
finiteElementNameThe name of the finite element.
constitutiveStringNameThe key to the constitutive model name found on the Region.
kernelFactoryThe object used to construct the kernel.
Returns
The maximum contribution to the residual, which may be used to scale the residual.

Loops over all regions Applies/Launches a kernel specified by the KERNEL_TEMPLATE through #geos::finiteElement::KernelBase::kernelLaunch().

Definition at line 372 of file KernelBase.hpp.