54 :
public solver_base<embedded_solver<Formula, StepSizeController>,
73 typename step_size_controller_type::formula_type>);
78 using base_type::base_type;
92 "Using user-specified initial step size {}.", *
step_size_);
95 this->
logger(),
"Automatically calculate initial step size.");
101 "Automatically selected initial step size {}.", *
step_size_);
108 "Step size is not set yet. You may forget to call init "
134 iteration_logger.template append<index_type>(
136 iteration_logger.template append<scalar_type>(
"Time", &
this_type::time);
137 iteration_logger.template append<scalar_type>(
139 iteration_logger.template append<scalar_type>(
154 return std::numeric_limits<scalar_type>::quiet_NaN();
183 this->
logger(),
"Step size must be a positive value.");
Class to write logs of iterations.
auto logger() const noexcept -> const num_collect::logging::logger &
Access to the logger.
Class of solvers of ODEs using embedded formulas.
static auto norm(const variable_type &var) -> scalar_type
Get the norm of a variable.
std::optional< scalar_type > step_size_
auto step_size() const -> scalar_type
Get the step size.
static constexpr index_type lesser_order
StepSizeController step_size_controller_type
void step()
Compute the variable of the next step.
typename problem_type::scalar_type scalar_type
step_size_controller_type step_size_controller_
solver_base< embedded_solver< Formula, StepSizeController >, Formula > base_type
auto time() const -> scalar_type
auto variable() const -> const variable_type &
auto tolerances(const error_tolerances< variable_type > &val) -> embedded_solver &
Set the error tolerances.
variable_type prev_variable_
auto step_size(scalar_type val) -> this_type &
Set the step size.
embedded_solver< Formula, StepSizeController > this_type
This type.
auto error_norm() const -> scalar_type
auto last_step_size() const -> scalar_type
auto step_size_controller() const -> const step_size_controller_type &
Access the controller of step sizes.
auto step_size_controller() -> step_size_controller_type &
Access the controller of step sizes.
scalar_type last_step_size_
typename problem_type::variable_type variable_type
void configure_iteration_logger(logging::iterations::iteration_logger< this_type > &iteration_logger) const
Configure an iteration logger.
auto formula() -> formula_type &
Get the formula.
auto steps() const -> index_type
void init(scalar_type time, const variable_type &variable)
Initialize.
auto problem() -> problem_type &
Get the problem.
Class of error tolerances hairer1993.
Class to calculate initial step sizes hairer1993.
auto calculate(problem_type &problem, const scalar_type &initial_time, const variable_type &initial_variable, const step_size_limits< scalar_type > &limits, const error_tolerances< variable_type > &tolerances) const -> scalar_type
Calculate the initial step size.
Class to control step sizes using PI controller gustafsson1991.
typename formula_type::problem_type problem_type
typename problem_type::variable_type variable_type
auto problem() -> problem_type &
solver_base(const problem_type &problem)
Constructor.
typename problem_type::scalar_type scalar_type
auto formula() -> formula_type &
Concept of classes to control step sizes.
Definition of error_tolerances class.
Definition of exceptions.
Definition of index_type type.
Definition of initial_step_size_calculator class.
Definition of is_eigen_vector class.
Definition of iteration_logger class.
Definition of macros for logging.
#define NUM_COLLECT_LOG_TRACE(LOGGER,...)
Write a trace log.
#define NUM_COLLECT_LOG_DEBUG(LOGGER,...)
Write a debug log.
std::ptrdiff_t index_type
Type of indices in this library.
Namespace of solvers of ordinary differential equations (ODE).
constexpr bool is_eigen_vector_v
Get whether a type is a Eigen's vector.
Definition of pi_step_size_controller class.
Definition of NUM_COLLECT_PRECONDITION macro.
#define NUM_COLLECT_PRECONDITION(CONDITION,...)
Check whether a precondition is satisfied and throw an exception if not.
Definition of solver_base class.
Definition of step_size_controller concept.