64 template <
typename Derived>
69 ::Kokkos::abort(
"Default computeQpJacobian() should never be called. Make sure you properly " 70 "redefined this method in your class without typos.");
84 template <
typename Derived>
91 "Default computeQpOffDiagJacobian() should never be called. Make sure you properly " 92 "redefined this method in your class without typos.");
103 template <
typename Derived>
107 return &KernelValue::computeQpJacobian<Derived>;
109 template <
typename Derived>
112 return &KernelValue::computeQpOffDiagJacobian<Derived>;
120 template <
typename Derived>
123 template <
typename Derived>
125 template <
typename Derived>
131 template <
typename Derived>
137 [&](
Real * local_re,
const unsigned int ib,
const unsigned int ie)
139 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
141 Real value = datum.
JxW(qp) * kernel.template computeQpResidual<Derived>(qp, datum);
143 for (
unsigned int i = ib; i < ie; ++i)
149 template <
typename Derived>
155 [&](
Real * local_ke,
const unsigned int ib,
const unsigned int ie,
const unsigned int j)
157 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
159 Real value = datum.
JxW(qp) * kernel.template computeQpJacobian<Derived>(j, qp, datum);
161 for (
unsigned int i = ib; i < ie; ++i)
167 template <
typename Derived>
173 [&](
Real * local_ke,
const unsigned int ib,
const unsigned int ie,
const unsigned int j)
175 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
177 Real value = datum.
JxW(qp) * kernel.template computeQpOffDiagJacobian<Derived>(
178 j, datum.
jvar(), qp, datum);
180 for (
unsigned int i = ib; i < ie; ++i)
KOKKOS_FUNCTION void computeJacobianInternal(AssemblyDatum &datum, function body) const
The common loop structure template for computing elemental Jacobian.
KOKKOS_FUNCTION void computeResidualInternal(const Derived &kernel, AssemblyDatum &datum) const
The parallel computation bodies that hide the base class methods to optimize for factoring out the te...
static auto defaultJacobian()
Functions used to check if users have overriden the hook methods, whose calculations can be skipped w...
const InputParameters & parameters() const
Get the parameters of the object.
const VariableTestValue _test
Current test function.
KOKKOS_FUNCTION unsigned int jvar() const
Get the coupled variable number.
The base class for a user to derive their own Kokkos kernels where the residual is of the form...
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
static auto defaultOffDiagJacobian()
KOKKOS_FUNCTION unsigned int n_qps() const
Get the number of local quadrature points.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
KOKKOS_FUNCTION Real computeQpJacobian(const unsigned int, const unsigned int, AssemblyDatum &) const
Default methods to prevent compile errors even when these methods were not defined in the derived cla...
KOKKOS_FUNCTION void computeJacobianInternal(const Derived &kernel, AssemblyDatum &datum) const
KernelValue(const InputParameters ¶meters)
Constructor.
KOKKOS_FUNCTION void computeOffDiagJacobianInternal(const Derived &kernel, AssemblyDatum &datum) const
The Kokkos object that holds thread-private data in the parallel operations of Kokkos kernels...
KOKKOS_FUNCTION Real JxW(const unsigned int qp)
Get the transformed Jacobian weight.
The base class for a user to derive their own Kokkos kernels.
KOKKOS_FUNCTION void computeResidualInternal(AssemblyDatum &datum, function body) const
The common loop structure template for computing elemental residual.
KOKKOS_FUNCTION Real computeQpOffDiagJacobian(const unsigned int, const unsigned int, const unsigned int, AssemblyDatum &) const
Compute off-diagonal Jacobian contribution on a quadrature point.
static InputParameters validParams()