AggregateGroupData.hpp
Go to the documentation of this file.
1/*
2 Copyright (c) 2018 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_AGGREGATE_GROUP_DATA_HPP
21#define OPM_AGGREGATE_GROUP_DATA_HPP
22
24
27#include <cstddef>
28#include <string>
29#include <vector>
30#include <map>
31
32namespace Opm {
33class Schedule;
34class SummaryState;
35//class Group;
36class UnitSystem;
37} // Opm
38
39namespace Opm { namespace RestartIO { namespace Helpers {
40
42{
43public:
44 explicit AggregateGroupData(const std::vector<int>& inteHead);
45
47 const Opm::UnitSystem& units,
48 const std::size_t simStep,
49 const Opm::SummaryState& sumState,
50 const std::vector<int>& inteHead);
51
52 const std::vector<int>& getIGroup() const
53 {
54 return this->iGroup_.data();
55 }
56
57 const std::vector<float>& getSGroup() const
58 {
59 return this->sGroup_.data();
60 }
61
62 const std::vector<double>& getXGroup() const
63 {
64 return this->xGroup_.data();
65 }
66
67 const std::vector<EclIO::PaddedOutputString<8>>& getZGroup() const
68 {
69 return this->zGroup_.data();
70 }
71
72 const std::vector<std::string> restart_group_keys = {"GOPP", "GWPP", "GOPR", "GWPR", "GGPR",
73 "GVPR", "GWIR", "GGIR", "GWCT", "GGOR",
74 "GOPT", "GWPT", "GGPT", "GVPT", "GWIT",
75 "GGIT", "GVIT",
76 "GOPTH", "GWPTH", "GGPTH",
77 "GWITH", "GGITH"};
78
79 const std::vector<std::string> restart_field_keys = {"FOPP", "FWPP", "FOPR", "FWPR", "FGPR",
80 "FVPR", "FWIR", "FGIR", "FWCT", "FGOR",
81 "FOPT", "FWPT", "FGPT", "FVPT", "FWIT",
82 "FGIT", "FVIT",
83 "FOPTH", "FWPTH", "FGPTH",
84 "FWITH", "FGITH"};
85
86 const std::map<std::string, size_t> groupKeyToIndex = {
87 {"GOPR", 0},
88 {"GWPR", 1},
89 {"GGPR", 2},
90 {"GVPR", 3},
91 {"GWIR", 5},
92 {"GGIR", 6},
93 {"GWCT", 8},
94 {"GGOR", 9},
95 {"GOPT", 10},
96 {"GWPT", 11},
97 {"GGPT", 12},
98 {"GVPT", 13},
99 {"GWIT", 15},
100 {"GGIT", 16},
101 {"GVIT", 17},
102 {"GOPP", 22},
103 {"GWPP", 23},
104 {"GOPTH", 135},
105 {"GWPTH", 139},
106 {"GWITH", 140},
107 {"GGPTH", 143},
108 {"GGITH", 144},
109 };
110
111
113 const std::map<inj_cmode_enum, int> cmodeToNum = {
114
122 };
123
124 const std::map<std::string, size_t> fieldKeyToIndex = {
125 {"FOPR", 0},
126 {"FWPR", 1},
127 {"FGPR", 2},
128 {"FVPR", 3},
129 {"FWIR", 5},
130 {"FGIR", 6},
131 {"FWCT", 8},
132 {"FGOR", 9},
133 {"FOPT", 10},
134 {"FWPT", 11},
135 {"FGPT", 12},
136 {"FVPT", 13},
137 {"FWIT", 15},
138 {"FGIT", 16},
139 {"FVIT", 17},
140 {"FOPP", 22},
141 {"FWPP", 23},
142 {"FOPTH", 135},
143 {"FWPTH", 139},
144 {"FWITH", 140},
145 {"FGPTH", 143},
146 {"FGITH", 144},
147 };
148
149private:
151 WindowedArray<int> iGroup_;
152
154 WindowedArray<float> sGroup_;
155
157 WindowedArray<double> xGroup_;
158
161
163 int nWGMax_;
164
166 int nGMaxz_;
167};
168
169}}} // Opm::RestartIO::Helpers
170
171#endif // OPM_AGGREGATE_WELL_DATA_HPP
InjectionCMode
Definition: parser/eclipse/EclipseState/Schedule/Group/group.hpp:62
Definition: AggregateGroupData.hpp:42
const std::vector< std::string > restart_group_keys
Definition: AggregateGroupData.hpp:72
const std::map< std::string, size_t > fieldKeyToIndex
Definition: AggregateGroupData.hpp:124
const std::map< std::string, size_t > groupKeyToIndex
Definition: AggregateGroupData.hpp:86
const std::map< inj_cmode_enum, int > cmodeToNum
Definition: AggregateGroupData.hpp:113
const std::vector< float > & getSGroup() const
Definition: AggregateGroupData.hpp:57
const std::vector< int > & getIGroup() const
Definition: AggregateGroupData.hpp:52
AggregateGroupData(const std::vector< int > &inteHead)
const std::vector< std::string > restart_field_keys
Definition: AggregateGroupData.hpp:79
const std::vector< double > & getXGroup() const
Definition: AggregateGroupData.hpp:62
const std::vector< EclIO::PaddedOutputString< 8 > > & getZGroup() const
Definition: AggregateGroupData.hpp:67
void captureDeclaredGroupData(const Opm::Schedule &sched, const Opm::UnitSystem &units, const std::size_t simStep, const Opm::SummaryState &sumState, const std::vector< int > &inteHead)
const std::vector< T > & data() const
Definition: WindowedArray.hpp:126
Definition: Schedule.hpp:113
Definition: SummaryState.hpp:65
Definition: UnitSystem.hpp:32
Definition: A.hpp:4