Reference documentation for deal.II version 8.1.0
mg_base.h
1 // ---------------------------------------------------------------------
2 // @f$Id: mg_base.h 30036 2013-07-18 16:55:32Z maier @f$
3 //
4 // Copyright (C) 1999 - 2013 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 #ifndef __deal2__mg_base_h
18 #define __deal2__mg_base_h
19 
20 /*
21  * This file contains MGLevelObject and some abstract base classes
22  * used by Multigrid.
23  */
24 
25 #include <deal.II/base/config.h>
26 #include <deal.II/base/subscriptor.h>
27 #include <deal.II/base/smartpointer.h>
28 #include <deal.II/lac/vector.h>
29 
30 
32 
33 template <typename> class MGLevelObject;
34 
37 
38 
49 template <class VECTOR>
50 class MGMatrixBase : public Subscriptor
51 {
52 public:
53  /*
54  * Virtual destructor.
55  */
56  virtual ~MGMatrixBase();
57 
62  virtual void vmult (const unsigned int level,
63  VECTOR &dst,
64  const VECTOR &src) const = 0;
65 
70  virtual void vmult_add (const unsigned int level,
71  VECTOR &dst,
72  const VECTOR &src) const = 0;
73 
79  virtual void Tvmult (const unsigned int level,
80  VECTOR &dst,
81  const VECTOR &src) const = 0;
82 
88  virtual void Tvmult_add (const unsigned int level,
89  VECTOR &dst,
90  const VECTOR &src) const = 0;
91 };
92 
93 
101 template <class VECTOR>
103 {
104 public:
108  virtual ~MGCoarseGridBase ();
109 
113  virtual void operator() (const unsigned int level,
114  VECTOR &dst,
115  const VECTOR &src) const = 0;
116 };
117 
118 
166 template <class VECTOR>
168 {
169 public:
174  virtual ~MGTransferBase();
175 
192  virtual void prolongate (const unsigned int to_level,
193  VECTOR &dst,
194  const VECTOR &src) const = 0;
195 
223  virtual void restrict_and_add (const unsigned int from_level,
224  VECTOR &dst,
225  const VECTOR &src) const = 0;
226 };
227 
228 
229 
236 template <class VECTOR>
238 {
239 public:
243  virtual ~MGSmootherBase();
247  virtual void clear() = 0;
248 
254  virtual void smooth (const unsigned int level,
255  VECTOR &u,
256  const VECTOR &rhs) const = 0;
257 };
258 
261 DEAL_II_NAMESPACE_CLOSE
262 
263 #endif
virtual void Tvmult_add(const unsigned int level, VECTOR &dst, const VECTOR &src) const =0
virtual void vmult_add(const unsigned int level, VECTOR &dst, const VECTOR &src) const =0
virtual void vmult(const unsigned int level, VECTOR &dst, const VECTOR &src) const =0
virtual void Tvmult(const unsigned int level, VECTOR &dst, const VECTOR &src) const =0