38template <concepts::formula Formula>
52 using base_type::base_type;
75 iteration_logger.template append<index_type>(
77 iteration_logger.template append<scalar_type>(
"Time", &
this_type::time);
78 iteration_logger.template append<scalar_type>(
"StepSize",
100 "Step size must be a positive value.");
Class to write logs of iterations.
Class of simple solver of ODEs.
void step()
Compute the variable of the next step.
typename problem_type::scalar_type scalar_type
typename problem_type::variable_type variable_type
auto step_size(scalar_type val) -> this_type &
Set the step size.
void init(scalar_type time, const variable_type &variable)
Initialize.
auto formula() -> formula_type &
Get the formula.
auto steps() const -> index_type
Get the number of steps.
auto time() const -> scalar_type
auto step_size() const -> scalar_type
Get the step size.
auto variable() const -> const variable_type &
simple_solver< Formula > this_type
solver_base< simple_solver< Formula >, Formula > base_type
static constexpr auto default_step_size
variable_type prev_variable_
void configure_iteration_logger(logging::iterations::iteration_logger< this_type > &iteration_logger) const
Configure an iteration logger.
typename formula_type::problem_type problem_type
typename problem_type::variable_type variable_type
auto problem() -> problem_type &
solver_base(const problem_type &problem)
typename problem_type::scalar_type scalar_type
auto formula() -> formula_type &
Definition of exceptions.
Definition of index_type type.
Definition of iteration_logger class.
Definition of macros for logging.
std::ptrdiff_t index_type
Type of indices in this library.
Namespace of solvers of ordinary differential equations (ODE).
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.