19 #ifndef OPM_IO_ExtESmry_HPP
20 #define OPM_IO_ExtESmry_HPP
26 #include <unordered_map>
31 #include <opm/common/utility/TimeService.hpp>
33 namespace Opm {
namespace EclIO {
35 using ArrSourceEntry = std::tuple<std::string, std::string, int, uint64_t>;
36 using TimeStepEntry = std::tuple<int, int, uint64_t>;
37 using RstEntry = std::tuple<std::string, int>;
40 using LodsmryHeadType = std::tuple<time_point, RstEntry, std::vector<std::string>, std::vector<std::string>,
41 std::vector<int>, std::vector<int>>;
48 explicit ExtESmry(
const std::string& filename,
bool loadBaseRunData=
false);
50 const std::vector<float>& get(
const std::string& name);
51 std::vector<float> get_at_rstep(
const std::string& name);
52 std::string& get_unit(
const std::string& name);
55 void loadData(
const std::vector<std::string>& stringVect);
57 time_point startdate()
const {
return m_startdat; }
59 bool hasKey(
const std::string& key)
const;
61 size_t numberOfTimeSteps()
const {
return m_nTstep; }
62 size_t numberOfVectors()
const {
return m_nVect; }
64 const std::vector<std::string>& keywordList()
const {
return m_keyword;}
65 std::vector<std::string> keywordList(
const std::string& pattern)
const;
67 std::vector<time_point> dates();
69 bool all_steps_available();
70 std::string rootname() {
return m_inputFileName.stem(); }
71 std::tuple<double, double> get_io_elapsed()
const;
74 std::filesystem::path m_inputFileName;
75 std::vector<std::filesystem::path> m_lodsmry_files;
78 std::vector<std::map<std::string, int>> m_keyword_index;
79 std::vector<std::tuple<int,int>> m_tstep_range;
80 std::vector<std::string> m_keyword;
81 std::vector<int> m_rstep;
82 std::vector<int> m_tstep;
83 std::vector<std::vector<int>> m_rstep_v;
84 std::vector<std::vector<int>> m_tstep_v;
85 std::vector<std::vector<float>> m_vectorData;
86 std::vector<bool> m_vectorLoaded;
87 std::unordered_map<std::string, std::string> kwunits;
90 std::vector<size_t> m_nTstep_v;
92 std::vector<int> m_seqIndex;
94 std::vector<uint64_t> m_lod_offset;
95 std::vector<uint64_t> m_lod_arr_size;
97 time_point m_startdat;
102 uint64_t open_esmry(std::filesystem::path& inputFileName, LodsmryHeadType& lodsmry_head);
104 void updatePathAndRootName(std::filesystem::path& dir, std::filesystem::path& rootN);
Definition: ExtESmry.hpp:44
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29