69 template <
typename Derived>
74 ::Kokkos::abort(
"Default precomputeQpJacobian() should never be called. Make sure you properly " 75 "redefined this method in your class without typos.");
89 template <
typename Derived>
96 "Default precomputeQpOffDiagJacobian() should never be called. Make sure you properly " 97 "redefined this method in your class without typos.");
108 template <
typename Derived>
112 return &IntegratedBCValue::precomputeQpJacobian<Derived>;
114 template <
typename Derived>
117 return &IntegratedBCValue::precomputeQpOffDiagJacobian<Derived>;
125 template <
typename Derived>
128 template <
typename Derived>
130 template <
typename Derived>
136 template <
typename Derived>
142 [&](
Real * local_re,
const unsigned int ib,
const unsigned int ie)
144 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
146 Real value = datum.
JxW(qp) * bc.template precomputeQpResidual<Derived>(qp, datum);
148 for (
unsigned int i = ib; i < ie; ++i)
154 template <
typename Derived>
160 [&](
Real * local_ke,
const unsigned int ib,
const unsigned int ie,
const unsigned int j)
162 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
164 Real value = datum.
JxW(qp) * bc.template precomputeQpJacobian<Derived>(j, qp, datum);
166 for (
unsigned int i = ib; i < ie; ++i)
172 template <
typename Derived>
178 [&](
Real * local_ke,
const unsigned int ib,
const unsigned int ie,
const unsigned int j)
180 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
183 bc.template precomputeQpOffDiagJacobian<Derived>(j, datum.
jvar(), qp, datum);
185 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 defaultOffDiagJacobian()
The base class for a user to derive their own Kokkos integrated boundary conditions.
const InputParameters & parameters() const
Get the parameters of the object.
The base class for a user to derive their own Kokkos integrated boundary conditions where the residua...
KOKKOS_FUNCTION unsigned int jvar() const
Get the coupled variable number.
KOKKOS_FUNCTION void computeResidualInternal(const Derived &bc, AssemblyDatum &datum) const
The parallel computation bodies that hide the base class methods to optimize for factoring out the te...
KOKKOS_FUNCTION Real precomputeQpOffDiagJacobian(const unsigned int, const unsigned int, const unsigned int, AssemblyDatum &) const
Compute off-diagonal Jacobian contribution on a quadrature point.
KOKKOS_FUNCTION void computeJacobianInternal(const Derived &bc, AssemblyDatum &datum) const
IntegratedBCValue(const InputParameters ¶meters)
Constructor.
KOKKOS_FUNCTION Real 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...
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
KOKKOS_FUNCTION unsigned int n_qps() const
Get the number of local quadrature points.
static constexpr bool use_precompute_hooks
IntegratedBCValue hooks factor out the test function.
KOKKOS_FUNCTION void computeOffDiagJacobianInternal(const Derived &bc, AssemblyDatum &datum) const
const VariableTestValue _test
Current test function.
static InputParameters validParams()
static auto defaultJacobian()
Functions used to check if users have overriden the hook methods, whose calculations can be skipped w...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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.