ECLResultData.hpp
Go to the documentation of this file.
1/*
2 Copyright 2016, 2017 Statoil ASA.
3
4 This file is part of the Open Porous Media Project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef OPM_ECLRESULTDATA_HEADER_INCLUDED
21#define OPM_ECLRESULTDATA_HEADER_INCLUDED
22
23#include <memory>
24#include <string>
25#include <vector>
26
27#include <boost/filesystem/path.hpp>
28
32
38extern "C" {
39 typedef struct ecl_file_struct ecl_file_type;
40} // extern "C"
41
42namespace Opm {
43
44 class ECLGraph;
45
57 {
58 public:
60 ECLRestartData() = delete;
61
67 explicit ECLRestartData(boost::filesystem::path rstrt);
68
74 explicit ECLRestartData(std::shared_ptr<ecl_file_type> rstrt);
75
80
87
95
104
107
122 bool selectReportStep(const int step) const;
123
135 bool haveKeywordData(const std::string& vector,
136 const std::string& gridID = "") const;
137
161 template <typename T>
162 std::vector<T>
164 const std::string& gridID = "") const;
165
166 private:
167 class Impl;
168
169 std::unique_ptr<Impl> pImpl_;
170 };
171
177 {
178 public:
179 ECLInitFileData() = delete;
180
186 explicit ECLInitFileData(boost::filesystem::path initFile);
187
193 explicit ECLInitFileData(std::shared_ptr<ecl_file_type> initFile);
194
199
206
214
223
226
238 bool haveKeywordData(const std::string& vector,
239 const std::string& gridID = "") const;
240
264 template <typename T>
265 std::vector<T>
267 const std::string& gridID = "") const;
268
269 // Grant class ECLGraph privileged access to getRawFilePtr().
270 friend class ECLGraph;
271
272 private:
273 class Impl;
274
275 std::unique_ptr<Impl> pImpl_;
276
283 const ecl_file_type* getRawFilePtr() const;
284 };
285} // namespace Opm
286
287#endif // OPM_ECLRESULTDATA_HEADER_INCLUDED
struct ecl_file_struct ecl_file_type
Definition: ECLResultData.hpp:39
const char *const string
Definition: cJSON.h:170
Definition: ECLGraph.hpp:52
Definition: ECLResultData.hpp:177
ECLInitFileData(ECLInitFileData &&rhs)
ECLInitFileData & operator=(ECLInitFileData &&rhs)
std::vector< T > keywordData(const std::string &vector, const std::string &gridID="") const
ECLInitFileData(std::shared_ptr< ecl_file_type > initFile)
~ECLInitFileData()
Destructor.
ECLInitFileData(boost::filesystem::path initFile)
ECLInitFileData & operator=(const ECLInitFileData &rhs)
bool haveKeywordData(const std::string &vector, const std::string &gridID="") const
ECLInitFileData(const ECLInitFileData &rhs)
Definition: ECLResultData.hpp:57
~ECLRestartData()
Destructor.
ECLRestartData & operator=(const ECLRestartData &rhs)
bool selectReportStep(const int step) const
ECLRestartData(std::shared_ptr< ecl_file_type > rstrt)
bool haveKeywordData(const std::string &vector, const std::string &gridID="") const
ECLRestartData(const ECLRestartData &rhs)
std::vector< T > keywordData(const std::string &vector, const std::string &gridID="") const
ECLRestartData & operator=(ECLRestartData &&rhs)
ECLRestartData(boost::filesystem::path rstrt)
ECLRestartData(ECLRestartData &&rhs)
ECLRestartData()=delete
Default constructor disabled.
Definition: A.hpp:4