55 template <
typename Derived>
63 template <
typename Derived>
106 template <
typename Derived>
123 kernel.computeResidualInternal(kernel, datum);
126 template <
typename Derived>
134 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
135 local_re += datum.
JxW(qp) * kernel.template computeQpResidual<Derived>(i, qp, datum);
virtual void computeJacobian() override
Compute this object's contribution to the diagonal Jacobian entries.
virtual void dispatch()
Dispatch parallel calculation.
KOKKOS_FUNCTION void set_local_parallel(const unsigned int local_thread_id, const unsigned int num_local_threads)
Set local parallelization option.
const unsigned int invalid_uint
KOKKOS_FUNCTION const Assembly & kokkosAssembly() const
Get the const reference of the Kokkos assembly.
KOKKOS_FUNCTION unsigned int num_local_threads() const
Get the number of local threads.
KOKKOS_FUNCTION void computeResidualInternal(const Derived &kernel, AssemblyDatum &datum) const
Compute residual.
const InputParameters & parameters() const
Get the parameters of the object.
Thread _thread
Kokkos thread object.
The Kokkos wrapper classes for MOOSE-like shape function access.
DualNumber< Real, DNDerivativeType, false > ADReal
MOOSE_KOKKOS_INDEX_TYPE ThreadID
const ADVariablePhiValue _phi
Current shape function.
bool _computing_jacobian
Whether computing Jacobian.
KOKKOS_FUNCTION void accumulateTaggedElementalMatrix(const Real local_ke, const ContiguousElementID elem, const unsigned int i, const unsigned int j, const unsigned int jvar, const unsigned int comp=0) const
Accumulate local elemental Jacobian contribution to tagged matrices.
KOKKOS_FUNCTION unsigned int n_qps() const
Get the number of local quadrature points.
KOKKOS_FUNCTION unsigned int local_thread_id() const
Get the current local thread ID.
The base class for Kokkos kernels.
bool _computing_residual
Whether computing residual.
The Kokkos wrapper classes for MOOSE-like variable value access.
const ADVariablePhiGradient _grad_phi
Gradient of the current shape function.
ADKernel(const InputParameters ¶meters)
Constructor.
KOKKOS_FUNCTION void operator()(ResidualLoop, const ThreadID tid, const Derived &kernel) const
The parallel computation entry function called by Kokkos.
const ADVariableTestValue _test
Current test function.
KOKKOS_FUNCTION ContiguousElementID kokkosBlockElementID(Moose::Kokkos::ThreadID tid) const
Get the contiguous element ID this Kokkos thread is operating on.
static InputParameters validParams()
const ADVariableGradient _grad_u
Gradient of the current solution at quadrature points.
const ADVariableTestGradient _grad_test
Gradient of the current test function.
KOKKOS_FUNCTION void accumulateTaggedElementalResidual(const Real local_re, const ContiguousElementID elem, const unsigned int i, const unsigned int comp=0) const
Accumulate local elemental residual contribution to tagged vectors.
KOKKOS_FUNCTION const ElementInfo & elem() const
Get the element information object.
The base class for a user to derive their own Kokkos kernels using automatic differentiation (AD)...
virtual void computeResidual() override
Compute this object's contribution to the residual.
The Kokkos object that holds thread-private data in the parallel operations of Kokkos kernels...
virtual void computeResidualAndJacobian() override
Compute this object's contribution to the residual and Jacobian simultaneously.
KOKKOS_FUNCTION Real JxW(const unsigned int qp)
Get the transformed Jacobian weight.
Variable _kokkos_var
Kokkos variable.
KOKKOS_FUNCTION unsigned int var(unsigned int comp=0) const
Get the variable number of a component.
KOKKOS_FUNCTION unsigned int n_dofs() const
Get the number of local DOFs.
KOKKOS_FUNCTION thread_id_type size() const
Get the total thread pool size.
const ADVariableValue _u
Current solution at quadrature points.
ContiguousElementID id
Contiguous element ID.
KOKKOS_FUNCTION const Array< System > & kokkosSystems() const
Get the const reference of the Kokkos systems.