|
33 | 33 |
|
34 | 34 | #include "Config.hpp" |
35 | 35 |
|
36 | | -#include <Eigen/Dense> |
| 36 | +#include <Eigen/Core> |
37 | 37 | #include "Getkw.h" |
38 | 38 |
|
39 | 39 | #include <boost/algorithm/string.hpp> |
|
49 | 49 |
|
50 | 50 | using boost::algorithm::to_upper_copy; |
51 | 51 |
|
52 | | -Input::Input(const std::string & filename) |
| 52 | +Input::Input(const std::string & filename) : input_(Getkw(filename, false, true)) |
53 | 53 | { |
54 | | - reader(filename.c_str()); |
| 54 | + reader(); |
55 | 55 | semanticCheck(); |
56 | 56 | } |
57 | 57 |
|
58 | 58 | Input::Input(const cavityInput & cav, const solverInput & solv, |
59 | | - const greenInput & green) |
| 59 | + const greenInput & green) : input_(Getkw()) |
60 | 60 | { |
61 | 61 | reader(cav, solv, green); |
62 | 62 | semanticCheck(); |
63 | 63 | } |
64 | 64 |
|
65 | | -void Input::reader(const char * pythonParsed) |
| 65 | +void Input::reader() |
66 | 66 | { |
67 | | - // Create a Getkw object from input file. |
68 | | - Getkw input = Getkw(pythonParsed, false, true); |
| 67 | + units_ = input_.getStr("UNITS"); |
| 68 | + CODATAyear_ = input_.getInt("CODATA"); |
69 | 69 |
|
70 | | - units_ = input.getStr("UNITS"); |
71 | | - CODATAyear_ = input.getInt("CODATA"); |
72 | | - |
73 | | - const Section & cavity = input.getSect("CAVITY"); |
| 70 | + const Section & cavity = input_.getSect("CAVITY"); |
74 | 71 |
|
75 | 72 | type_ = cavity.getStr("TYPE"); |
76 | 73 | area_ = cavity.getDbl("AREA"); |
@@ -105,7 +102,7 @@ void Input::reader(const char * pythonParsed) |
105 | 102 | } |
106 | 103 |
|
107 | 104 | // Get the contents of the Medium section |
108 | | - const Section & medium = input.getSect("MEDIUM"); |
| 105 | + const Section & medium = input_.getSect("MEDIUM"); |
109 | 106 | // Get the name of the solvent |
110 | 107 | std::string name = medium.getStr("SOLVENT"); |
111 | 108 | if (name == "EXPLICIT" || name == "E") { |
|
0 commit comments