40 "num_collect::ode::rosenbrock::mixed_broyden_rosenbrock_equation_"
49template <concepts::multi_variate_differentiable_problem Problem>
67 static_assert(!problem_type::allowed_evaluations.mass,
68 "Mass matrix is not supported.");
103 variable_.norm() * std::numeric_limits<scalar_type>::epsilon()) {
113 variable_.norm() * std::numeric_limits<scalar_type>::epsilon()) {
120 s_.transpose() /
s_.squaredNorm();
183 problem.evaluate_on(time, variable,
187 const index_type variable_size = variable.size();
188 lu_.compute(jacobian_type::Identity(variable_size, variable_size) -
192 if (!
inverse_.array().isFinite().all()) {
194 "Failed to solve an equation. step_size={}, cond={}.",
Class of exception on failure in algorithm.
Class of tags of logs without memory management.
Class to incorporate logging in algorithms.
logging_mixin(log_tag_view tag)
Constructor.
auto logger() const noexcept -> const num_collect::logging::logger &
Access to the logger.
Class to solve equations in Rosenbrock methods using Broyden's update in novati2008.
typename problem_type::variable_type variable_type
Type of variables.
variable_type variable_
Variable.
Problem problem_type
Type of problem.
jacobian_type jacobian_
Jacobian matrix.
bool evaluated_once_
Whether evaluated a Jacobian.
typename problem_type::jacobian_type jacobian_type
Type of Jacobians.
typename problem_type::scalar_type scalar_type
Type of scalars.
void evaluate_and_update_jacobian(problem_type &problem, const scalar_type &time, const scalar_type &step_size, const variable_type &variable)
Update Jacobian matrix and internal parameters.
scalar_type step_size_
Step size.
void apply_jacobian(const variable_type &target, variable_type &result)
Multiply Jacobian matrix to a vector.
void evaluate_exactly(problem_type &problem, const scalar_type &time, const scalar_type &step_size, const variable_type &variable)
Update Jacobian matrix and internal parameters using exact values from the problem.
void solve(const variable_type &rhs, variable_type &result)
Solve a linear equation.
lu_solver_type lu_
LU solver.
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.
mixed_broyden_rosenbrock_equation_solver(const scalar_type &inverted_jacobian_coeff)
Constructor.
Eigen::PartialPivLU< jacobian_type > lu_solver_type
Type of the LU solver.
jacobian_type inverse_
Inverse of the current coefficient matrix.
variable_type diff_coeff_
Differential coefficients.
scalar_type inverted_jacobian_coeff_
Coefficient multiplied to Jacobian matrices in inverted matrices.
Definition of evaluation_type enumeration.
Definition of exceptions.
Definition of index_type type.
Definition of log_tag_view class.
Definition of macros for logging.
#define NUM_COLLECT_LOG_TRACE(LOGGER,...)
Write a trace log.
#define NUM_COLLECT_LOG_AND_THROW(EXCEPTION_TYPE,...)
Write an error log and throw an exception for an error.
Definition of logging_mixin class.
Definition of multi_variate_differentiable_problem concept.
std::ptrdiff_t index_type
Type of indices in this library.
Namespace of Rosenbrock method.
constexpr auto mixed_broyden_rosenbrock_equation_solver_tag
Log tag.
Struct to specify types of evaluations.