110 template <
typename Derived>
112 KOKKOS_FUNCTION
void operator()(ResidualLoop,
const ThreadID tid,
const Derived & bc)
const;
113 template <
typename Derived>
114 KOKKOS_FUNCTION
void operator()(JacobianLoop,
const ThreadID tid,
const Derived & bc)
const;
115 template <
typename Derived>
131 template <
typename Derived>
138 template <
typename Derived>
145 template <
typename Derived>
177 template <
typename Derived>
186 bc.computeResidualInternal(bc, datum);
189 template <
typename Derived>
198 bc.computeJacobianInternal(bc, datum);
201 template <
typename Derived>
210 if (!sys.isVariableActive(jvar,
kokkosMesh().getElementInfo(elem).subdomain))
215 bc.computeOffDiagJacobianInternal(bc, datum);
218 template <
typename Derived>
224 [&](
Real * local_re,
const unsigned int ib,
const unsigned int ie)
226 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
230 for (
unsigned int i = ib; i < ie; ++i)
231 local_re[i] += datum.
JxW(qp) * bc.computeQpResidual(i, qp, datum);
236 template <
typename Derived>
242 [&](
Real * local_ke,
const unsigned int ijb,
const unsigned int ije)
244 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
248 for (
unsigned int ij = ijb; ij < ije; ++ij)
250 unsigned int i = ij % datum.
n_jdofs();
251 unsigned int j = ij / datum.
n_jdofs();
253 local_ke[ij] += datum.
JxW(qp) * bc.computeQpJacobian(i, j, qp, datum);
259 template <
typename Derived>
265 [&](
Real * local_ke,
const unsigned int ijb,
const unsigned int ije)
267 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
271 for (
unsigned int ij = ijb; ij < ije; ++ij)
273 unsigned int i = ij % datum.
n_jdofs();
274 unsigned int j = ij / datum.
n_jdofs();
277 datum.
JxW(qp) * bc.computeQpOffDiagJacobian(i, j, datum.
jvar(), qp, datum);
KOKKOS_FUNCTION unsigned int n_jdofs() const
Get the number of local DOFs for the coupled variable.
KOKKOS_FUNCTION void computeJacobianInternal(const Derived &bc, ResidualDatum &datum) const
Compute diagonal Jacobian.
KOKKOS_FUNCTION unsigned int sys(unsigned int comp=0) const
Get the system number of a component.
KOKKOS_FUNCTION const Assembly & kokkosAssembly() const
Get the const reference of the Kokkos assembly.
static auto defaultJacobian()
Get the function pointer of the default computeQpJacobian()
KOKKOS_FUNCTION void computeJacobianInternal(ResidualDatum &datum, function body) const
The common loop structure template for computing elemental Jacobian.
The base class for a user to derive their own Kokkos integrated boundary conditions.
const InputParameters & parameters() const
Get the parameters of the object.
Thread _thread
Kokkos thread object.
The base class for Kokkos integrated boundary conditions.
const VariableValue _u
Current solution at quadrature points.
The Kokkos wrapper classes for MOOSE-like shape function access.
const VariableGradient _grad_u
Gradient of the current solution at quadrature points.
const VariablePhiGradient _grad_phi
Gradient of the current shape function.
KOKKOS_FUNCTION unsigned int n_qps() const
Get the number of local quadrature points.
KOKKOS_FUNCTION void operator()(ResidualLoop, const ThreadID tid, const Derived &bc) const
The parallel computation entry functions called by Kokkos.
KOKKOS_FUNCTION const System & kokkosSystem(unsigned int sys) const
Get the const reference of a Kokkos system.
const VariableTestGradient _grad_test
Gradient of the current test function.
static auto defaultOffDiagJacobian()
Get the function pointer of the default computeQpOffDiagJacobian()
const VariableTestValue _test
Current test function.
KOKKOS_FUNCTION const Mesh & kokkosMesh() const
Get the const reference of the Kokkos mesh.
KOKKOS_FUNCTION void computeResidualInternal(const Derived &bc, ResidualDatum &datum) const
The parallel computation bodies that can be customized in the derived class by defining them in the d...
KOKKOS_FUNCTION Real computeQpOffDiagJacobian(const unsigned int, const unsigned int, const unsigned int, const unsigned int, ResidualDatum &) const
Compute off-diagonal Jacobian contribution on a quadrature point.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
KOKKOS_FUNCTION auto kokkosBoundaryElementSideID(ThreadID tid) const
Get the contiguous element ID - side index pair this Kokkos thread is operating on.
KOKKOS_FUNCTION void computeResidualInternal(ResidualDatum &datum, function body) const
The common loop structure template for computing elemental residual.
virtual void computeJacobian() override
Dispatch diagonal and off-diagonal Jacobian calculation.
const VariablePhiValue _phi
Current shape function.
virtual void computeResidual() override
Dispatch residual calculation.
KOKKOS_FUNCTION Real JxW(const unsigned int qp)
Get the transformed Jacobian weight.
Variable _kokkos_var
Kokkos variable.
static InputParameters validParams()
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
KOKKOS_FUNCTION Real computeQpJacobian(const unsigned int, const unsigned int, const unsigned int, ResidualDatum &) const
Default methods to prevent compile errors even when these methods were not defined in the derived cla...
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 void computeOffDiagJacobianInternal(const Derived &bc, ResidualDatum &datum) const
Compute off-diagonal Jacobian.
KOKKOS_FUNCTION const auto & getCoupling(unsigned int var) const
Get the list of off-diagonal coupled variable numbers of a variable.
KOKKOS_FUNCTION unsigned int jvar() const
Get the coupled variable number.
The Kokkos object that holds thread-private data in the parallel operations of Kokkos residual object...
KOKKOS_FUNCTION void reinit()
Reset the reinit flag.
IntegratedBC(const InputParameters ¶meters)
Constructor.
KOKKOS_FUNCTION const Array< System > & kokkosSystems() const
Get the const reference of the Kokkos systems.