40template <concepts::multi_variate_differentiable_problem Problem>
86 problem.evaluate_on(time, variable,
96 const index_type variable_size = variable.size();
98 lu_.compute(problem.mass() -
101 lu_.compute(jacobian_type::Identity(variable_size, variable_size) -
129 target += step_size * coeff * (*time_derivative_);
141 result =
lu_.solve(rhs);
Class to solve equations in Rosenbrock methods using LU decomposition.
typename problem_type::scalar_type scalar_type
Type of scalars.
static constexpr bool use_mass
Whether to use mass.
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.
lu_rosenbrock_equation_solver(const scalar_type &inverted_jacobian_coeff)
Constructor.
scalar_type inverted_jacobian_coeff_
Coefficient multiplied to Jacobian matrices in inverted matrices.
typename problem_type::jacobian_type jacobian_type
Type of Jacobians.
static constexpr bool use_time_derivative
Whether to use partial derivative with respect to time.
Problem problem_type
Type of problem.
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.
Eigen::PartialPivLU< jacobian_type > lu_solver_type
Type of the LU solver.
std::optional< variable_type > time_derivative_
Partial derivative with respect to time.
lu_solver_type lu_
LU solver.
void apply_jacobian(const variable_type &target, variable_type &result)
Multiply Jacobian matrix to a vector.
jacobian_type jacobian_
Jacobian matrix.
typename problem_type::variable_type variable_type
Type of variables.
void solve(const variable_type &rhs, variable_type &result)
Solve a linear equation.
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 index_type type.
Definition of mass_problem concept.
Definition of multi_variate_differentiable_problem concept.
std::ptrdiff_t index_type
Type of indices in this library.
Namespace of Rosenbrock method.
Struct to specify types of evaluations.
Definition of time_differentiable_problem concept.