OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
application_wrapper.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2006-2009 by Guido Kanschat
6 // Copyright (C) 2006-2014 by Energy Systems Design Laboratory, University of Alberta
7 //
8 // This software is distributed under the MIT License
9 // For more information, see the README file in /doc/LICENSE
10 //
11 // - Class: application_wrapper.h
12 // - Description: This class implements either iterative or time-stepping
13 // wrapper of applications
14 // - Developers: Guido Kanschat, Texas A&M University
15 // Valentin N. Zingan, University of Alberta
16 // Marc Secanell, University of Alberta
17 //
18 // ----------------------------------------------------------------------------
19 
20 #ifndef _FUEL_CELL_APPLICATION_CORE_APPLICATION_WRAPPER_H_
21 #define _FUEL_CELL_APPLICATION_CORE_APPLICATION_WRAPPER_H_
22 
24 
25 using namespace dealii;
26 
27 namespace FuelCell
28 {
29  namespace ApplicationCore
30  {
31 
40  {
41  public:
42 
50 
55 
62  virtual void declare_parameters(ParameterHandler& param);
63 
64  virtual void initialize(ParameterHandler& param);
65 
66  virtual void remesh();
67 
68  virtual void init_vector(FEVector& dst) const;
69 
70  virtual double residual(FEVector& dst,
71  const FEVectors& src,
72  bool apply_boundaries = true);
73 
74  virtual void solve(FEVector& dst,
75  const FEVectors& src);
76 
77  virtual void Tsolve(FEVector& dst,
78  const FEVectors& src);
79 
80  virtual double estimate(const FEVectors& src);
81 
82  virtual double evaluate(const FEVectors& src);
83 
84  virtual void grid_out(const std::string& filename) const;
85 
86  virtual void data_out(const std::string& filename,
87  const FEVectors& src);
88 
89  virtual std::string id() const;
90 
91  virtual void notify(const Event& reason);
92 
93  protected:
97  SmartPointer<ApplicationBase> get_wrapped_application()
98  {
99  return app;
100  }
101 
106  SmartPointer<ApplicationBase> app;
107  };
108 
109  } // ApplicationCore
110 
111 } // FuelCell
112 
113 #endif
SmartPointer< ApplicationBase > app
Pointer to the application this one depends upon.
Definition: application_wrapper.h:106
Base class for applications.
Definition: application_base.h:113
This class implements either iterative or time-stepping wrapper of applications.
Definition: application_wrapper.h:39
SmartPointer< ApplicationBase > get_wrapped_application()
Gain access to the inner application.
Definition: application_wrapper.h:97
Objects of this kind are used to notify interior applications of changes provoked by an outer loop...
Definition: event.h:51
BlockVector< double > FEVector
The vector class used by applications.
Definition: application_data.h:46
The data type used in function calls of Application.
Definition: fe_vectors.h:59