17 #ifndef _FUELCELL__APP_CATHODE__H
18 #define _FUELCELL__APP_CATHODE__H
21 #include "base/parameter_handler.h"
22 #include "base/function_lib.h"
23 #include "base/function.h"
24 #include "base/quadrature_lib.h"
26 #include "lac/block_vector.h"
27 #include "lac/full_matrix.h"
28 #include "lac/solver_cg.h"
29 #include "lac/solver_gmres.h"
30 #include "lac/precondition.h"
31 #include "lac/precondition_block.h"
32 #include "lac/block_matrix_array.h"
33 #include "lac/filtered_matrix.h"
34 #include "lac/sparse_ilu.h"
35 #include "lac/sparse_direct.h"
37 #include "grid/grid_generator.h"
38 #include "grid/tria_accessor.h"
39 #include "grid/tria_iterator.h"
40 #include "grid/tria_boundary_lib.h"
42 #include "fe/fe_values.h"
44 #include "numerics/vector_tools.h"
45 #include "numerics/matrix_tools.h"
46 #include "numerics/error_estimator.h"
48 #include "boost/shared_ptr.hpp"
91 using namespace dealii;
202 AppCathode ( boost::shared_ptr<AppFrame::ApplicationData> data =
203 boost::shared_ptr<AppFrame::ApplicationData> () );
215 virtual void declare_parameters ( ParameterHandler& param );
223 virtual void set_parameters (
const std::vector<std::string>& name_dvar,
224 const std::vector<double>& value_dvar,
225 ParameterHandler& param );
231 void _initialize ( ParameterHandler& param );
236 virtual void initialize ( ParameterHandler& param );
242 void initialize_grid ( ParameterHandler& param );
295 virtual void dirichlet_bc ( std::map<unsigned int, double>& boundary_values )
const;
320 virtual void data_out (
const std::string &basename,
330 bool &good_solution );
352 virtual void cell_dresidual_dlambda ( std::vector<AppFrame::FEVector >& cell_vector,
354 std::vector<std::vector<double> >& src );
362 virtual void check_responses();
367 virtual void cell_responses ( std::vector<double>& resp,
374 virtual void global_responses ( std::vector<double>& resp,
382 virtual void cell_dresponses_dl ( std::vector<std::vector<double> >& cell_df_dl,
391 virtual void global_dresponses_dl ( std::vector<std::vector<double> >& df_dl,
398 virtual void cell_dresponses_du ( std::vector<AppFrame::FEVector >& cell_df_du,
400 std::vector<std::vector<double> >& src );
407 virtual void global_dresponses_du ( std::vector<AppFrame::FEVector >& df_du,
423 void print_cell_matrix(
FullMatrix<double> matrix, std::string filename =
"cell_matrix.dat",
bool exit =
true)
const
431 deallog<<
"Fins aviat..."<<std::endl;
439 void print_cell_matrix(ParameterHandler param, std::string filename =
"parameters_sample.prm",
bool exit =
true)
const
441 std::ofstream marc(filename);
442 param.print_parameters(marc,
443 ParameterHandler::Text);
446 deallog<<
"Fins aviat..."<<std::endl;
463 boost::shared_ptr< FuelCellShop::Geometry::GridBase<dim> >
grid;
492 boost::shared_ptr<FuelCellShop::Layer::GasDiffusionLayer<dim> >
CGDL;
497 boost::shared_ptr<FuelCellShop::Layer::MicroPorousLayer<dim> >
CMPL;
502 boost::shared_ptr<FuelCellShop::Layer::CatalystLayer<dim> >
CCL;
562 #endif //_FUELCELL__APP_CATHODE_H