51template<
typename SolutionFieldType>
57 using ValueType = SolutionFieldType::FieldValueType;
103 static std::string
name() {
return "Runge-Kutta"; }
109 static std::string
doc() {
return "Explicit time integration using the Runge-Kutta method."; }
115 static std::string
schema() {
return "none"; }
131 std::unique_ptr<TimeIntegratorBase<SolutionFieldType>>
clone()
const override;
140 std::shared_ptr<SUNContext> context_ {
146 std::unique_ptr<NeoFOAM::dsl::Expression> pdeExpr_ {
nullptr
156 void initSUNERKSolver(
Expression& exp, SolutionFieldType& field,
const scalar t);
167 void initSUNContext();
174 void initSUNVector(
const Executor& exec,
size_t size);
180 void initSUNInitialConditions(
const SolutionFieldType& solutionField);
186 void initODEMemory(
const scalar t);
A class representing a dictionary that stores key-value pairs.
Unified interface for SUNDIALS Kokkos vector management.
Integrates in time, using Sundials, a PDE expression using the Runge-Kutta method.
std::unique_ptr< TimeIntegratorBase< SolutionFieldType > > clone() const override
Return a copy of this instantiated class.
RungeKutta()=default
Default constructor.
static std::string schema()
Returns the schema for the class.
RungeKutta & operator=(RungeKutta &&other)=delete
void solve(Expression &exp, SolutionFieldType &solutionField, scalar t, const scalar dt) override
Solves one (explicit) time step, from n to n+1.
NeoFOAM::dsl::Expression Expression
RungeKutta & operator=(const RungeKutta &other)=delete
static std::string name()
Returns the name of the class.
SolutionFieldType::FieldValueType ValueType
RungeKutta(const RungeKutta &other)
Copy constructor.
static std::string doc()
Returns the documentation for the class.
RungeKutta(RungeKutta &&other)
Move Constructor.
~RungeKutta()=default
Default destructor.
TimeIntegratorBase< SolutionFieldType >::template Register< RungeKutta< SolutionFieldType > > Base
RungeKutta(const Dictionary &dict)
Constructor that initializes the RungeKutta solver with a dictionary configuration.
A template class for registering derived classes with a base class.
auto SUN_ARK_DELETER
Custom deleter for explicit type RK solvers (ERK, ARK, etc) for the unique pointers.
auto SUN_CONTEXT_DELETER
Custom deleter for SUNContext shared pointers.
std::variant< SerialExecutor, CPUExecutor, GPUExecutor > Executor