50 std::string
const& petsc_options);
60 KSPGetIterationNumber(
solver_, &its);
74 constexpr auto rectangular_solvers = std::to_array<std::string_view>(
75 {KSPGMRES, KSPFGMRES, KSPBCGS, KSPBCGSL, KSPTFQMR, KSPCGS});
77 return std::ranges::any_of(rectangular_solvers,
78 [&](
const auto& solver)
79 {
return solver == ksp_type; });
Declaration of class PETScMatrix, which provides an interface to PETSc matrix routines.
Declaration of class PETScVector, which provides an interface to PETSc vector routines.
double elapsed_ctime_
Clock time.
bool can_solve_rectangular_
PETScLinearSolver(std::string const &prefix, std::string const &petsc_options)
PetscInt getNumberOfIterations() const
Get number of iterations.
PC pc_
Preconditioner type.
bool solve(PETScMatrix &A, PETScVector &b, PETScVector &x)
double getElapsedTime() const
Get elapsed wall clock time.
bool canSolverHandleRectangular(std::string_view ksp_type)
bool canSolveRectangular() const
Get, if the solver can handle rectangular equation systems.
Wrapper class for PETSc matrix routines for matrix.
Wrapper class for PETSc vector.