OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
base_material.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2011-13 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_material.h
11 // - Description: Base material class
12 // - Developers: M. Secanell and Madhur Bhaiya
13 // - $Id: base_material.h 1373 2013-08-21 00:34:53Z madhur $
14 //
15 //---------------------------------------------------------------------------
16 
17 #ifndef _FUELCELLSHOP__BASE_MATERIAL__H
18 #define _FUELCELLSHOP__BASE_MATERIAL__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 #include <deal.II/base/subscriptor.h>
27 
28 // Include STL
29 #include<cmath>
30 #include<iostream>
31 
32 // Include OpenFCST routines:
33 #include "utils/fcst_variables.h"
35 
36 using namespace dealii;
37 
38 namespace FuelCellShop
39 {
40  namespace Material
41  {
50  {
51  public:
52 
54 
55 
62  virtual void initialize(ParameterHandler&)
63  {
64  const std::type_info& info = typeid(*this);
65  deallog << "Pure function " << __FUNCTION__
66  << " called in Class "
67  << info.name() << std::endl;
68  }
69 
73  void set_derivative_flags(const std::vector<VariableNames>& flags)
74  {
75  derivative_flags = flags;
76  }
77 
79 
81 
82 
85  inline const std::string& name_material()
86  {
87  return name;
88  }
89 
94  virtual void print_material_properties() const
95  {
96  const std::type_info& info = typeid(*this);
97  deallog << "Pure function " << __FUNCTION__
98  << " called in Class "
99  << info.name() << std::endl;
100  }
102  protected:
103 
105 
106 
110  :
111  name("no_name")
112  { }
113 
120  BaseMaterial(const std::string& name)
121  : name(name)
122  {}
123 
127  virtual ~BaseMaterial()
128  {}
129 
135  virtual void declare_parameters(ParameterHandler&) const
136  {
137  const std::type_info& info = typeid(*this);
138  deallog << "Pure function " << __FUNCTION__
139  << " called in Class "
140  << info.name() << std::endl;
141  }
142 
152  virtual void set_parameters(const std::vector<std::string>& ,
153  const std::vector<double>& ,
154  ParameterHandler &)
155  {
156  const std::type_info& info = typeid(*this);
157  deallog << "Pure function " << __FUNCTION__
158  << " called in Class "
159  << info.name() << std::endl;
160  }
162 
164 
165 
167  const std::string name;
168 
170  std::vector<VariableNames> derivative_flags;
172  };
173 
174  } // Material
175 
176 } // FuelCellShop
177 
178  #endif