From 8c4c68138344f85446d5bd8caa3883e78e9ca044 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Fri, 30 Aug 2013 13:04:14 +0000 Subject: [PATCH] Add Dune::Solvers::Preconditioner [[Imported from SVN: r11958]] --- dune/solvers/common/preconditioner.hh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dune/solvers/common/preconditioner.hh b/dune/solvers/common/preconditioner.hh index 8daa09d7..4d641f61 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 -- GitLab