AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
InitfileParser.hpp
1#pragma once
2
3#include <fstream>
4#include <set>
5#include <string>
6
7#include <dune/common/parametertree.hh>
8
9namespace AMDiS
10{
12
27 {
28 public:
30 static void readInitfile(std::istream& in, Dune::ParameterTree& pt, bool overwrite);
31
33 static void readInitfile(std::string const& fn, Dune::ParameterTree& pt, bool overwrite = true);
34
35 private:
37 static std::set<std::string>& includeList()
38 {
39 static std::set<std::string> includeFiles;
40 return includeFiles;
41 }
42
44
48 static std::string replaceVariable(Dune::ParameterTree const& pt, std::string const& input);
49
51
54 static std::string replaceExpression(Dune::ParameterTree const& pt, std::string const& input);
55 };
56
57} // end namespace AMDiS
Parser for AMDiS initfile format.
Definition: InitfileParser.hpp:27
static void readInitfile(std::istream &in, Dune::ParameterTree &pt, bool overwrite)
Read initfile from input stream into parameter-tree.
Definition: InitfileParser.cpp:24