67 template <
typename Derived>
71 ::Kokkos::abort(
"Default computeQpJacobian() should never be called. Make sure you properly "
72 "redefined this method in your class without typos.");
84 template <
typename Derived>
90 "Default computeQpOffDiagJacobian() should never be called. Make sure you properly "
91 "redefined this method in your class without typos.");
103 template <
typename Derived>
106 return &NodalKernel::computeQpJacobian<Derived>;
108 template <
typename Derived>
111 return &NodalKernel::computeQpOffDiagJacobian<Derived>;
119 template <
typename Derived>
120 KOKKOS_FUNCTION
void operator()(ResidualLoop,
const ThreadID tid,
const Derived & kernel)
const;
121 template <
typename Derived>
122 KOKKOS_FUNCTION
void operator()(JacobianLoop,
const ThreadID tid,
const Derived & kernel)
const;
123 template <
typename Derived>
141template <
typename Derived>
153 Real local_re = kernel.template computeQpResidual<Derived>(0, datum);
158template <
typename Derived>
170 Real local_ke = kernel.template computeQpJacobian<Derived>(0, datum);
175template <
typename Derived>
189 Real local_ke = kernel.template computeQpOffDiagJacobian<Derived>(jvar, 0, datum);
KOKKOS_FUNCTION ContiguousElementID kokkosBlockNodeID(Moose::Kokkos::ThreadID tid) const
Get the contiguous node index this Kokkos thread is operating on.
KOKKOS_FUNCTION ContiguousNodeID kokkosBoundaryNodeID(Moose::Kokkos::ThreadID tid) const
Get the contiguous node ID this Kokkos thread is operating on.
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 const Assembly & kokkosAssembly() const
Get the const reference of the Kokkos assembly.
The base class for Kokkos nodal kernels.
The base class for a user to derive their own Kokkos nodal kernels.
NodalKernel(const InputParameters ¶meters)
Constructor.
static InputParameters validParams()
KOKKOS_FUNCTION void operator()(ResidualLoop, const ThreadID tid, const Derived &kernel) const
The parallel computation entry functions called by Kokkos.
const bool _boundary_restricted
Flag whether this kernel is boundary-restricted.
static auto defaultJacobian()
Functions used to check if users have overriden the hook methods, whose calculations can be skipped w...
KOKKOS_FUNCTION Real computeQpJacobian(const unsigned int, AssemblyDatum &) const
Default methods to prevent compile errors even when these methods were not defined in the derived cla...
virtual void computeJacobian() override
Dispatch diagonal and off-diagonal Jacobian calculation.
KOKKOS_FUNCTION Real computeQpOffDiagJacobian(const unsigned int, const unsigned int, AssemblyDatum &) const
Compute off-diagonal Jacobian contribution on a node.
const VariableValue _u
Current solution at nodes.
static auto defaultOffDiagJacobian()
virtual void computeResidual() override
Dispatch residual calculation.
Variable _kokkos_var
Kokkos variable.
Thread _thread
Kokkos thread object.
KOKKOS_FUNCTION void accumulateTaggedNodalMatrix(const bool add, const Real local_ke, const ContiguousNodeID node, const unsigned int jvar, const unsigned int comp=0) const
Accumulate or set local nodal Jacobian contribution to tagged matrices.
KOKKOS_FUNCTION void accumulateTaggedNodalResidual(const bool add, const Real local_re, const ContiguousNodeID node, const unsigned int comp=0) const
Accumulate or set local nodal residual contribution to tagged vectors.
The Kokkos wrapper classes for MOOSE-like variable value access.
KOKKOS_FUNCTION unsigned int var(unsigned int comp=0) const
Get the variable number of a component.
KOKKOS_FUNCTION unsigned int sys(unsigned int comp=0) const
Get the system number of a component.
MOOSE_KOKKOS_INDEX_TYPE ThreadID