phaseflow
FEM solver for the Navier-Stokes-Boussinesq equations coupled with enthalpy-based phase change
 All Classes Namespaces Files Functions Variables Macros Pages
my_parameter_handler.h
Go to the documentation of this file.
1 #ifndef _my_parameter_handler_h_
2 #define _my_parameter_handler_h_
3 
4 #include <deal.II/base/parameter_handler.h>
5 
6 namespace MyParameterHandler
7 {
8  using namespace dealii;
9 
10  template<typename ItemType>
11  std::vector<ItemType> get_vector(ParameterHandler &prm, std::string parameter_name)
12  {
13  std::vector<std::string> strings = Utilities::split_string_list(prm.get(parameter_name));
14 
15  std::vector<ItemType> items;
16 
17  for (auto &string : strings)
18  {
19  std::stringstream parser(string);
20  ItemType item;
21  parser >> item;
22  items.push_back(item);
23  }
24 
25  return items;
26  }
27 
28 }
29 
30 #endif
std::vector< ItemType > get_vector(ParameterHandler &prm, std::string parameter_name)
Definition: my_parameter_handler.h:11