Updates of C++ class ERft to be used with python bindings

-> Support for extracting data based on report index
  -> adding extra float (time) to RftReportList
This commit is contained in:
Torbjørn Skille
2020-03-23 10:57:49 +01:00
parent b992ff0e1c
commit d258ce5a57
5 changed files with 176 additions and 36 deletions
+11 -3
View File
@@ -44,16 +44,20 @@ public:
template <typename T>
const std::vector<T>& getRft(const std::string& name, const std::string& wellName,
int year, int month, int day) const;
template <typename T>
const std::vector<T>& getRft(const std::string& name, int reportIndex) const;
std::vector<std::string> listOfWells() const;
std::vector<RftDate> listOfdates() const;
using RftReportList = std::vector<std::pair<std::string, RftDate>>;
using RftReportList = std::vector<std::tuple<std::string, RftDate, float>>;
const RftReportList& listOfRftReports() const { return rftReportList; }
bool hasRft(const std::string& wellName, const RftDate& date) const;
bool hasRft(const std::string& wellName, int year, int month, int day) const;
std::vector<EclEntry> listOfRftArrays(int reportIndex ) const;
std::vector<EclEntry> listOfRftArrays(const std::string& wellName,
const RftDate& date) const;
@@ -63,8 +67,10 @@ public:
bool hasArray(const std::string& arrayName, const std::string& wellName,
const RftDate& date) const;
int numberOfReports() { return numReports; }
private:
std::map<int, std::pair<int,int>> arrIndexRange;
std::map<int, std::tuple<int,int>> arrIndexRange;
int numReports;
std::vector<float> timeList;
@@ -72,9 +78,11 @@ private:
std::set<RftDate> dateList;
RftReportList rftReportList;
std::map<std::pair<std::string,RftDate>,int> reportIndex; // mapping report index to wellName and date (tupe)
std::map<std::tuple<std::string,RftDate>,int> reportIndices; // mapping report index to wellName and date (tupe)
int getReportIndex(const std::string& wellName, const RftDate& date) const;
int getArrayIndex(const std::string& name, int reportIndex) const;
int getArrayIndex(const std::string& name, const std::string& wellName,
const RftDate& date) const;
};