91 template <AccumulationMode mode = AccumulationMode::Atomic>
93 template <AccumulationMode mode = AccumulationMode::Atomic>
121 template <LinearSystemContributionObject::AccumulationMode mode>
122 KOKKOS_FUNCTION
inline void 130 auto & sys = kokkosSystem(
_var.
sys());
132 for (MOOSE_KOKKOS_INDEX_TYPE index = 0; index < tags_size; ++index)
135 if (sys.isResidualTagActive(tag))
138 ::Kokkos::atomic_add(&sys.getVectorDofValue(row, tag),
value);
140 sys.getVectorDofValue(row, tag) +=
value;
145 template <LinearSystemContributionObject::AccumulationMode mode>
146 KOKKOS_FUNCTION
inline void 155 auto & sys = kokkosSystem(
_var.
sys());
157 for (MOOSE_KOKKOS_INDEX_TYPE index = 0; index < tags_size; ++index)
160 if (sys.isMatrixTagActive(tag))
163 ::Kokkos::atomic_add(&sys.getMatrixValue(row, col, tag),
value);
165 sys.getMatrixValue(row, col, tag) +=
value;
KOKKOS_FUNCTION unsigned int sys(unsigned int comp=0) const
Get the system number of a component.
A class for creating restricted objects.
Array< TagID > _matrix_tags
Matrix tags this object contributes to.
KOKKOS_FUNCTION void accumulateTaggedVector(Real value, dof_id_type row) const
const InputParameters & parameters() const
Get the parameters of the object.
static InputParameters validParams()
Base class for Kokkos objects that contribute to a linear system, i.e.
The Kokkos interface that holds the host reference of the Kokkos mesh and copies it to device during ...
Tag dispatch type for the matrix computation loop.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Tag dispatch type for the right-hand side computation loop.
KOKKOS_FUNCTION unsigned int components() const
Get the number of components.
Interface for objects that needs transient capabilities.
LinearSystemContributionObject(const InputParameters ¶meters)
virtual void computeMatrix()=0
Compute the matrix contributions of this object.
Interface for notifications that the mesh has changed.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
Every object that can be built by the factory should be derived from this class.
std::unique_ptr< DispatcherBase > _rhs_dispatcher
Dispatcher for the right-hand side computation loop.
KOKKOS_FUNCTION index_type size() const
Get the total array size.
Interface for objects that need to use UserObjects.
Variable _var
Kokkos variable.
KOKKOS_FUNCTION void accumulateTaggedMatrix(Real value, dof_id_type row, dof_id_type col) const
Variable variable() const
Get the Kokkos variable this object contributes to.
AccumulationMode
Whether tagged vector/matrix accumulation must use atomics.
virtual void computeRightHandSide()=0
Compute the right-hand side contributions of this object.
The Kokkos variable object that carries the coupled variable and tag information. ...
FEProblemBase & _fe_problem
Reference to the finite element problem.
Scalar< Real > _t
TODO: Move to TransientInterface.
Interface for objects that need to use functions.
std::unique_ptr< DispatcherBase > _matrix_dispatcher
Dispatcher for the matrix computation loop.
Interface class for classes which interact with Postprocessors.
Array< TagID > _vector_tags
Vector (residual) tags this object contributes to.