dune-istl  2.4.1-rc2
preconditioner.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 #ifndef DUNE_ISTL_PRECONDITIONER_HH
4 #define DUNE_ISTL_PRECONDITIONER_HH
5 namespace Dune {
10  //=====================================================================
24  //=====================================================================
25  template<class X, class Y>
27  public:
29  typedef X domain_type;
31  typedef Y range_type;
33  typedef typename X::field_type field_type;
34 
50  virtual void pre (X& x, Y& b) = 0;
51 
62  virtual void apply (X& v, const Y& d) = 0;
63 
72  virtual void post (X& x) = 0;
73 
74  // every abstract base class has a virtual destructor
75  virtual ~Preconditioner () {}
76  };
77 
81 }
82 #endif
Base class for matrix free definition of preconditioners.
Definition: preconditioner.hh:26
virtual ~Preconditioner()
Definition: preconditioner.hh:75
virtual void post(X &x)=0
Clean up.
Y range_type
The range type of the preconditioner.
Definition: preconditioner.hh:31
virtual void pre(X &x, Y &b)=0
Prepare the preconditioner.
virtual void apply(X &v, const Y &d)=0
Apply one step of the preconditioner to the system A(v)=d.
X domain_type
The domain type of the preconditioner.
Definition: preconditioner.hh:29
X::field_type field_type
The field type of the preconditioner.
Definition: preconditioner.hh:33
Definition: basearray.hh:19