20 #ifndef GEOS_LINEARALGEBRA_INTERFACES_PETSCSOLVER_HPP_
21 #define GEOS_LINEARALGEBRA_INTERFACES_PETSCSOLVER_HPP_
28 extern "C" struct _p_KSP;
78 using KSP =
struct _p_KSP *;
Simple interface for linear solvers that allows to extract solution results.
LinearSolverResult m_result
Result of most recent solve (status, timings)
LinearSolverParameters m_params
Parameters for the solver.
LinearSolverParameters const & parameters() const
This class creates and provides basic support for the Mat matrix object type used in PETSc.
Wrapper around PETSc-based preconditioners.
This class creates and provides basic support for PETSc solvers.
virtual void solve(PetscVector const &rhs, PetscVector &sol) const override
Solve preconditioned system.
virtual void apply(PetscVector const &src, PetscVector &dst) const override
Apply operator to a vector, dst = this(src).
virtual void setup(PetscMatrix const &mat) override
Compute the preconditioner from a matrix.
virtual void clear() override
Clean up the preconditioner setup.
PetscSolver(LinearSolverParameters parameters)
Solver constructor, with parameter list reference.
virtual ~PetscSolver()
Destructor.
This class creates and provides basic support for Vec vector object type used in PETSc.
Set of parameters for a linear solver or preconditioner.