43 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.");
72 template <
typename Derived>
75 return &VectorKernelGrad::precomputeQpJacobian<Derived>;
77 template <
typename Derived>
80 return &VectorKernelGrad::precomputeQpOffDiagJacobian<Derived>;
88 template <
typename Derived>
90 template <
typename Derived>
92 template <
typename Derived>
98template <
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)
118template <
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)
138template <
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)
const InputParameters & parameters() const
Get the parameters of the object.
The Kokkos object that holds thread-private data in the parallel operations of Kokkos kernels.
KOKKOS_FUNCTION unsigned int jvar() const
Get the coupled variable number.
KOKKOS_FUNCTION Real JxW(const unsigned int qp)
Get the transformed Jacobian weight.
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...
KOKKOS_FUNCTION unsigned int n_qps() const
Get the number of local quadrature points.
KOKKOS_FUNCTION void computeJacobianInternal(AssemblyDatum &datum, function body) const
The common loop structure template for computing elemental Jacobian.
KOKKOS_FUNCTION void computeResidualInternal(AssemblyDatum &datum, function body) const
The common loop structure template for computing elemental residual.
The base class for Kokkos vector kernels where the residual is of the form.
KOKKOS_FUNCTION void computeResidualInternal(const Derived &kernel, AssemblyDatum &datum) const
Optimized computation bodies that factor out the vector test-function gradient.
static constexpr bool use_precompute_hooks
VectorKernelGrad hooks factor out the test-function gradient.
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...
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(const Derived &kernel, AssemblyDatum &datum) const
static InputParameters validParams()
KOKKOS_FUNCTION Real33 precomputeQpOffDiagJacobian(const unsigned int, const unsigned int, const unsigned int, AssemblyDatum &) const
static auto defaultOffDiagJacobian()
KOKKOS_FUNCTION void computeOffDiagJacobianInternal(const Derived &kernel, AssemblyDatum &datum) const
The base class for a user to derive their own Kokkos vector kernels on vector variables.
const VectorVariableTestGradient _grad_test
Gradient of the current vector test function.
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.