numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Base class of solvers of ODEs. More...
#include <num_collect/ode/solver_base.h>
Public Types | |
using | formula_type = Formula |
Type of formula. | |
using | problem_type = typename formula_type::problem_type |
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 | |
solver_base (const problem_type &problem) | |
Constructor. | |
auto | formula () -> formula_type & |
Get the formula. | |
auto | formula () const -> const formula_type & |
Get the formula. | |
void | init (scalar_type time, const variable_type &variable) |
Initialize. | |
auto | problem () -> problem_type & |
Get the problem. | |
auto | problem () const -> const problem_type & |
Get the problem. | |
void | solve_till (scalar_type end_time) |
Compute the variable at the given time. | |
void | step () |
Compute the variable of the next step. | |
auto | step_size () const -> scalar_type |
Get the step size. | |
auto | step_size (scalar_type val) -> Derived & |
Set the step size. | |
auto | steps () const -> index_type |
Get the number of steps. | |
auto | time () const -> scalar_type |
Get the current time. | |
auto | variable () const -> const variable_type & |
Get the current variable. | |
![]() | |
logging_mixin (log_tag_view tag) | |
Constructor. | |
template<typename Child> | |
void | configure_child_algorithm_logger_if_exists (Child &child) |
Configure a logger of a child algorithm if exists. | |
auto | logger () const noexcept -> const num_collect::logging::logger & |
Access to the logger. | |
auto | logger () noexcept -> num_collect::logging::logger & |
Access to the logger. | |
![]() | |
iteration_logger_mixin ()=default | |
Constructor. | |
void | configure_iteration_logger (num_collect::logging::iterations::iteration_logger< Derived > &iteration_logger) const |
Configure an iteration logger. | |
auto | initialize_iteration_logger () -> num_collect::logging::iterations::iteration_logger< Derived > & |
Get the iteration logger. | |
Static Public Attributes | |
static constexpr index_type | order = formula_type::order |
Order of the formula. | |
static constexpr index_type | stages = formula_type::stages |
Number of stages of the formula. | |
Protected Member Functions | |
auto | derived () const noexcept -> const Derived & |
Access derived object. | |
auto | derived () noexcept -> Derived & |
Access derived object. | |
Private Attributes | |
formula_type | formula_ |
Formula. | |
Base class of solvers of ODEs.
Derived | Type of derived class. |
Formula | Type of formula. |
Definition at line 36 of file solver_base.h.
using num_collect::ode::solver_base< Derived, Formula >::formula_type = Formula |
Type of formula.
Definition at line 41 of file solver_base.h.
using num_collect::ode::solver_base< Derived, Formula >::problem_type = typename formula_type::problem_type |
Type of problem.
Definition at line 44 of file solver_base.h.
using num_collect::ode::solver_base< Derived, Formula >::scalar_type = typename problem_type::scalar_type |
Type of scalars.
Definition at line 50 of file solver_base.h.
using num_collect::ode::solver_base< Derived, Formula >::variable_type = typename problem_type::variable_type |
Type of variables.
Definition at line 47 of file solver_base.h.
|
inlineexplicit |
|
inlinenodiscardprotectednoexcept |
Access derived object.
Definition at line 203 of file solver_base.h.
|
inlinenodiscardprotectednoexcept |
Access derived object.
Definition at line 194 of file solver_base.h.
|
inlinenodiscard |
|
inlinenodiscard |
|
inline |
Initialize.
[in] | time | Initial time. |
[in] | variable | Initial variable. |
Definition at line 75 of file solver_base.h.
|
inlinenodiscard |
|
inlinenodiscard |
|
inline |
Compute the variable at the given time.
init
function is assumed to have been called before call to solve_till
function.[in] | end_time | Time to compute the variable at. |
Definition at line 95 of file solver_base.h.
|
inline |
Compute the variable of the next step.
init
function is assumed to have been called before call to step
function. Definition at line 85 of file solver_base.h.
|
inlinenodiscard |
|
inline |
Set the step size.
[in] | val | Value. |
Definition at line 184 of file solver_base.h.
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
private |
Formula.
Definition at line 209 of file solver_base.h.
|
staticconstexpr |
Order of the formula.
Definition at line 56 of file solver_base.h.
|
staticconstexpr |
Number of stages of the formula.
Definition at line 53 of file solver_base.h.