44template <base::concepts::real_scalar_dense_vector Vector>
72 template <
typename CoeffFunction>
88 rhs.norm() * std::numeric_limits<scalar_type>::epsilon();
124 "Maximum number of dimensions of subspace must be a positive "
153 Eigen::ColPivHouseholderQR<matrix_type>
qr_{};
Class to solve linear equations using generalized minimal residual (GMRES) golub2013.
Eigen::MatrixX< scalar_type > matrix_type
Type of matrices.
Eigen::VectorX< scalar_type > temp_rhs_
Temporary vector for solving internal equation.
static constexpr index_type default_max_subspace_dim
Default maximum number of dimensions of subspace.
Eigen::VectorX< scalar_type > temp_sol_
Temporary vector for solving internal equation.
vector_type residual_
Residual.
matrix_type basis_
Basis of subspace.
void solve(CoeffFunction &&coeff_function, const vector_type &rhs, vector_type &solution)
Solve.
index_type max_subspace_dim_
Maximum number of dimensions of subspace.
auto max_subspace_dim(index_type val) -> gmres &
Set the maximum number of dimensions of subspace.
Eigen::ColPivHouseholderQR< matrix_type > qr_
QR decomposition.
typename vector_type::Scalar scalar_type
Type of scalars.
matrix_type hessenberg_
Hessenberg matrix.
Vector vector_type
Type of vectors.
Definition of exceptions.
Definition of index_type type.
Definition of macros for logging.
std::ptrdiff_t index_type
Type of indices in this library.
Namespace of internal implementations.
Definition of NUM_COLLECT_PRECONDITION macro.
#define NUM_COLLECT_PRECONDITION(CONDITION,...)
Check whether a precondition is satisfied and throw an exception if not.
Definition of real_scalar_dense_vector concept.