My Project
ExtSmryOutput.hpp
1/*
2 Copyright 2019 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 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 OPM is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with OPM. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef OPM_IO_ExtSmryOutput_HPP
20#define OPM_IO_ExtSmryOutput_HPP
21
22#include <string>
23
24#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
25
26
27namespace Opm {
28
29class EclipseState;
30
31}
32
33namespace Opm { namespace EclIO {
34
35
37{
38
39public:
40 ExtSmryOutput(const std::vector<std::string>& valueKeys, const std::vector<std::string>& valueUnits,
41 const EclipseState& es, const time_t start_time);
42
43 void write(const std::vector<float>& ts_data, int report_step, bool is_final_summary);
44
45private:
46
47 const int m_min_write_interval = 15; // at least 15 seconds betwen each write
48 std::chrono::time_point<std::chrono::system_clock> m_last_write;
49
50 std::string m_outputFileName;
51 int m_nTimeSteps;
52 int m_nVect;
53 bool m_fmt;
54
55 std::vector<int> m_start_date_vect;
56 std::string m_restart_rootn;
57 int m_restart_step;
58 std::vector<std::string> m_smry_keys;
59 std::vector<std::string> m_smryUnits;
60 std::vector<int> m_rstep;
61 std::vector<int> m_tstep;
62 std::vector<std::vector<float>> m_smrydata;
63
64 std::array<int, 3> ijk_from_global_index(const GridDims& dims, int globInd) const;
65 std::vector<std::string> make_modified_keys(const std::vector<std::string>& valueKeys, const GridDims& dims);
66};
67
68
69}} // namespace Opm::EclIO
70
71#endif // OPM_IO_ExtSmryOutput_HPP
Definition: ExtSmryOutput.hpp:37
Definition: EclipseState.hpp:55
Definition: GridDims.hpp:31
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29