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 // - Id: $Id: application_wrapper.h 2605 2014-08-15 03:36:44Z secanell $
18 //
19 // ----------------------------------------------------------------------------
20 
21 #ifndef _FUEL_CELL_APPLICATION_CORE_APPLICATION_WRAPPER_H_
22 #define _FUEL_CELL_APPLICATION_CORE_APPLICATION_WRAPPER_H_
23 
24 #include "application_base.h"
25 
26 using namespace dealii;
27 
28 namespace FuelCell
29 {
30  namespace ApplicationCore
31  {
32 
41  {
42  public:
43 
51 
56 
63  virtual void declare_parameters(ParameterHandler& param);
64 
65  virtual void initialize(ParameterHandler& param);
66 
67  virtual void remesh();
68 
69  virtual void init_vector(FEVector& dst) const;
70 
71  virtual double residual(FEVector& dst,
72  const FEVectors& src,
73  bool apply_boundaries = true);
74 
75  virtual void solve(FEVector& dst,
76  const FEVectors& src);
77 
78  virtual void Tsolve(FEVector& dst,
79  const FEVectors& src);
80 
81  virtual double estimate(const FEVectors& src);
82 
83  virtual double evaluate(const FEVectors& src);
84 
85  virtual void grid_out(const std::string& filename) const;
86 
87  virtual void data_out(const std::string& filename,
88  const FEVectors& src);
89 
90  virtual std::string id() const;
91 
92  virtual void notify(const Event& reason);
93 
94  protected:
98  SmartPointer<ApplicationBase> get_wrapped_application()
99  {
100  return app;
101  }
102 
107  SmartPointer<ApplicationBase> app;
108  };
109 
110  } // ApplicationCore
111 
112 } // FuelCell
113 
114 #endif
SmartPointer< ApplicationBase > app
Pointer to the application this one depends upon.
Definition: application_wrapper.h:107
Base class for applications.
Definition: application_base.h:114
This class implements either iterative or time-stepping wrapper of applications.
Definition: application_wrapper.h:40
SmartPointer< ApplicationBase > get_wrapped_application()
Gain access to the inner application.
Definition: application_wrapper.h:98
Objects of this kind are used to notify interior applications of changes provoked by an outer loop...
Definition: event.h:57
BlockVector< double > FEVector
The vector class used by applications.
Definition: application_data.h:39
The data type used in function calls of Application.
Definition: fe_vectors.h:59