42 template <
typename Derived>
48 ::Kokkos::abort(
"Default precomputeQpJacobian() should never be called. Make sure you properly " 49 "redefined this method in your class without typos.");
53 template <
typename Derived>
60 "Default precomputeQpOffDiagJacobian() should never be called. Make sure you properly " 61 "redefined this method in your class without typos.");
71 template <
typename Derived>
75 return &VectorKernelGrad::precomputeQpJacobian<Derived>;
77 template <
typename Derived>
80 return &VectorKernelGrad::precomputeQpOffDiagJacobian<Derived>;
87 template <
typename Derived>
90 template <
typename Derived>
92 template <
typename Derived>
98 template <
typename Derived>
104 [&](
Real * local_re,
const unsigned int ib,
const unsigned int ie)
106 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
109 (datum.
JxW(qp) * kernel.template precomputeQpResidual<Derived>(qp, datum)) *
112 for (
unsigned int i = ib; i < ie; ++i)
118 template <
typename Derived>
124 [&](
Real * local_ke,
const unsigned int ib,
const unsigned int ie,
const unsigned int j)
126 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
129 (datum.
JxW(qp) * kernel.template precomputeQpJacobian<Derived>(j, qp, datum)) *
132 for (
unsigned int i = ib; i < ie; ++i)
138 template <
typename Derived>
145 [&](
Real * local_ke,
const unsigned int ib,
const unsigned int ie,
const unsigned int j)
147 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
149 Real33 value = (datum.
JxW(qp) * kernel.template precomputeQpOffDiagJacobian<Derived>(
150 j, datum.
jvar(), qp, datum)) *
153 for (
unsigned int i = ib; i < ie; ++i)
VectorKernelGrad(const InputParameters ¶meters)
Constructor.
static auto defaultJacobian()
Functions used to check if users have overriden the hook methods, whose calculations can be skipped w...
KOKKOS_FUNCTION void computeJacobianInternal(AssemblyDatum &datum, function body) const
The common loop structure template for computing elemental Jacobian.
KOKKOS_FUNCTION const Real33 & reference(AssemblyDatum &datum, unsigned int i, unsigned int qp) const
Get the gradient of the current vector shape function in reference space.
KOKKOS_FUNCTION void computeResidualInternal(const Derived &kernel, AssemblyDatum &datum) const
Optimized computation bodies that factor out the vector test-function gradient.
The base class for Kokkos vector kernels where the residual is of the form.
static InputParameters validParams()
KOKKOS_FUNCTION Real33 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...
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 const Real33 & J(const unsigned int qp)
Get the inverse of Jacobian matrix | dxi/dx deta/dx dzeta/dx | | dxi/dy deta/dy dzeta/dy | | dxi/dz d...
static auto defaultOffDiagJacobian()
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
KOKKOS_FUNCTION unsigned int n_qps() const
Get the number of local quadrature points.
KOKKOS_FUNCTION void computeJacobianInternal(const Derived &kernel, AssemblyDatum &datum) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
KOKKOS_FUNCTION void computeOffDiagJacobianInternal(const Derived &kernel, AssemblyDatum &datum) const
static constexpr bool use_precompute_hooks
VectorKernelGrad hooks factor out the test-function gradient.
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.
const VectorVariableTestGradient _grad_test
Gradient of the current vector test function.
KOKKOS_FUNCTION void computeResidualInternal(AssemblyDatum &datum, function body) const
The common loop structure template for computing elemental residual.
KOKKOS_FUNCTION Real33 precomputeQpOffDiagJacobian(const unsigned int, const unsigned int, const unsigned int, AssemblyDatum &) const