numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Base class of formulas in ODE solvers. More...
#include <num_collect/ode/formula_base.h>
Public Types | |
using | problem_type = Problem |
Type of problem. | |
using | scalar_type = typename problem_type::scalar_type |
Type of scalars. | |
using | variable_type = typename problem_type::variable_type |
Type of variables. | |
Public Member Functions | |
formula_base (const problem_type &problem=problem_type()) | |
Constructor. | |
auto | problem () -> problem_type & |
Get the problem. | |
auto | problem () const -> const problem_type & |
Get the problem. | |
void | step (scalar_type time, scalar_type step_size, const variable_type ¤t, variable_type &estimate) |
Compute the next variable. | |
Protected Member Functions | |
auto | derived () const noexcept -> const Derived & |
Access derived object. | |
auto | derived () noexcept -> Derived & |
Access derived object. | |
Static Protected Member Functions | |
template<typename T > | |
static constexpr auto | coeff (T val) -> scalar_type |
Convert coefficients. | |
template<typename T1 , typename T2 > | |
static constexpr auto | coeff (T1 num, T2 den) -> scalar_type |
Create coefficients. | |
Private Attributes | |
problem_type | problem_ |
Problem. | |
Base class of formulas in ODE solvers.
Derived | Type of the derived class. |
Problem | Type of the problem. |
Definition at line 33 of file formula_base.h.
using num_collect::ode::formula_base< Derived, Problem >::problem_type = Problem |
Type of problem.
Definition at line 36 of file formula_base.h.
using num_collect::ode::formula_base< Derived, Problem >::scalar_type = typename problem_type::scalar_type |
Type of scalars.
Definition at line 42 of file formula_base.h.
using num_collect::ode::formula_base< Derived, Problem >::variable_type = typename problem_type::variable_type |
Type of variables.
Definition at line 39 of file formula_base.h.
|
inlineexplicit |
|
inlinestaticconstexprprotected |
Convert coefficients.
T | Input type. |
[in] | val | Input value. |
Definition at line 108 of file formula_base.h.
|
inlinestaticconstexprprotected |
Create coefficients.
T1 | Input type. |
T2 | Input type. |
[in] | num | Numerator. |
[in] | den | Denominator. |
Definition at line 122 of file formula_base.h.
|
inlinenodiscardprotectednoexcept |
Access derived object.
Definition at line 96 of file formula_base.h.
|
inlinenodiscardprotectednoexcept |
Access derived object.
Definition at line 87 of file formula_base.h.
|
inlinenodiscard |
|
inlinenodiscard |
|
inline |
Compute the next variable.
[in] | time | Current time. |
[in] | step_size | Step size. |
[in] | current | Current variable. |
[out] | estimate | Estimate of the next variable. |
Definition at line 60 of file formula_base.h.
|
private |
Problem.
Definition at line 128 of file formula_base.h.