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

Go to the source code of this file.

Classes

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. More...
 
struct  geosx::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  geosx::finiteElement::KernelFactory< KERNEL_TYPE, ARGS >
 Used to forward arguments to a class that implements the KernelBase interface. More...
 

Namespaces

 geosx
 
 finiteElement
 

Functions

template<typename POLICY , typename CONSTITUTIVE_BASE , typename SUBREGION_TYPE , typename KERNEL_FACTORY >
static real64 geosx::finiteElement::regionBasedKernelApplication (MeshLevel &mesh, arrayView1d< string const > const &targetRegions, string const &finiteElementName, arrayView1d< string const > const &constitutiveNames, 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 geosx::finiteElement::regionBasedKernelApplication ( MeshLevel mesh,
arrayView1d< string const > const &  targetRegions,
string const &  finiteElementName,
arrayView1d< string const > const &  constitutiveNames,
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.
constitutiveNamesThe names of the constitutive models present in 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 #geosx::finiteElement::KernelBase::kernelLaunch().

Definition at line 362 of file KernelBase.hpp.