Updates of C++ class ESmry to be used with python bindings
-> adding member function ESmry::get_startdat(), start of simulation from keyword STARTDAT in SMSPEC file -> adding member function ESmry::numberOfTimeSteps(), number of timesteps in run
This commit is contained in:
@@ -41,10 +41,14 @@ public:
|
||||
|
||||
std::vector<float> get_at_rstep(const std::string& name) const;
|
||||
|
||||
const std::vector<int>& get_startdat() const { return startdat; }
|
||||
|
||||
const std::vector<std::string>& keywordList() const { return keyword; }
|
||||
|
||||
int timestepIdxAtReportstepStart(const int reportStep) const;
|
||||
|
||||
int numberOfTimeSteps() const { return param[0].size(); }
|
||||
|
||||
const std::string& get_unit(const std::string& name) const;
|
||||
|
||||
private:
|
||||
@@ -58,6 +62,9 @@ private:
|
||||
std::vector<int> seqIndex;
|
||||
std::vector<float> seqTime;
|
||||
|
||||
// start of simulation year, month, day, hr, min, microsec*1000000
|
||||
std::vector<int> startdat;
|
||||
|
||||
std::vector<std::string> checkForMultipleResultFiles(const Opm::filesystem::path& rootN, bool formatted) const;
|
||||
|
||||
void getRstString(const std::vector<std::string>& restartArray,
|
||||
|
||||
@@ -100,9 +100,10 @@ ESmry::ESmry(const std::string &filename, bool loadBaseRunData)
|
||||
const std::vector<std::string> keywords = smspec.get<std::string>("KEYWORDS");
|
||||
const std::vector<std::string> wgnames = smspec.get<std::string>("WGNAMES");
|
||||
const std::vector<int> nums = smspec.get<int>("NUMS");
|
||||
|
||||
const std::vector<std::string> units = smspec.get<std::string>("UNITS");
|
||||
|
||||
startdat = smspec.get<int>("STARTDAT");
|
||||
|
||||
for (unsigned int i=0; i<keywords.size(); i++) {
|
||||
const std::string keyString = makeKeyString(keywords[i], wgnames[i], nums[i]);
|
||||
if (keyString.length() > 0) {
|
||||
@@ -142,9 +143,10 @@ ESmry::ESmry(const std::string &filename, bool loadBaseRunData)
|
||||
const std::vector<std::string> keywords = smspec_rst.get<std::string>("KEYWORDS");
|
||||
const std::vector<std::string> wgnames = smspec_rst.get<std::string>("WGNAMES");
|
||||
const std::vector<int> nums = smspec_rst.get<int>("NUMS");
|
||||
|
||||
const std::vector<std::string> units = smspec_rst.get<std::string>("UNITS");
|
||||
|
||||
startdat = smspec_rst.get<int>("STARTDAT");
|
||||
|
||||
for (size_t i = 0; i < keywords.size(); i++) {
|
||||
const std::string keyString = makeKeyString(keywords[i], wgnames[i], nums[i]);
|
||||
if (keyString.length() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user