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.");
102 template <
typename Derived>
106 return &NodalKernel::computeQpJacobian<Derived>;
108 template <
typename Derived>
111 return &NodalKernel::computeQpOffDiagJacobian<Derived>;
118 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>
141 template <
typename Derived>
153 Real local_re = kernel.template computeQpResidual<Derived>(0, datum);
158 template <
typename Derived>
170 Real local_ke = kernel.template computeQpJacobian<Derived>(0, datum);
175 template <
typename Derived>
189 Real local_ke = kernel.template computeQpOffDiagJacobian<Derived>(jvar, 0, datum);
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...
KOKKOS_FUNCTION unsigned int sys(unsigned int comp=0) const
Get the system number of a component.
virtual void computeJacobian() override
Dispatch diagonal and off-diagonal Jacobian calculation.
KOKKOS_FUNCTION const Assembly & kokkosAssembly() const
Get the const reference of the Kokkos assembly.
KOKKOS_FUNCTION ContiguousNodeID kokkosBoundaryNodeID(Moose::Kokkos::ThreadID tid) const
Get the contiguous node ID this Kokkos thread is operating on.
const bool _boundary_restricted
Flag whether this kernel is boundary-restricted.
const InputParameters & parameters() const
Get the parameters of the object.
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 base class for a user to derive their own Kokkos nodal kernels.
Thread _thread
Kokkos thread object.
virtual void computeResidual() override
Dispatch residual calculation.
The base class for Kokkos nodal kernels.
MOOSE_KOKKOS_INDEX_TYPE ThreadID
KOKKOS_FUNCTION Real computeQpOffDiagJacobian(const unsigned int, const unsigned int, AssemblyDatum &) const
Compute off-diagonal Jacobian contribution on a node.
KOKKOS_FUNCTION void operator()(ResidualLoop, const ThreadID tid, const Derived &kernel) const
The parallel computation entry functions called by Kokkos.
static auto defaultJacobian()
Functions used to check if users have overriden the hook methods, whose calculations can be skipped w...
The Kokkos wrapper classes for MOOSE-like variable value access.
static auto defaultOffDiagJacobian()
NodalKernel(const InputParameters ¶meters)
Constructor.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableValue _u
Current solution at nodes.
static InputParameters validParams()
The Kokkos object that holds thread-private data in the parallel operations of Kokkos kernels...
Variable _kokkos_var
Kokkos variable.
KOKKOS_FUNCTION ContiguousElementID kokkosBlockNodeID(Moose::Kokkos::ThreadID tid) const
Get the contiguous node index this Kokkos thread is operating on.
KOKKOS_FUNCTION unsigned int var(unsigned int comp=0) const
Get the variable number of a component.
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.