14 template <
typename Derived>
27 const unsigned int qp,
31 const unsigned int qp,
38 template <
typename Derived>
43 params.
addParam<
bool>(
"lumping",
false,
"True for mass matrix lumping, false otherwise");
47 template <
typename Derived>
50 _lumping(this->template getParam<bool>(
"lumping"))
54 template <
typename Derived>
68 for (
unsigned int batch = 0; batch < num_batches; ++batch)
73 for (
unsigned int ij = ijb; ij < ije; ++ij)
74 local_ke[ij - ijb] = 0;
76 for (
unsigned int qp = 0; qp < datum.
n_qps(); ++qp)
80 for (
unsigned int ij = ijb; ij < ije; ++ij)
82 unsigned int i = ij % datum.
n_jdofs();
83 unsigned int j = ij / datum.
n_jdofs();
85 local_ke[ij - ijb] += datum.
JxW(qp) * kernel->computeQpJacobian(i, j, qp, datum);
89 for (
unsigned int ij = ijb; ij < ije; ++ij)
91 unsigned int i = ij % datum.
n_jdofs();
92 unsigned int j = ij / datum.
n_jdofs();
94 accumulateTaggedElementalMatrix(
95 local_ke[ij - ijb], datum.
elem().
id, i, _lumping ? i : j, datum.
jvar());
100 template <
typename Derived>
103 const unsigned int qp,
106 return _test(datum, i, qp) * _u_dot(datum, qp);
109 template <
typename Derived>
112 const unsigned int j,
113 const unsigned int qp,
116 return _test(datum, i, qp) * _phi(datum, j, qp) * _du_dot_du;
KOKKOS_FUNCTION unsigned int n_jdofs() const
Get the number of local DOFs for the coupled variable.
usingKokkosTimeKernelMembers(Derived)
static InputParameters validParams()
const InputParameters & parameters() const
Get the parameters of the object.
KOKKOS_FUNCTION Real computeQpResidual(const unsigned int i, const unsigned int qp, ResidualDatum &datum) const
KokkosTimeDerivativeKernel(const InputParameters ¶meters)
The base class for Kokkos time-derivative kernels.
static InputParameters validParams()
KOKKOS_FUNCTION unsigned int n_qps() const
Get the number of local quadrature points.
KOKKOS_FUNCTION Real computeQpJacobian(const unsigned int i, const unsigned int j, const unsigned int qp, ResidualDatum &datum) const
KokkosTimeDerivative(const InputParameters ¶meters)
constexpr unsigned int MAX_CACHED_DOF
Maximum number of DOFs to cache during residual and Jacobian computation.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
All time kernels should inherit from this class.
static InputParameters validParams()
KOKKOS_FUNCTION const ElementInfo & elem() const
Get the element information object.
KOKKOS_FUNCTION Real JxW(const unsigned int qp)
Get the transformed Jacobian weight.
KOKKOS_FUNCTION void computeJacobianInternal(const Derived *kernel, ResidualDatum &datum) const
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
auto min(const L &left, const R &right)
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.
KOKKOS_FUNCTION unsigned int n_idofs() const
Get the number of local DOFs.
ContiguousElementID id
Contiguous element ID.