19 #ifndef OPM_IO_ExtESmry_HPP
20 #define OPM_IO_ExtESmry_HPP
25 #include <unordered_map>
30 #include <opm/common/utility/FileSystem.hpp>
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();
73 filesystem::path m_inputFileName;
74 std::vector<filesystem::path> m_lodsmry_files;
77 std::vector<std::map<std::string, int>> m_keyword_index;
78 std::vector<std::tuple<int,int>> m_tstep_range;
79 std::vector<std::string> m_keyword;
80 std::vector<int> m_rstep;
81 std::vector<int> m_tstep;
82 std::vector<std::vector<int>> m_rstep_v;
83 std::vector<std::vector<int>> m_tstep_v;
84 std::vector<std::vector<float>> m_vectorData;
85 std::vector<bool> m_vectorLoaded;
86 std::unordered_map<std::string, std::string> kwunits;
89 std::vector<size_t> m_nTstep_v;
91 std::vector<int> m_seqIndex;
93 std::vector<uint64_t> m_lod_offset;
94 std::vector<uint64_t> m_lod_arr_size;
96 time_point m_startdat;
98 uint64_t open_esmry(Opm::filesystem::path& inputFileName, LodsmryHeadType& lodsmry_head);
100 void updatePathAndRootName(Opm::filesystem::path& dir, Opm::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