numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Class to solve equations in Rosenbrock methods for single-variate case. More...
#include <num_collect/ode/rosenbrock/scalar_rosenbrock_equation_solver.h>
Public Types | |
using | jacobian_type = typename problem_type::jacobian_type |
Type of Jacobians. | |
using | problem_type = Problem |
Type of problem. | |
using | scalar_type = typename problem_type::scalar_type |
Type of scalars. | |
using | variable_type = typename problem_type::variable_type |
Type of variables. | |
Public Member Functions | |
scalar_rosenbrock_equation_solver (const scalar_type &inverted_jacobian_coeff) | |
Constructor. | |
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. | |
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. | |
void | solve (const variable_type &rhs, variable_type &result) |
Solve a linear equation. | |
Static Public Attributes | |
static constexpr bool | use_mass = concepts::mass_problem<problem_type> |
Whether to use mass. | |
static constexpr bool | use_time_derivative |
Whether to use partial derivative with respect to time. | |
Private Attributes | |
jacobian_type | inverted_coeff_ {} |
Inverted coefficient. | |
scalar_type | inverted_jacobian_coeff_ {static_cast<scalar_type>(1)} |
Coefficient multiplied to Jacobian in inverted values. | |
jacobian_type | jacobian_ {} |
Jacobian. | |
std::optional< variable_type > | time_derivative_ {} |
Partial derivative with respect to time. | |
Class to solve equations in Rosenbrock methods for single-variate case.
Problem | Type of the problem. |
Definition at line 44 of file scalar_rosenbrock_equation_solver.h.
using num_collect::ode::rosenbrock::scalar_rosenbrock_equation_solver< Problem >::jacobian_type = typename problem_type::jacobian_type |
Type of Jacobians.
Definition at line 56 of file scalar_rosenbrock_equation_solver.h.
using num_collect::ode::rosenbrock::scalar_rosenbrock_equation_solver< Problem >::problem_type = Problem |
Type of problem.
Definition at line 47 of file scalar_rosenbrock_equation_solver.h.
using num_collect::ode::rosenbrock::scalar_rosenbrock_equation_solver< Problem >::scalar_type = typename problem_type::scalar_type |
Type of scalars.
Definition at line 53 of file scalar_rosenbrock_equation_solver.h.
using num_collect::ode::rosenbrock::scalar_rosenbrock_equation_solver< Problem >::variable_type = typename problem_type::variable_type |
Type of variables.
Definition at line 50 of file scalar_rosenbrock_equation_solver.h.
|
inlineexplicit |
Constructor.
[in] | inverted_jacobian_coeff | Coefficient multiplied to Jacobian matrices in inverted matrices. |
Definition at line 71 of file scalar_rosenbrock_equation_solver.h.
|
inline |
Add a term of partial derivative with respect to time.
[in] | step_size | Step size. |
[in] | coeff | Coefficient in formula. |
[in,out] | target | Target variable. |
Definition at line 126 of file scalar_rosenbrock_equation_solver.h.
|
inline |
Multiply Jacobian to a value.
[in] | target | Target. |
[out] | result | Result. |
Definition at line 115 of file scalar_rosenbrock_equation_solver.h.
|
inline |
Update Jacobian and internal parameters.
[in] | problem | Problem. |
[in] | time | Time. |
[in] | step_size | Step size. |
[in] | variable | Variable. |
Definition at line 83 of file scalar_rosenbrock_equation_solver.h.
|
inline |
Solve a linear equation.
[in] | rhs | Right-hand-side value. |
[out] | result | Result. |
Definition at line 141 of file scalar_rosenbrock_equation_solver.h.
|
private |
Inverted coefficient.
Definition at line 153 of file scalar_rosenbrock_equation_solver.h.
|
private |
Coefficient multiplied to Jacobian in inverted values.
Definition at line 156 of file scalar_rosenbrock_equation_solver.h.
|
private |
Jacobian.
Definition at line 147 of file scalar_rosenbrock_equation_solver.h.
|
private |
Partial derivative with respect to time.
Definition at line 150 of file scalar_rosenbrock_equation_solver.h.
|
staticconstexpr |
Whether to use mass.
Definition at line 63 of file scalar_rosenbrock_equation_solver.h.
|
staticconstexpr |
Whether to use partial derivative with respect to time.
Definition at line 59 of file scalar_rosenbrock_equation_solver.h.