22 template <
typename Derived>
69 template <
typename Derived>
75 "preset",
true,
"Whether or not to preset the BC (apply the value before the solve begins).");
79 template <
typename Derived>
81 :
NodalBC(parameters), _preset(getParam<bool>(
"preset"))
85 template <
typename Derived>
91 ::Kokkos::parallel_for(
92 ::Kokkos::RangePolicy<ExecSpace, ::Kokkos::IndexType<ThreadID>>(0, numKokkosBoundaryNodes()),
93 *static_cast<Derived *>(
this));
96 template <
typename Derived>
100 auto bc =
static_cast<const Derived *
>(
this);
101 auto node = kokkosBoundaryNodeID(tid);
102 auto & sys = kokkosSystem(_kokkos_var.sys());
103 auto dof = sys.getNodeLocalDofIndex(node, _kokkos_var.var());
108 ResidualDatum datum(node, kokkosAssembly(), kokkosSystems(), _kokkos_var, _kokkos_var.var());
110 sys.getVectorDofValue(dof, _solution_tag) = bc->computeValue(0, datum);
113 template <
typename Derived>
117 auto bc =
static_cast<const Derived *
>(
this);
119 return _u(datum, qp) - bc->computeValue(qp, datum);
125 #define usingKokkosDirichletBCBaseMembers(T) \ 127 using Moose::Kokkos::DirichletBCBase<T>::operator(); \ 128 using Moose::Kokkos::NodalBC::operator(); \ 131 using Moose::Kokkos::NodalBC::_u virtual bool preset() const override
Get whether the value is to be preset.
const bool _preset
Flag whether the value is to be preset.
static InputParameters validParams()
virtual void presetSolution(TagID tag) override
Dispatch solution vector preset.
const InputParameters & parameters() const
Get the parameters of the object.
virtual Real computeQpResidual() override
TagID _solution_tag
Tag associated with the solution vector to be preset.
DirichletBCBase(const InputParameters ¶meters)
Constructor.
static const dof_id_type invalid_id
static InputParameters validParams()
KOKKOS_FUNCTION void operator()(const ThreadID tid) const
The preset function called by Kokkos.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
KOKKOS_FUNCTION Real computeQpResidual(const unsigned int qp, ResidualDatum &datum) const
Compute residual contribution on a node.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
The Kokkos object that holds thread-private data in the parallel operations of Kokkos residual object...
The base class for a user to derive their own Kokkos nodal boundary conditions.
The base Kokkos boundary condition of a Dirichlet type.