18 #ifndef _FUELCELLSHOP__GEOMETRY_H
19 #define _FUELCELLSHOP__GEOMETRY_H
30 #include <grid/tria.h>
31 #include <grid/tria_accessor.h>
32 #include <grid/tria_iterator.h>
33 #include <grid/tria_boundary_lib.h>
34 #include <grid/grid_generator.h>
35 #include <grid/grid_in.h>
36 #include <grid/grid_out.h>
37 #include <base/parameter_handler.h>
38 #include <base/exceptions.h>
40 using namespace dealii;
42 namespace FuelCellShop
186 static void declare_GridGenerator_parameters (ParameterHandler ¶m);
207 static void set_GridGenerator_parameters (
const std::vector<std::string>& name_dvar,
208 const std::vector<double>& value_dvar,
209 ParameterHandler ¶m);
213 static boost::shared_ptr<FuelCellShop::Geometry::GridBase<dim> > create_GridGenerator (ParameterHandler ¶m)
216 boost::shared_ptr<FuelCellShop::Geometry::GridBase<dim> > pointer;
218 std::string concrete_name;
220 param.enter_subsection(
"Grid generation");
222 concrete_name = param.get(
"Type of mesh");
223 deallog <<
"name: "<<concrete_name.c_str()<<std::endl;
225 param.leave_subsection();
232 if (iterator->second)
238 deallog<<
"Pointer not initialized"<<std::endl;
244 deallog<<
"Concrete name does not exist"<<std::endl;
248 pointer->initialize(param);
259 const std::type_info& info =
typeid ( *this );
260 std::cout <<
"Pure function " << __FUNCTION__
261 <<
" called in Class "
262 << info.name() << std::endl;
267 unsigned int get_material_id (ParameterHandler& param,
268 const std::string material )
const;
271 virtual unsigned int get_material_id (
const std::string )
const
273 const std::type_info& info =
typeid ( *this );
274 std::cout <<
"Pure function " << __FUNCTION__
275 <<
" called in Class "
276 << info.name() << std::endl;
281 unsigned int get_boundary_id ( ParameterHandler& param,
282 const std::string boundary )
const;
285 unsigned int get_boundary_id (
const std::string )
const;
288 void output_grid (
const Triangulation<dim> &triangulation,
const std::string filename )
const;
293 void refine_area (
Triangulation<dim> &triangulation,
const unsigned int material_id );
300 std::string get_mesh_type()
302 return mesh_type_name;
332 inline double L_mem(){
return l_mem;}
406 virtual boost::shared_ptr<FuelCellShop::Geometry::GridBase<dim> > create_replica ()
408 const std::type_info& info =
typeid(*this);
409 deallog <<
"Pure function " << __FUNCTION__
410 <<
" called in Class "
411 << info.name() << std::endl;
417 void print_material_id_and_boundary_id (
const Triangulation<dim> &triangulation )
const;