AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
LinearSolverInterface.hpp
1#pragma once
2
3#include <dune/istl/solver.hh>
4
5namespace AMDiS
6{
7 template <class M, class X, class Y = X>
9 {
10 public:
11 virtual ~LinearSolverInterface() = default;
12
15 virtual void init(M const& A) = 0;
16
18 virtual void finish() = 0;
19
21 virtual void apply(X& x, Y const& b, Dune::InverseOperatorResult& res) = 0;
22 };
23
24} // end namespace AMDiS
Definition: LinearSolverInterface.hpp:9
virtual void init(M const &A)=0
Prepare the solve (and preconditioner), e.g. make a factorization of the matrix, or extract its diago...
virtual void finish()=0
Cleanup the solver, e.g. free the previously created factorization.
virtual void apply(X &x, Y const &b, Dune::InverseOperatorResult &res)=0
Apply the inverse operator to the rhs vector b.