41 template <
typename Derived>
47 ::Kokkos::abort(
"Default precomputeQpJacobian() should never be called. Make sure you properly " 48 "redefined this method in your class without typos.");
52 template <
typename Derived>
59 "Default precomputeQpOffDiagJacobian() should never be called. Make sure you properly " 60 "redefined this method in your class without typos.");
70 template <
typename Derived>
74 return &VectorKernelValue::precomputeQpJacobian<Derived>;
76 template <
typename Derived>
79 return &VectorKernelValue::precomputeQpOffDiagJacobian<Derived>;
86 template <
typename Derived>
89 template <
typename Derived>
91 template <
typename Derived>
97 template <
typename Derived>
103 [&](
Real * local_re,
const unsigned int ib,
const unsigned int ie)
105 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
107 Real3 value = datum.
JxW(qp) * kernel.template precomputeQpResidual<Derived>(qp, datum);
109 for (
unsigned int i = ib; i < ie; ++i)
115 template <
typename Derived>
121 [&](
Real * local_ke,
const unsigned int ib,
const unsigned int ie,
const unsigned int j)
123 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
125 Real3 value = datum.
JxW(qp) * kernel.template precomputeQpJacobian<Derived>(j, qp, datum);
127 for (
unsigned int i = ib; i < ie; ++i)
133 template <
typename Derived>
140 [&](
Real * local_ke,
const unsigned int ib,
const unsigned int ie,
const unsigned int j)
142 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
144 Real3 value = datum.
JxW(qp) * kernel.template precomputeQpOffDiagJacobian<Derived>(
145 j, datum.
jvar(), qp, datum);
147 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.
static auto defaultJacobian()
Functions used to check if users have overriden the hook methods, whose calculations can be skipped w...
The base class for a user to derive their own Kokkos vector kernels on vector variables.
const InputParameters & parameters() const
Get the parameters of the object.
KOKKOS_FUNCTION unsigned int jvar() const
Get the coupled variable number.
KOKKOS_FUNCTION void computeResidualInternal(const Derived &kernel, AssemblyDatum &datum) const
Optimized computation bodies that factor out the vector test function.
KOKKOS_FUNCTION Real3 precomputeQpJacobian(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...
VectorKernelValue(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.
The base class for Kokkos vector kernels where the residual is of the form.
const VectorVariableTestValue _test
Current vector test function.
KOKKOS_FUNCTION void computeOffDiagJacobianInternal(const Derived &kernel, AssemblyDatum &datum) const
KOKKOS_FUNCTION void computeJacobianInternal(const Derived &kernel, AssemblyDatum &datum) const
static auto defaultOffDiagJacobian()
static constexpr bool use_precompute_hooks
VectorKernelValue hooks factor out the test function.
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
KOKKOS_FUNCTION Real3 precomputeQpOffDiagJacobian(const unsigned int, const unsigned int, const unsigned int, AssemblyDatum &) 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.
KOKKOS_FUNCTION void computeResidualInternal(AssemblyDatum &datum, function body) const
The common loop structure template for computing elemental residual.