53template<
typename SolutionVectorType>
55 public TimeIntegratorBase<SolutionVectorType>::template
Register<RungeKutta<SolutionVectorType>>
59 using ValueType =
typename SolutionVectorType::VectorValueType;
66 RungeKutta() =
default;
71 ~RungeKutta() =
default;
77 RungeKutta(
const Dictionary& schemeDict,
const Dictionary& solutionDict)
78 : Base(schemeDict, solutionDict)
87 RungeKutta(
const RungeKutta& other);
93 RungeKutta(RungeKutta&& other);
96 RungeKutta& operator=(
const RungeKutta& other) =
delete;
99 RungeKutta& operator=(RungeKutta&& other) =
delete;
105 static std::string
name() {
return "Runge-Kutta"; }
111 static std::string doc() {
return "Explicit time integration using the Runge-Kutta method."; }
117 static std::string schema() {
return "none"; }
127 dsl::Expression<ValueType>& exp,
128 SolutionVectorType& solutionVector,
137 std::unique_ptr<TimeIntegratorBase<SolutionVectorType>> clone()
const override;
142 NeoN::sundials::SKVector<ValueType>
144 NeoN::sundials::SKVector<ValueType>
146 std::shared_ptr<SUNContext> context_ {
147 nullptr, sundials::SUN_CONTEXT_DELETER
149 std::unique_ptr<char,
decltype(sundials::SUN_ARK_DELETER)> ODEMemory_ {
150 nullptr, sundials::SUN_ARK_DELETER
152 std::unique_ptr<NeoN::dsl::Expression<ValueType>> pdeExpr_ {
nullptr
163 initSUNERKSolver(dsl::Expression<ValueType>& exp, SolutionVectorType& field,
const scalar t);
169 void initExpression(
const dsl::Expression<ValueType>& exp);
174 void initSUNContext();
181 void initSUNVector(
const Executor& exec,
size_t size);
187 void initSUNInitialConditions(
const SolutionVectorType& solutionVector);
193 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.