nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
ode/include/nk/ode/solvers.hpp
Go to the documentation of this file.
1
3// toolboxes/ode/include/nk/ode/solvers.hpp
4//
5// Initial-value problem (IVP) solvers for `y' = f(t, y)`.
6//
7// References:
8// • Hairer, Nørsett, Wanner, "Solving Ordinary Differential Equations I"
9// (Springer, 2nd ed. 1993) — DOPRI5 coefficients and step-size strategy.
10// • Dormand & Prince, "A family of embedded Runge-Kutta formulae",
11// J. Comput. Appl. Math. 6(1), 1980.
12// • Shampine & Reichelt, "The MATLAB ODE Suite", SIAM J. Sci. Comput.
13// 18(1), 1997.
14
15#pragma once
16
17#include <memory_resource>
18#include <nk/value/fn_handle.hpp>
19#include <nk/value/value.hpp>
20
21#include <tuple>
22
23namespace nk::ode {
24
27
28
56std::tuple<Value, Value>
57ode45(FnHandle rhs, const Value &tspan, const Value &y0,
58 const Value &opts, std::pmr::memory_resource *mr = nullptr);
59
85std::tuple<Value, Value>
86ode23(FnHandle rhs, const Value &tspan, const Value &y0,
87 const Value &opts, std::pmr::memory_resource *mr = nullptr);
88
89
91} // namespace nk::ode
Core MATLAB-compatible multidimensional array and scalar value type.
Definition value.hpp:61
std::tuple< Value, Value > ode45(FnHandle rhs, const Value &tspan, const Value &y0, const Value &opts, std::pmr::memory_resource *mr=nullptr)
Explicit Dormand-Prince 5(4) RK solver ([t, y] = ode45(f, tspan, y0[, opts])).
std::tuple< Value, Value > ode23(FnHandle rhs, const Value &tspan, const Value &y0, const Value &opts, std::pmr::memory_resource *mr=nullptr)
Explicit Bogacki-Shampine 3(2) RK solver ([t, y] = ode23(f, tspan, y0[, opts])).