GEOSX
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/ElementRegionManager.hpp"
#include "rajaInterface/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...
 

Namespaces

 geosx
 
 finiteElement
 

Macros

#define CONSTRUCTOR_PARAM_OPTION   1
 Use std::tuple to hold constructor params.
 

Functions

template<class T , class Tuple >
constexpr T std::make_from_tuple (Tuple &&t)
 Implementation of std::make_from_tuple() More...
 
template<typename POLICY , typename CONSTITUTIVE_BASE , typename REGION_TYPE , template< typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE > class KERNEL_TEMPLATE, typename ... KERNEL_CONSTRUCTOR_PARAMS>
static real64 geosx::finiteElement::regionBasedKernelApplication (MeshLevel &mesh, arrayView1d< string const > const &targetRegions, string const &finiteElementName, arrayView1d< string const > const &constitutiveNames, KERNEL_CONSTRUCTOR_PARAMS &&... kernelConstructorParams)
 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

◆ make_from_tuple()

template<class T , class Tuple >
constexpr T std::make_from_tuple ( Tuple &&  t)

Implementation of std::make_from_tuple()

Template Parameters
T
Tuple
T
Tuple
Parameters
t
Returns

Definition at line 74 of file KernelBase.hpp.

◆ regionBasedKernelApplication()

template<typename POLICY , typename CONSTITUTIVE_BASE , typename REGION_TYPE , template< typename SUBREGION_TYPE, typename CONSTITUTIVE_TYPE, typename FE_TYPE > class KERNEL_TEMPLATE, typename ... KERNEL_CONSTRUCTOR_PARAMS>
static real64 geosx::finiteElement::regionBasedKernelApplication ( MeshLevel mesh,
arrayView1d< string const > const &  targetRegions,
string const &  finiteElementName,
arrayView1d< string const > const &  constitutiveNames,
KERNEL_CONSTRUCTOR_PARAMS &&...  kernelConstructorParams 
)
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.
REGION_TYPEThe type of region to loop over. TODO make this a parameter pack?
KERNEL_TEMPLATEThe type of template for the physics kernel, which conforms to the interface specified by KernelBase.
KERNEL_CONSTRUCTOR_PARAMSThe template parameter pack to hold the parameter pack (i.e. custom) parameters that are sent to the constructor for the KERNEL_TEMPLATE.
Parameters
meshThe MeshLevel object.
targetRegionsThe names of the target regions(of type REGION_TYPE) to apply the KERNEL_TEMPLATE.
finiteElementNameThe name of the finite element.
constitutiveNamesThe names of the constitutive models present in the Region.
kernelConstructorParamsThe parameter list for corresponding to the parameter KERNEL_CONSTRUCTOR_PARAMS that are passed to the KERNEL_TEMPLATE constructor.
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 368 of file KernelBase.hpp.