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 <deal.II/base/parameter_handler.h>
22 #include <deal.II/base/point.h>
23 #include <deal.II/base/function.h>
24 #include <deal.II/lac/vector.h>
25 #include <deal.II/fe/fe_values.h>
26 
27 
28 //Include STL
29 #include <cmath>
30 #include <iostream>
31 
32 // Include OpenFCST routines:
36 
37 using namespace dealii;
38 
39 namespace FuelCellShop
40 {
48  namespace PostProcessing
49  {
54  {
55  nothing = 0,
56 
64 
76  };
77 
130  template <int dim>
131  class BaseResponse : public Subscriptor
132  {
133 
134  protected:
142  :
143  system_management(&sm)
144  {}
145 
149  virtual ~BaseResponse(){}
150 
152 
153 
156  virtual void declare_parameters(ParameterHandler& param) const {}
157 
164  virtual void initialize(ParameterHandler& param) {}
166 
168 
169 
176  virtual void compute_responses(const typename DoFApplication<dim>::CellInfo& info,
178  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& resp) const = 0;
185  virtual void compute_responses(std::vector< FuelCellShop::SolutionVariable > solution_variables,
186  const typename DoFApplication<dim>::CellInfo& info,
188  std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& resp) const = 0;
190 
193 
194  };
195 
196  }
197 }
198 
199 #endif
Definition: base_response.h:68
virtual ~BaseResponse()
Destructor.
Definition: base_response.h:149
Definition: base_response.h:67
Definition: base_response.h:57
Definition: base_response.h:58
Definition: base_response.h:69
Definition: base_response.h:72
Definition: base_response.h:62
const FuelCell::SystemManagement * system_management
Pointer to system management.
Definition: base_response.h:192
Definition: base_response.h:63
Virtual class used to develop a common interface to a set of functions used to evaluate functionals t...
Definition: base_response.h:131
Definition: system_management.h:84
Definition: system_management.h:83
This class is created for the objects handed to the mesh loops.
Definition: mesh_loop_info_objects.h:544
Definition: system_management.h:65
Definition: base_response.h:61
IMPORTANT: Add all new solution variables and equations here !
Definition: system_management.h:300
BaseResponse(const FuelCell::SystemManagement &sm)
Constructor.
Definition: base_response.h:141
Definition: base_response.h:70
virtual void initialize(ParameterHandler &param)
Initialize class parameters.
Definition: base_response.h:164
ResponsesNames
Enumeration with names for different responses:
Definition: base_response.h:53
virtual void declare_parameters(ParameterHandler &param) const
Declare any necessary parameters to compute the functional.
Definition: base_response.h:156
Virtual class used to characterize a generic layer interface.
Definition: base_layer.h:58