54template<
typename SolutionVectorType>
56 public TimeIntegratorBase<SolutionVectorType>::template
Register<RungeKutta<SolutionVectorType>>
60 using ValueType =
typename SolutionVectorType::VectorValueType;
67 RungeKutta() =
default;
72 ~RungeKutta() =
default;
78 RungeKutta(
const Dictionary& schemeDict,
const Dictionary& solutionDict)
79 : Base(schemeDict, solutionDict)
88 RungeKutta(
const RungeKutta& other);
94 RungeKutta(RungeKutta&& other);
97 RungeKutta& operator=(
const RungeKutta& other) =
delete;
100 RungeKutta& operator=(RungeKutta&& other) =
delete;
106 static std::string
name() {
return "Runge-Kutta"; }
112 static std::string doc() {
return "Explicit time integration using the Runge-Kutta method."; }
118 static std::string schema() {
return "none"; }
128 dsl::Expression<ValueType>& exp,
129 SolutionVectorType& solutionVector,
138 std::unique_ptr<TimeIntegratorBase<SolutionVectorType>> clone()
const override;
143 NeoN::sundials::SKVector<ValueType>
145 NeoN::sundials::SKVector<ValueType>
147 std::shared_ptr<SUNContext> context_ {
148 nullptr, sundials::SUN_CONTEXT_DELETER
150 std::unique_ptr<char,
decltype(sundials::SUN_ARK_DELETER)> ODEMemory_ {
151 nullptr, sundials::SUN_ARK_DELETER
153 std::unique_ptr<NeoN::dsl::Expression<ValueType>> pdeExpr_ {
nullptr
164 initSUNERKSolver(dsl::Expression<ValueType>& exp, SolutionVectorType& field,
const scalar t);
170 void initExpression(
const dsl::Expression<ValueType>& exp);
175 void initSUNContext();
182 void initSUNVector(
const Executor& exec,
size_t size);
188 void initSUNInitialConditions(
const SolutionVectorType& solutionVector);
194 void initODEMemory(
const scalar t);
A template class for registering derived classes with a base class.
void solve(Expression< typename VectorType::ElementType > &exp, VectorType &solution, scalar t, scalar dt, const Dictionary &fvSchemes, const Dictionary &fvSolution)
const std::string & name(const NeoN::Document &doc)
Retrieves the name of a Document.