41 template <
typename Derived>
95 template <
typename Derived>
103 template <
typename Derived>
108 template <
typename Derived>
114 [&](
Real * local_re,
const unsigned int ib,
const unsigned int ie)
116 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
120 Real3 value = datum.
JxW(qp) * kernel->precomputeQpResidual(qp, datum);
122 for (
unsigned int i = ib; i < ie; ++i)
123 local_re[i] +=
value * _grad_test(datum, i, qp);
128 template <
typename Derived>
136 [&](
Real * local_ke,
const unsigned int ijb,
const unsigned int ije)
138 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
144 for (
unsigned int ij = ijb; ij < ije; ++ij)
146 unsigned int i = ij % datum.
n_jdofs();
147 unsigned int j = ij / datum.
n_jdofs();
151 value = datum.
JxW(qp) * kernel->precomputeQpJacobian(j, qp, datum);
155 local_ke[ij] +=
value * _grad_test(datum, i, qp);
164 #define usingKokkosKernelGradMembers(T) usingKokkosKernelMembers(T) KOKKOS_FUNCTION unsigned int n_jdofs() const
Get the number of local DOFs for the coupled variable.
static InputParameters validParams()
KOKKOS_FUNCTION void computeJacobianInternal(const Derived *kernel, ResidualDatum &datum) const
static InputParameters validParams()
const unsigned int invalid_uint
KOKKOS_FUNCTION void computeJacobianInternal(ResidualDatum &datum, function body) const
The common loop structure template for computing elemental Jacobian.
const InputParameters & parameters() const
Get the parameters of the object.
virtual bool defaultJacobian() const override
Get whether precomputeQpJacobian() was not defined in the derived class.
KOKKOS_FUNCTION void computeResidualInternal(const Derived *kernel, ResidualDatum &datum) const
The parallel computation bodies that hide the base class methods to optimize for factoring out the gr...
KernelGrad(const InputParameters ¶meters)
Constructor.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
KOKKOS_FUNCTION unsigned int n_qps() const
Get the number of local quadrature points.
usingKokkosKernelMembers(Derived)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
KOKKOS_FUNCTION void computeResidualInternal(ResidualDatum &datum, function body) const
The common loop structure template for computing elemental residual.
KOKKOS_FUNCTION Real JxW(const unsigned int qp)
Get the transformed Jacobian weight.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
The base class for a user to derive their own Kokkos kernels.
The base class for a user to derive their own Kokkos kernels where the residual is of the form...
KOKKOS_FUNCTION Real3 precomputeQpJacobian(const unsigned int, const unsigned int, ResidualDatum &) const
Default methods to prevent compile errors even when these methods were not defined in the derived cla...
The Kokkos object that holds thread-private data in the parallel operations of Kokkos residual object...
KOKKOS_FUNCTION void reinit()
Reset the reinit flag.