OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
app_read_mesh.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: app_read_mesh.cc
11 // - Description:
12 // - Developers: ?????????
13 // - $Id: app_read_mesh.h 2605 2014-08-15 03:36:44Z secanell $
14 //
15 //---------------------------------------------------------------------------
16 
17 #ifndef _FUELCELL__APP_READ_MESH__H
18 #define _FUELCELL__APP_READ_MESH__H
19 
20 //-- OpenFCST
22 
23 // Use namespace of deal.II
24 using namespace dealii;
25 
26 namespace FuelCell
27 {
34 namespace InitialSolution
35 {
41 template <int dim>
42 //class InitialSolution
44  :
45  public Function<dim>
46 {
47 public:
51  AppReadMeshIC (std::vector<std::string> );
55  ~AppReadMeshIC ();
60  void vector_value ( const Point<dim> &p,
61  Vector<double> &v ) const;
62 
63  double value (const Point<dim> &/*p*/, const unsigned int) const;
64 
68  void set_solution_names ( std::vector<std::string> names )
69  {
70  component_names = names;
71  }
72 
73 private:
74 
78  std::vector<std::string> component_names;
79 };
80 } //end namespace InitialSolution
81 
82 
83 namespace Application
84 {
85 //---------------------------------------------------------------------------
86 //---------------------------------------------------------------------------
87 //---------------------------------------------------------------------------
94 template <int dim>
96  :
98 {
99 public:
100 
107  AppReadMesh ( boost::shared_ptr<FuelCell::ApplicationCore::ApplicationData> data =
108  boost::shared_ptr<FuelCell::ApplicationCore::ApplicationData> () );
109 
113  ~AppReadMesh();
120  virtual void declare_parameters ( ParameterHandler& param );
121 
126  void _initialize ( ParameterHandler& param );
127 
131  virtual void initialize ( ParameterHandler& param );
132 
136  virtual void initialize_solution (FuelCell::ApplicationCore::FEVector& initial_guess,
137  std::shared_ptr<Function<dim> > initial_function = std::shared_ptr<Function<dim> >());
138 
149  const typename DoFApplication<dim>::CellInfo& )
150  {}
151 
155  void cell_responses ( std::vector<double>& ,
156  const typename DoFApplication<dim>::CellInfo&,
158  {}
159 
164  void global_responses ( std::vector<double>&,
166  {}
167 
168 
173  virtual void data_out ( const std::string &basename,
175 
181  virtual void solve(FEVector& dst, const FEVectors& src){
182  //Do nothing
183  }
184 
185 protected:
192  std::vector<std::string> equation_names;
198  std::vector<std::string> component_names;
199 
201  std::vector<std::string> design_var;
202 
204  std::vector<double> design_var_value;
205 
206 };
207 
208 }
209 }
210 
211 #endif
WHAT DOES THIS APPLICATION DO?
Definition: app_read_mesh.h:95
std::vector< std::string > design_var
Stores the design variable names so that the name can be appended to the .vtk file name...
Definition: app_read_mesh.h:201
std::vector< std::string > component_names
List of solution variables.
Definition: app_read_mesh.h:78
virtual void solve(FEVector &dst, const FEVectors &src)
Reimplementation of the pure virtual solve function.
Definition: app_read_mesh.h:181
void set_solution_names(std::vector< std::string > names)
Function to set the component names of the initial solution.
Definition: app_read_mesh.h:68
void cell_residual(FuelCell::ApplicationCore::FEVector &, const typename DoFApplication< dim >::CellInfo &)
Integration of the rhs of the equations.
Definition: app_read_mesh.h:148
This class is created for the objects handed to the mesh loops.
Definition: mesh_loop_info_objects.h:544
std::vector< std::string > equation_names
Structure where we store the problem we want to solve.
Definition: app_read_mesh.h:192
std::vector< std::string > component_names
Structure where we store the name of each component in our problem.
Definition: app_read_mesh.h:198
This class is used when solving the problem using Newton&#39;s method to provide an initial solution...
Definition: app_read_mesh.h:43
void cell_responses(std::vector< double > &, const typename DoFApplication< dim >::CellInfo &, const FuelCell::ApplicationCore::FEVector &)
Compute the value of all objective function and constraints.
Definition: app_read_mesh.h:155
void global_responses(std::vector< double > &, const FuelCell::ApplicationCore::FEVector &)
This class is used to evaluate all responses that do not require looping over cells.
Definition: app_read_mesh.h:164
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
Application handling matrices and assembling the linear system to solve the sensitivity equations...
Definition: optimization_block_matrix_application.h:49
std::vector< double > design_var_value
Stores the values of the design variables so that the number can be appended to the ...
Definition: app_read_mesh.h:204