numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Class to control step sizes using well-known method [10]. More...
#include <num_collect/ode/basic_step_size_controller.h>
Public Types | |
using | base_type |
Base class. | |
using | formula_type |
Type of formula. | |
using | problem_type |
Type of problem. | |
using | scalar_type |
Type of scalars. | |
using | variable_type |
Type of variables. | |
![]() | |
using | formula_type |
Type of formula. | |
using | formula_type |
Type of formula. | |
using | problem_type |
Type of problem. | |
using | problem_type |
Type of problem. | |
using | scalar_type |
Type of scalars. | |
using | scalar_type |
Type of scalars. | |
using | variable_type |
Type of variables. | |
using | variable_type |
Type of variables. | |
Public Member Functions | |
basic_step_size_controller () | |
Constructor. | |
auto | check_and_calc_next (scalar_type &step_size, const variable_type &variable, const variable_type &error) -> bool |
Check the error estimate and calculate the next step size. | |
void | init () |
Initialize. | |
auto | max_step_size_factor (const scalar_type &val) -> basic_step_size_controller & |
Set the maximum factor of step sizes. | |
auto | step_size_factor_safety_coeff (const scalar_type &val) -> basic_step_size_controller & |
Set the safety coefficient for factors of step sizes. | |
![]() | |
auto | limits () const -> const step_size_limits< scalar_type > & |
Get the limits of step sizes. | |
auto | limits () const -> const step_size_limits< scalar_type > & |
Get the limits of step sizes. | |
auto | limits (const step_size_limits< scalar_type > &val) -> basic_step_size_controller< Formula > & |
Set the limits of step sizes. | |
auto | limits (const step_size_limits< scalar_type > &val) -> basic_step_size_controller< Formula > & |
Set the limits of step sizes. | |
auto | reduction_rate (const scalar_type &val) -> basic_step_size_controller< Formula > & |
Set the rate to reduce step sizes when error is large. | |
auto | reduction_rate (const scalar_type &val) -> basic_step_size_controller< Formula > & |
Set the rate to reduce step sizes when error is large. | |
auto | tolerances () const -> const error_tolerances< variable_type > & |
Get the error tolerances. | |
auto | tolerances () const -> const error_tolerances< variable_type > & |
Get the error tolerances. | |
auto | tolerances (const error_tolerances< variable_type > &val) -> basic_step_size_controller< Formula > & |
Set the error tolerances. | |
auto | tolerances (const error_tolerances< variable_type > &val) -> basic_step_size_controller< Formula > & |
Set the error tolerances. | |
![]() | |
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. | |
Private Member Functions | |
void | calc_next (scalar_type &step_size, const variable_type &variable, const variable_type &error) |
Calculate the next step size. | |
Private Attributes | |
scalar_type | max_step_size_factor_ {default_max_step_size_factor} |
Maximum factor of step sizes. | |
scalar_type | step_size_factor_safety_coeff_ |
Safety coefficient for factors of step sizes. | |
Static Private Attributes | |
static constexpr auto | default_max_step_size_factor |
Default maximum factor of step sizes. | |
static constexpr auto | default_step_size_factor_safety_coeff |
Default safety coefficient for factors of step sizes. | |
Additional Inherited Members | |
![]() | |
step_size_controller_base (logging::log_tag_view tag) | |
Constructor. | |
step_size_controller_base (logging::log_tag_view tag) | |
Constructor. | |
auto | derived () const noexcept -> const basic_step_size_controller< Formula > & |
Access derived object. | |
auto | derived () const noexcept -> const basic_step_size_controller< Formula > & |
Access derived object. | |
auto | derived () noexcept -> basic_step_size_controller< Formula > & |
Access derived object. | |
auto | derived () noexcept -> basic_step_size_controller< Formula > & |
Access derived object. | |
auto | reduce_if_needed (scalar_type &step_size, const variable_type &variable, const variable_type &error) -> bool |
Reduce step size if needed. | |
auto | reduce_if_needed (scalar_type &step_size, const variable_type &variable, const variable_type &error) -> bool |
Reduce step size if needed. | |
Class to control step sizes using well-known method [10].
Formula | Type of the formula. |
Definition at line 47 of file basic_step_size_controller.h.
using num_collect::ode::basic_step_size_controller< Formula >::base_type |
Base class.
Definition at line 52 of file basic_step_size_controller.h.
using num_collect::ode::step_size_controller_base< basic_step_size_controller< Formula >, Formula >::formula_type |
Type of formula.
Definition at line 43 of file step_size_controller_base.h.
using num_collect::ode::step_size_controller_base< basic_step_size_controller< Formula >, Formula >::problem_type |
Type of problem.
Definition at line 46 of file step_size_controller_base.h.
using num_collect::ode::step_size_controller_base< basic_step_size_controller< Formula >, Formula >::scalar_type |
Type of scalars.
Definition at line 52 of file step_size_controller_base.h.
using num_collect::ode::step_size_controller_base< basic_step_size_controller< Formula >, Formula >::variable_type |
Type of variables.
Definition at line 49 of file step_size_controller_base.h.
|
inline |
Constructor.
Definition at line 63 of file basic_step_size_controller.h.
|
inlineprivate |
Calculate the next step size.
[in,out] | step_size | Step size. |
[in] | variable | Variable. |
[in] | error | Error estimate. |
Definition at line 128 of file basic_step_size_controller.h.
|
inlinenodiscard |
Check the error estimate and calculate the next step size.
[in,out] | step_size | Step size. |
[in] | variable | Variable. |
[in] | error | Error estimate. |
true | Given error satisfies tolerances. |
false | Given error doesn't satisfy tolerances. |
Definition at line 82 of file basic_step_size_controller.h.
|
inline |
Initialize.
Definition at line 69 of file basic_step_size_controller.h.
|
inline |
Set the maximum factor of step sizes.
[in] | val | Value. |
Definition at line 112 of file basic_step_size_controller.h.
|
inline |
Set the safety coefficient for factors of step sizes.
[in] | val | Value. |
Definition at line 97 of file basic_step_size_controller.h.
|
staticconstexprprivate |
Default maximum factor of step sizes.
Definition at line 162 of file basic_step_size_controller.h.
|
staticconstexprprivate |
Default safety coefficient for factors of step sizes.
Definition at line 154 of file basic_step_size_controller.h.
|
private |
Maximum factor of step sizes.
Definition at line 166 of file basic_step_size_controller.h.
|
private |
Safety coefficient for factors of step sizes.
Definition at line 158 of file basic_step_size_controller.h.