26#include <fmt/format.h>
43template <concepts::single_variate_differentiable_problem Problem>
86 problem.evaluate_on(time, variable,
98 inverted_value = problem.mass();
102 if (abs(inverted_value) < std::numeric_limits<scalar_type>::epsilon()) {
104 "Value to invert is too small: {}.", inverted_value);
130 target += step_size * coeff * (*time_derivative_);
Class of exception on failure in algorithm.
Class to solve equations in Rosenbrock methods for single-variate case.
jacobian_type inverted_coeff_
Inverted coefficient.
std::optional< variable_type > time_derivative_
Partial derivative with respect to time.
typename problem_type::jacobian_type jacobian_type
Type of Jacobians.
void solve(const variable_type &rhs, variable_type &result)
Solve a linear equation.
void add_time_derivative_term(const scalar_type &step_size, const scalar_type &coeff, variable_type &target)
Add a term of partial derivative with respect to time.
void apply_jacobian(const variable_type &target, variable_type &result)
Multiply Jacobian to a value.
typename problem_type::variable_type variable_type
Type of variables.
void evaluate_and_update_jacobian(problem_type &problem, const scalar_type &time, const scalar_type &step_size, const variable_type &variable)
Update Jacobian and internal parameters.
scalar_rosenbrock_equation_solver(const scalar_type &inverted_jacobian_coeff)
Constructor.
typename problem_type::scalar_type scalar_type
Type of scalars.
static constexpr bool use_time_derivative
Whether to use partial derivative with respect to time.
static constexpr bool use_mass
Whether to use mass.
scalar_type inverted_jacobian_coeff_
Coefficient multiplied to Jacobian in inverted values.
jacobian_type jacobian_
Jacobian.
Problem problem_type
Type of problem.
Concept of problems of ordinary differential equations with mass.
Concept of problems of ordinary differential equations differentiable by time variable.
Definition of evaluation_type enumeration.
Definition of exceptions.
Definition of macros for logging.
#define NUM_COLLECT_LOG_AND_THROW(EXCEPTION_TYPE,...)
Write an error log and throw an exception for an error.
Definition of mass_problem concept.
Namespace of Rosenbrock method.
Definition of single_variate_differentiable_problem concept.
Struct to specify types of evaluations.
Definition of time_differentiable_problem concept.