00001 //--------------------------------------------------------------------------- 00002 // @f$Id: solver.h 25345 2012-03-31 08:37:04Z bangerth @f$ 00003 // 00004 // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2012 by the deal.II authors 00005 // 00006 // This file is subject to QPL and may not be distributed 00007 // without copyright and license information. Please refer 00008 // to the file deal.II/doc/license.html for the text and 00009 // further information on this license. 00010 // 00011 //--------------------------------------------------------------------------- 00012 #ifndef __deal2__solver_h 00013 #define __deal2__solver_h 00014 00015 #include <deal.II/base/config.h> 00016 #include <deal.II/base/subscriptor.h> 00017 #include <deal.II/lac/vector_memory.h> 00018 00019 DEAL_II_NAMESPACE_OPEN 00020 00021 template <typename number> class Vector; 00022 class SolverControl; 00023 00141 template <class VECTOR = Vector<double> > 00142 class Solver : public Subscriptor 00143 { 00144 public: 00159 Solver (SolverControl &solver_control, 00160 VectorMemory<VECTOR> &vector_memory); 00161 00180 Solver (SolverControl &solver_control); 00181 00186 SolverControl & control() const; 00187 00188 protected: 00195 mutable GrowingVectorMemory<VECTOR> static_vector_memory; 00196 00200 SolverControl &cntrl; 00201 00205 VectorMemory<VECTOR> &memory; 00206 }; 00207 00208 /*-------------------------------- Inline functions ------------------------*/ 00209 00210 template<class VECTOR> 00211 inline 00212 Solver<VECTOR>::Solver (SolverControl &solver_control, 00213 VectorMemory<VECTOR> &vector_memory) 00214 : 00215 cntrl(solver_control), 00216 memory(vector_memory) 00217 {} 00218 00219 00220 00221 template<class VECTOR> 00222 inline 00223 Solver<VECTOR>::Solver (SolverControl &solver_control) 00224 : 00225 cntrl(solver_control), 00226 memory(static_vector_memory) 00227 {} 00228 00229 00230 00231 template <class VECTOR> 00232 inline 00233 SolverControl & 00234 Solver<VECTOR>::control() const 00235 { 00236 return cntrl; 00237 } 00238 00239 00240 00241 00242 DEAL_II_NAMESPACE_CLOSE 00243 00244 #endif 00245
documentation generated on Wed May 23 2012 06:07:39 by
doxygen
1.7.3