https://mooseframework.inl.gov
KokkosTimeNodalKernel.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "KokkosNodalKernel.h"
13 
14 namespace Moose
15 {
16 namespace Kokkos
17 {
18 
22 template <typename Derived>
23 class TimeNodalKernel : public NodalKernel<Derived>
24 {
26 
27 public:
29 
34 
35 protected:
44 };
45 
46 template <typename Derived>
49 {
51 
52  params.set<MultiMooseEnum>("vector_tags") = "time";
53  params.set<MultiMooseEnum>("matrix_tags") = "system time";
54 
55  return params;
56 }
57 
58 template <typename Derived>
60  : NodalKernel<Derived>(parameters),
61  _u_dot(kokkosSystems(), _var, Moose::SOLUTION_DOT_TAG),
62  _du_dot_du(_var.sys().duDotDu(_var.number()))
63 {
64 }
65 
66 } // namespace Kokkos
67 } // namespace Moose
68 
69 #define usingKokkosTimeNodalKernelMembers(T) \
70  usingKokkosNodalKernelMembers(T); \
71  \
72 protected: \
73  using Moose::Kokkos::TimeNodalKernel<T>::_u_dot; \
74  using Moose::Kokkos::TimeNodalKernel<T>::_du_dot_du
static InputParameters validParams()
TimeNodalKernel(const InputParameters &parameters)
Constructor.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
const VariableNodalValue _u_dot
Time derivative of the current solution at nodes.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
The base class for a user to derive their own Kokkos nodal kernels.
static InputParameters validParams()
The base class for Kokkos time-derivative nodal kernels.
const Scalar< const Real > _du_dot_du
Derivative of u_dot with respect to u.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...
const TagName SOLUTION_DOT_TAG
Definition: MooseTypes.C:30