19 #ifndef OPM_IO_ECLFILE_HPP
20 #define OPM_IO_ECLFILE_HPP
22 #include <opm/io/eclipse/EclIOdata.hpp>
29 #include <unordered_map>
32 namespace Opm {
namespace EclIO {
41 explicit EclFile(
const std::string& filename,
bool preload =
false);
43 bool formattedInput()
const {
return formatted; }
46 void loadData(
const std::string& arrName);
47 void loadData(
int arrIndex);
48 void loadData(
const std::vector<int>& arrIndex);
59 using EclEntry = std::tuple<std::string, eclArrType, int64_t>;
60 std::vector<EclEntry> getList()
const;
62 const std::vector<int>& getElementSizeList()
const {
return array_element_size; }
65 const std::vector<T>& get(
int arrIndex);
68 const std::vector<T>& get(
const std::string& name);
70 bool hasKey(
const std::string &name)
const;
71 std::size_t count(
const std::string& name)
const;
73 const std::vector<std::string>& arrayNames()
const {
return array_name; }
74 std::size_t size()
const;
79 std::string inputFilename;
81 std::unordered_map<int, std::vector<int>> inte_array;
82 std::unordered_map<int, std::vector<bool>> logi_array;
83 std::unordered_map<int, std::vector<double>> doub_array;
84 std::unordered_map<int, std::vector<float>> real_array;
85 std::unordered_map<int, std::vector<std::string>> char_array;
87 std::vector<std::string> array_name;
88 std::vector<eclArrType> array_type;
89 std::vector<int64_t> array_size;
90 std::vector<int> array_element_size;
92 std::vector<uint64_t> ifStreamPos;
94 std::map<std::string, int> array_index;
97 const std::vector<T>& getImpl(
int arrIndex, eclArrType type,
98 const std::unordered_map<
int, std::vector<T>>& array,
99 const std::string& typeStr);
102 seekPosition(
const std::vector<std::string>::size_type arrIndex)
const;
105 std::vector<bool> arrayLoaded;
107 void loadBinaryArray(std::fstream& fileH, std::size_t arrIndex);
108 void loadFormattedArray(
const std::string& fileStr, std::size_t arrIndex, int64_t fromPos);
109 void load(
bool preload);
111 std::vector<unsigned int> get_bin_logi_raw_values(
int arrIndex)
const;
112 std::vector<std::string> get_fmt_real_raw_str_values(
int arrIndex)
const;
Definition: EclFile.hpp:35
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29