OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
base_response.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2013 by Energy Systems Design Laboratory, University of Alberta
6 //
7 // This software is distributed under the MIT License
8 // For more information, see the README file in /doc/LICENSE
9 //
10 // - Class: base_response.h
11 // - Description: This is a base class for all available FCST response evaluators
12 // - Developers: Marc Secanell Gallart, University of Alberta
13 // - $Id: base_response.h 2605 2014-08-15 03:36:44Z secanell $
14 //
15 // ----------------------------------------------------------------------------
16 
17 #ifndef _FUELCELLSHOP__BASE__RESPONSE_H
18 #define _FUELCELLSHOP__BASE__RESPONSE_H
19 
20 // Include deal.II classes
21 #include <base/parameter_handler.h>
22 #include <base/point.h>
23 #include <base/function.h>
24 #include <lac/vector.h>
25 #include <fe/fe_values.h>
26 
27 //Include STL
28 #include <cmath>
29 #include <iostream>
30 
31 // Include OpenFCST routines:
35 
36 using namespace dealii;
37 
38 namespace FuelCellShop
39 {
47  namespace PostProcessing
48  {
53  {
54  nothing = 0,
55 
63 
74  };
75 
128  template <int dim>
129  class BaseResponse : public Subscriptor
130  {
131 
132  protected:
140  :
141  system_management(&sm)
142  {}
143 
147  virtual ~BaseResponse(){}
148 
150 
151 
154  virtual void declare_parameters(ParameterHandler& param) const {}
155 
162  virtual void initialize(ParameterHandler& param) {}
164 
166 
167 
174  virtual void compute_responses(const typename DoFApplication<dim>::CellInfo& info,
176  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& resp) const = 0;
183  virtual void compute_responses(std::vector< FuelCellShop::SolutionVariable > solution_variables,
184  const typename DoFApplication<dim>::CellInfo& info,
186  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& resp) const = 0;
188 
191 
192  };
193 
194  }
195 }
196 
197 #endif
Definition: base_response.h:67
virtual ~BaseResponse()
Destructor.
Definition: base_response.h:147
Definition: base_response.h:66
Definition: base_response.h:56
Definition: base_response.h:57
Definition: base_response.h:68
Definition: base_response.h:71
Definition: base_response.h:61
const FuelCell::SystemManagement * system_management
Pointer to system management.
Definition: base_response.h:190
Definition: base_response.h:62
Virtual class used to develop a common interface to a set of functions used to evaluate functionals t...
Definition: base_response.h:129
Definition: system_management.h:83
Definition: system_management.h:82
This class is created for the objects handed to the mesh loops.
Definition: mesh_loop_info_objects.h:625
Definition: system_management.h:64
Definition: base_response.h:60
IMPORTANT: Add all new solution variables and equations here !
Definition: system_management.h:271
BaseResponse(const FuelCell::SystemManagement &sm)
Constructor.
Definition: base_response.h:139
Definition: base_response.h:69
virtual void initialize(ParameterHandler &param)
Initialize class parameters.
Definition: base_response.h:162
ResponsesNames
Enumeration with names for different responses:
Definition: base_response.h:52
virtual void declare_parameters(ParameterHandler &param) const
Declare any necessary parameters to compute the functional.
Definition: base_response.h:154
Virtual class used to characterize a generic layer interface.
Definition: base_layer.h:58