diff --git a/dune/solvers/common/preconditioner.hh b/dune/solvers/common/preconditioner.hh index 8daa09d7b1838737e87a00cfe8ee9c7bb269f172..4d641f61fdf26115d0d0359455f12ff7b51f44e8 100644 --- a/dune/solvers/common/preconditioner.hh +++ b/dune/solvers/common/preconditioner.hh @@ -21,4 +21,22 @@ public: }; +namespace Dune { + namespace Solvers { + + /** \brief Abstract base class for preconditioners + */ + template <class MatrixType, class VectorType, class BitVectorType + = Dune::BitSetVector<VectorType::block_type::dimension> > + class Preconditioner : public NumProc + { + public: + virtual ~Preconditioner() {} + + virtual void check() const {} + virtual void setMatrix(const MatrixType& matrix) = 0; + virtual void apply(VectorType& x, const VectorType& r) = 0; + }; + } +} #endif