summaryrefslogtreecommitdiff
path: root/parser.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'parser.hpp')
-rw-r--r--parser.hpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/parser.hpp b/parser.hpp
new file mode 100644
index 0000000..7ffda0d
--- /dev/null
+++ b/parser.hpp
@@ -0,0 +1,55 @@
+// -*- mode: c++ -*-
+
+//
+// Purpose: Read-in functionality to define parameters at runtime
+// Based on the implementation of Morales-Hernandez /et al./'s SERGHEI
+//
+
+#ifndef PARSER_HPP
+#define PARSER_HPP
+
+#include "header.hpp"
+
+class ParserLine
+{
+
+public:
+
+ std::string line;
+ std::string key;
+ std::stringstream value;
+
+ void parse();
+
+};
+
+class Parser
+{
+
+public:
+
+ std::string surface_mesh_file;
+ std::string surface_data_file;
+ std::string subsurface_mesh_file;
+ std::string subsurface_data_file;
+
+ std::vector<std::string> surface_data_group;
+ std::vector<double> surface_time;
+
+ std::vector<std::string> subsurface_data_group;
+ std::vector<double> subsurface_time;
+
+ int n_agent;
+ int n_iteration;
+ int seed;
+
+ int surface_np;
+ int subsurface_np;
+
+ double fuzz;
+
+ void read_options(std::string fname);
+
+};
+
+#endif