OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
timestepping.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 // $Id: timestepping.h 1348 2013-08-16 00:45:07Z secanell $
3 //
4 // Copyright (C) 2006, 2007, 2008 by Guido Kanschat
5 //
6 // This file is subject to QPL and may not be distributed
7 // without copyright and license information. Please refer
8 // to the file deal.II/doc/license.html for the text and
9 // further information on this license.
10 //
11 //---------------------------------------------------------------------------
12 
13 #ifndef __deal2__appframe__timestepping_h
14 #define __deal2__appframe__timestepping_h
15 
16 #include <appframe/base.h>
17 #include <appframe/residual.h>
19 
20 namespace dealii
21 {
22  class ParameterHandler;
23  template<typename T> class BlockVector;
24 }
25 
26 namespace AppFrame
27 {
63  {
64  public:
70  static const Event new_time;
71 
77  static const Event new_step_size;
78 
85 
95 
102  virtual double residual(FEVector& start, const FEVectors& rhs);
103 
107  virtual void solve(FEVector& start, const FEVectors& rhs);
108  virtual void declare_parameters (ParameterHandler& param);
109  virtual void initialize (ParameterHandler& param);
110 
114  void _initialize (ParameterHandler& param);
115 
116  protected:
118 
119  private:
124  double theta;
129  bool adaptive;
130 
138 
142  SmartPointer<const Residual> compute_residual;
143  };
144 
145 
179  class ThetaResidual : public Residual
180  {
181  public:
182  ThetaResidual(ApplicationBase& application);
183 
184  virtual double operator() (FEVector& dst, const FEVectors& src) const;
185 
186  private:
192  SmartPointer<ApplicationBase> app;
193  };
194 
195 
196 
197 }
198 
199 
200 #endif