Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
solver.h
1 // ---------------------------------------------------------------------
2 // @f$Id: solver.h 30036 2013-07-18 16:55:32Z maier @f$
3 //
4 // Copyright (C) 1998 - 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__solver_h
18 #define __deal2__solver_h
19 
20 #include <deal.II/base/config.h>
21 #include <deal.II/base/subscriptor.h>
22 #include <deal.II/lac/vector_memory.h>
23 
25 
26 template <typename number> class Vector;
27 class SolverControl;
28 
146 template <class VECTOR = Vector<double> >
147 class Solver : public Subscriptor
148 {
149 public:
164  Solver (SolverControl &solver_control,
165  VectorMemory<VECTOR> &vector_memory);
166 
185  Solver (SolverControl &solver_control);
186 
191  SolverControl &control() const;
192 
193 protected:
201 
206 
211 };
212 
213 /*-------------------------------- Inline functions ------------------------*/
214 
215 template<class VECTOR>
216 inline
218  VectorMemory<VECTOR> &vector_memory)
219  :
220  cntrl(solver_control),
221  memory(vector_memory)
222 {}
223 
224 
225 
226 template<class VECTOR>
227 inline
229  :
230  cntrl(solver_control),
231  memory(static_vector_memory)
232 {}
233 
234 
235 
236 template <class VECTOR>
237 inline
240 {
241  return cntrl;
242 }
243 
244 
245 
246 
247 DEAL_II_NAMESPACE_CLOSE
248 
249 #endif
VectorMemory< VECTOR > & memory
Definition: solver.h:210
SolverControl & cntrl
Definition: solver.h:205
GrowingVectorMemory< VECTOR > static_vector_memory
Definition: solver.h:200
SolverControl & control() const
Definition: solver.h:239
Definition: solver.h:147
Solver(SolverControl &solver_control, VectorMemory< VECTOR > &vector_memory)
Definition: solver.h:217