numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Class to solve equations in Rosenbrock methods using BiCGstab. More...
#include <num_collect/ode/rosenbrock/bicgstab_rosenbrock_equation_solver.h>
Public Types | |
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 | |
bicgstab_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. | |
template<base::concepts::real_scalar_dense_vector Target, base::concepts::real_scalar_dense_vector Result> | |
void | apply_jacobian (const Target &target, Result &result) |
Multiply Jacobian matrix to a vector. | |
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. | |
void | solve (const variable_type &rhs, variable_type &result) |
Solve a linear equation. | |
auto | tolerances (const error_tolerances< variable_type > &val) -> bicgstab_rosenbrock_equation_solver & |
Set the error tolerances. | |
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 | |
impl::bicgstab< variable_type > | bicgstab_ {} |
BiCGstab solver. | |
scalar_type | inverted_jacobian_coeff_ {static_cast<scalar_type>(1)} |
Coefficient multiplied to Jacobian matrices in inverted matrices. | |
problem_type * | problem_ {nullptr} |
Problem. | |
scalar_type | step_size_ {} |
Step size. | |
scalar_type | time_ {} |
Time. | |
std::optional< variable_type > | time_derivative_ {} |
Partial derivative with respect to time. | |
variable_type | variable_ {} |
Variable. | |
Class to solve equations in Rosenbrock methods using BiCGstab.
Problem | Type of the problem. |
Definition at line 46 of file bicgstab_rosenbrock_equation_solver.h.
using num_collect::ode::rosenbrock::bicgstab_rosenbrock_equation_solver< Problem >::problem_type = Problem |
Type of problem.
Definition at line 49 of file bicgstab_rosenbrock_equation_solver.h.
using num_collect::ode::rosenbrock::bicgstab_rosenbrock_equation_solver< Problem >::scalar_type = typename problem_type::scalar_type |
Type of scalars.
Definition at line 55 of file bicgstab_rosenbrock_equation_solver.h.
using num_collect::ode::rosenbrock::bicgstab_rosenbrock_equation_solver< Problem >::variable_type = typename problem_type::variable_type |
Type of variables.
Definition at line 52 of file bicgstab_rosenbrock_equation_solver.h.
|
inlineexplicit |
Constructor.
[in] | inverted_jacobian_coeff | Coefficient multiplied to Jacobian matrices in inverted matrices. |
Definition at line 70 of file bicgstab_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 137 of file bicgstab_rosenbrock_equation_solver.h.
|
inline |
Multiply Jacobian matrix to a vector.
[in] | target | Target. |
[out] | result | Result. |
Definition at line 107 of file bicgstab_rosenbrock_equation_solver.h.
|
inline |
Update Jacobian matrix and internal parameters.
[in] | problem | Problem. |
[in] | time | Time. |
[in] | step_size | Step size. |
[in] | variable | Variable. |
Definition at line 82 of file bicgstab_rosenbrock_equation_solver.h.
|
inline |
Solve a linear equation.
[in] | rhs | Right-hand-side value. |
[out] | result | Result. |
Definition at line 152 of file bicgstab_rosenbrock_equation_solver.h.
|
inline |
Set the error tolerances.
[in] | val | Value. |
Definition at line 172 of file bicgstab_rosenbrock_equation_solver.h.
|
private |
BiCGstab solver.
Definition at line 195 of file bicgstab_rosenbrock_equation_solver.h.
|
private |
Coefficient multiplied to Jacobian matrices in inverted matrices.
Definition at line 198 of file bicgstab_rosenbrock_equation_solver.h.
|
private |
Problem.
Definition at line 180 of file bicgstab_rosenbrock_equation_solver.h.
|
private |
Step size.
Definition at line 186 of file bicgstab_rosenbrock_equation_solver.h.
|
private |
Time.
Definition at line 183 of file bicgstab_rosenbrock_equation_solver.h.
|
private |
Partial derivative with respect to time.
Definition at line 192 of file bicgstab_rosenbrock_equation_solver.h.
|
staticconstexpr |
Whether to use mass.
Definition at line 62 of file bicgstab_rosenbrock_equation_solver.h.
|
staticconstexpr |
Whether to use partial derivative with respect to time.
Definition at line 58 of file bicgstab_rosenbrock_equation_solver.h.
|
private |
Variable.
Definition at line 189 of file bicgstab_rosenbrock_equation_solver.h.