16 #include <stk_mesh/base/Entity.hpp> 24 class SolutionOptions;
26 template<
typename AlgTraits,
typename LambdaFunction,
typename ViewType>
29 static_assert(ViewType::Rank == 2u,
"2D View");
30 ThrowRequireMsg(shape_fn_view.extent_int(0) == AlgTraits::numScvIp_,
"Inconsistent number of scv ips");
31 ThrowRequireMsg(shape_fn_view.extent_int(1) == AlgTraits::nodesPerElement_,
"Inconsistent number of of nodes");
33 double tmp_data[AlgTraits::numScvIp_*AlgTraits::nodesPerElement_];
34 lambdaFunction(tmp_data);
37 for(
int i=0; i<AlgTraits::numScvIp_*AlgTraits::nodesPerElement_; ++i) {
38 data[i] = tmp_data[i];
42 template<
typename AlgTraits,
typename LambdaFunction,
typename ViewType>
45 static_assert(ViewType::Rank == 2u,
"2D View");
46 ThrowRequireMsg(shape_fn_view.extent_int(0) == AlgTraits::numScsIp_,
"Inconsistent number of scs ips");
47 ThrowRequireMsg(shape_fn_view.extent_int(1) == AlgTraits::nodesPerElement_,
"Inconsistent number of of nodes");
49 double tmp_data[AlgTraits::numScsIp_*AlgTraits::nodesPerElement_];
50 lambdaFunction(tmp_data);
53 for(
int i=0; i<AlgTraits::numScsIp_*AlgTraits::nodesPerElement_; ++i) {
54 data[i] = tmp_data[i];
Definition: TimeIntegrator.h:26
Definition: ABLForcingAlgorithm.C:26
void get_scv_shape_fn_data(LambdaFunction lambdaFunction, ViewType &shape_fn_view)
Definition: Kernel.h:27
virtual void setup(const TimeIntegrator &)
Perform pre-timestep work for the computational kernel.
Definition: Kernel.h:72
void get_scs_shape_fn_data(LambdaFunction lambdaFunction, ViewType &shape_fn_view)
Definition: Kernel.h:43
SimdDouble DoubleType
Definition: SimdInterface.h:27
Base class for computational kernels in Nalu.
Definition: Kernel.h:63
virtual void execute(SharedMemView< DoubleType ** > &, SharedMemView< DoubleType * > &, ScratchViews< DoubleType > &)
Execute the kernel within a Kokkos loop and populate the LHS and RHS for the linear solve...
Definition: Kernel.h:77
Kokkos::View< T, Kokkos::LayoutRight, DeviceShmem, Kokkos::MemoryUnmanaged > SharedMemView
Definition: KokkosInterface.h:25
virtual ~Kernel()
Definition: Kernel.h:68
Definition: ScratchViews.h:82