OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mesh_loop.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 // $Id: mesh_loop.h 1348 2013-08-16 00:45:07Z secanell $
3 //
4 // Copyright (C) 2006, 2007, 2008, 2009 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__mesh_loop_h
14 #define __deal2__appframe__mesh_loop_h
15 
16 #include <lac/solver_control.h>
17 #include <appframe/base.h>
18 #include <numerics/vector_tools.h>
19 
20 #include <set>
21 
22 namespace AppFrame
23 {
24  template <int dim> class DoFApplication;
25 
38  class MeshLoop :
39  public ApplicationCopy
40  {
41  public:
46  static const Event new_mesh;
47 
60  virtual void declare_parameters(ParameterHandler& param);
61  virtual void initialize (ParameterHandler& param);
62  virtual void solve(FEVector& start, const FEVectors& rhs);
63  virtual void data_out(const std::string& filename, const FEVectors& src);
68  void set_name(std::string new_name);
69  private:
82  virtual void setup(FEVector& v);
83 
101  virtual void do_remesh(FEVector& v);
102 
111  virtual void do_evaluate(const FEVectors&);
112 
117  ReductionControl control;
122  std::string base_name;
123  };
124 
134  template <int dim>
135  class DoFMeshLoop :
136  public MeshLoop
137  {
138  public:
139 
146 
147  ~DoFMeshLoop();
154  virtual void declare_parameters(ParameterHandler& param);
155  virtual void initialize (ParameterHandler& param);
156  virtual void data_out(const std::string& filename, const FEVectors& src);
157 
158  private:
159  virtual void setup(FEVector&);
160  virtual void do_remesh(FEVector&);
161  virtual void do_evaluate(const FEVectors&);
165  SmartPointer<DoFApplication<dim> > dof_app;
166 
181 
198 
205 
211  };
212 }
213 
214 #endif