My Project
Loading...
Searching...
No Matches
state.hpp
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
7 terms of the GNU General Public License as published by the Free Software
8 Foundation, either version 3 of the License, or (at your option) any later
9 version.
10
11 OPM is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14 details.
15
16 You should have received a copy of the GNU General Public License along
17 with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef RST_STATE
21#define RST_STATE
22
23#include <opm/io/eclipse/rst/action.hpp>
24#include <opm/io/eclipse/rst/aquifer.hpp>
25#include <opm/io/eclipse/rst/group.hpp>
26#include <opm/io/eclipse/rst/header.hpp>
27#include <opm/io/eclipse/rst/netbalan.hpp>
28#include <opm/io/eclipse/rst/network.hpp>
29#include <opm/io/eclipse/rst/udq.hpp>
30#include <opm/io/eclipse/rst/well.hpp>
31
32#include <opm/input/eclipse/Schedule/Tuning.hpp>
33
34#include <opm/input/eclipse/Units/UnitSystem.hpp>
35
36#include <memory>
37#include <string>
38#include <unordered_map>
39#include <vector>
40
41namespace Opm {
42 class EclipseGrid;
43 class Parser;
44 class Runspec;
45} // namespace Opm
46
47namespace Opm { namespace EclIO {
48 class RestartFileView;
49}} // namespace Opm::EclIO
50
51namespace Opm { namespace RestartIO {
52
54{
55 RstState(std::shared_ptr<EclIO::RestartFileView> rstView,
56 const Runspec& runspec,
57 const ::Opm::EclipseGrid* grid);
58
59 static RstState load(std::shared_ptr<EclIO::RestartFileView> rstView,
60 const Runspec& runspec,
61 const Parser& parser,
62 const ::Opm::EclipseGrid* grid = nullptr);
63
64 const RstWell& get_well(const std::string& wname) const;
65
66 ::Opm::UnitSystem unit_system;
67 RstHeader header;
68 RstAquifer aquifers;
69 RstNetbalan netbalan;
70 RstNetwork network;
71 std::vector<RstWell> wells;
72 std::vector<RstGroup> groups;
73 std::vector<RstUDQ> udqs;
74 RstUDQActive udq_active;
75 std::vector<RstAction> actions;
76 Tuning tuning;
77 std::unordered_map<std::string, std::vector<std::string>> wlists;
78
79private:
80 void load_tuning(const std::vector<int>& intehead,
81 const std::vector<double>& doubhead);
82
83 void add_groups(const std::vector<std::string>& zgrp,
84 const std::vector<int>& igrp,
85 const std::vector<float>& sgrp,
86 const std::vector<double>& xgrp);
87
88 void add_wells(const std::vector<std::string>& zwel,
89 const std::vector<int>& iwel,
90 const std::vector<float>& swel,
91 const std::vector<double>& xwel,
92 const std::vector<int>& icon,
93 const std::vector<float>& scon,
94 const std::vector<double>& xcon);
95
96 void add_msw(const std::vector<std::string>& zwel,
97 const std::vector<int>& iwel,
98 const std::vector<float>& swel,
99 const std::vector<double>& xwel,
100 const std::vector<int>& icon,
101 const std::vector<float>& scon,
102 const std::vector<double>& xcon,
103 const std::vector<int>& iseg,
104 const std::vector<double>& rseg);
105
106 void add_udqs(const std::vector<int>& iudq,
107 const std::vector<std::string>& zudn,
108 const std::vector<std::string>& zudl,
109 const std::vector<double>& dudw,
110 const std::vector<double>& dudg,
111 const std::vector<double>& dudf);
112
113 void add_actions(const Parser& parser,
114 const Runspec& runspec,
115 std::time_t sim_time,
116 const std::vector<std::string>& zact,
117 const std::vector<int>& iact,
118 const std::vector<float>& sact,
119 const std::vector<std::string>& zacn,
120 const std::vector<int>& iacn,
121 const std::vector<double>& sacn,
122 const std::vector<std::string>& zlact);
123
124 void add_wlist(const std::vector<std::string>& zwls,
125 const std::vector<int>& iwls);
126
127};
128
129}} // namespace Opm::RestartIO
130
131#endif
The hub of the parsing process.
Definition Parser.hpp:60
Definition aquifer.hpp:45
Definition netbalan.hpp:35
Definition network.hpp:39
Definition udq.hpp:88
Definition Runspec.hpp:481
Definition UnitSystem.hpp:34
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Definition header.hpp:33
Definition state.hpp:54
Definition well.hpp:43
Definition Tuning.hpp:48