state.hpp
Go to the documentation of this file.
1/*
2 Copyright 2020 Equinor 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 RST_STATE
20#define RST_STATE
21
22#include <vector>
23#include <string>
24
30
32
33
34namespace Opm {
35
36namespace RestartIO {
37struct RstState {
38 RstState(const ::Opm::UnitSystem& unit_system,
39 const std::vector<int>& intehead,
40 const std::vector<bool>& logihead,
41 const std::vector<double>& doubhead);
42
43 RstState(const ::Opm::UnitSystem& unit_system,
44 const std::vector<int>& intehead,
45 const std::vector<bool>& logihead,
46 const std::vector<double>& doubhead,
47 const std::vector<std::string>& zgrp,
48 const std::vector<int>& igrp,
49 const std::vector<float>& sgrp,
50 const std::vector<double>& xgrp,
51 const std::vector<std::string>& zwel,
52 const std::vector<int>& iwel,
53 const std::vector<float>& swel,
54 const std::vector<double>& xwel,
55 const std::vector<int>& icon,
56 const std::vector<float>& scon,
57 const std::vector<double>& xcon);
58
59 RstState(const ::Opm::UnitSystem& unit_system,
60 const std::vector<int>& intehead,
61 const std::vector<bool>& logihead,
62 const std::vector<double>& doubhead,
63 const std::vector<std::string>& zgrp,
64 const std::vector<int>& igrp,
65 const std::vector<float>& sgrp,
66 const std::vector<double>& xgrp,
67 const std::vector<std::string>& zwel,
68 const std::vector<int>& iwel,
69 const std::vector<float>& swel,
70 const std::vector<double>& xwel,
71 const std::vector<int>& icon,
72 const std::vector<float>& scon,
73 const std::vector<double>& xcon,
74 const std::vector<int>& iseg,
75 const std::vector<double>& rseg);
76
77
78 static RstState load(EclIO::ERst& rst_file, int report_step);
79
80 const RstWell& get_well(const std::string& wname) const;
81
82 const ::Opm::UnitSystem unit_system;
84 std::vector<RstWell> wells;
85 std::vector<RstGroup> groups;
87
88private:
89 void load_tuning(const std::vector<int>& intehead,
90 const std::vector<double>& doubhead);
91
92 void add_groups(const std::vector<std::string>& zgrp,
93 const std::vector<int>& igrp,
94 const std::vector<float>& sgrp,
95 const std::vector<double>& xgrp);
96};
97}
98}
99
100
101
102
103#endif
const char *const string
Definition: cJSON.h:170
Definition: ERst.hpp:38
doubhead
Definition: VectorItems/doubhead.hpp:29
logihead
Definition: VectorItems/logihead.hpp:29
intehead
Definition: VectorItems/intehead.hpp:29
Definition: A.hpp:4
Definition: header.hpp:31
Definition: state.hpp:37
RstHeader header
Definition: state.hpp:83
std::vector< RstWell > wells
Definition: state.hpp:84
const RstWell & get_well(const std::string &wname) const
std::vector< RstGroup > groups
Definition: state.hpp:85
Tuning tuning
Definition: state.hpp:86
RstState(const ::Opm::UnitSystem &unit_system, const std::vector< int > &intehead, const std::vector< bool > &logihead, const std::vector< double > &doubhead, const std::vector< std::string > &zgrp, const std::vector< int > &igrp, const std::vector< float > &sgrp, const std::vector< double > &xgrp, const std::vector< std::string > &zwel, const std::vector< int > &iwel, const std::vector< float > &swel, const std::vector< double > &xwel, const std::vector< int > &icon, const std::vector< float > &scon, const std::vector< double > &xcon, const std::vector< int > &iseg, const std::vector< double > &rseg)
RstState(const ::Opm::UnitSystem &unit_system, const std::vector< int > &intehead, const std::vector< bool > &logihead, const std::vector< double > &doubhead)
static RstState load(EclIO::ERst &rst_file, int report_step)
RstState(const ::Opm::UnitSystem &unit_system, const std::vector< int > &intehead, const std::vector< bool > &logihead, const std::vector< double > &doubhead, const std::vector< std::string > &zgrp, const std::vector< int > &igrp, const std::vector< float > &sgrp, const std::vector< double > &xgrp, const std::vector< std::string > &zwel, const std::vector< int > &iwel, const std::vector< float > &swel, const std::vector< double > &xwel, const std::vector< int > &icon, const std::vector< float > &scon, const std::vector< double > &xcon)
const ::Opm::UnitSystem unit_system
Definition: state.hpp:82
Definition: custom-opm-common/opm-common/opm/io/eclipse/rst/well.hpp:39
Definition: Tuning.hpp:27