opm-common
Toggle main menu visibility
Loading...
Searching...
No Matches
AggregateGroupData.hpp
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
23
#include <
opm/output/eclipse/WindowedArray.hpp
>
24
25
#include <opm/io/eclipse/PaddedOutputString.hpp>
26
27
#include <cstddef>
28
#include <string>
29
#include <vector>
30
#include <map>
31
32
namespace
Opm
{
33
class
Schedule
;
34
class
SummaryState
;
35
class
UnitSystem
;
36
}
// Opm
37
38
namespace
Opm
{
namespace
RestartIO {
namespace
Helpers {
39
40
class
AggregateGroupData
41
{
42
public
:
43
explicit
AggregateGroupData(
const
std::vector<int>& inteHead);
44
45
void
captureDeclaredGroupData(
const
Opm::Schedule
& sched,
46
const
Opm::UnitSystem
& units,
47
const
std::size_t simStep,
48
const
Opm::SummaryState
& sumState,
49
const
std::vector<int>& inteHead);
50
51
52
void
captureDeclaredGroupDataLGR(
const
Opm::Schedule
& sched,
53
const
Opm::UnitSystem
& units,
54
const
std::size_t simStep,
55
const
Opm::SummaryState
& sumState,
56
const
std::string& lgr_tag);
57
58
const
std::vector<int>& getIGroup()
const
59
{
60
return
this->iGroup_.data();
61
}
62
63
const
std::vector<float>& getSGroup()
const
64
{
65
return
this->sGroup_.data();
66
}
67
68
const
std::vector<double>& getXGroup()
const
69
{
70
return
this->xGroup_.data();
71
}
72
73
const
std::vector<EclIO::PaddedOutputString<8>>& getZGroup()
const
74
{
75
return
this->zGroup_.data();
76
}
77
78
const
std::vector<std::string> restart_group_keys = {
"GOPP"
,
"GWPP"
,
"GOPR"
,
"GWPR"
,
"GGPR"
,
79
"GVPR"
,
"GWIR"
,
"GGIR"
,
"GWCT"
,
"GGOR"
,
80
"GOPT"
,
"GWPT"
,
"GGPT"
,
"GVPT"
,
81
"GOPTS"
,
"GGPTS"
,
82
"GWIT"
,
"GGIT"
,
"GVIT"
,
83
"GOPTH"
,
"GWPTH"
,
"GGPTH"
,
84
"GWITH"
,
"GGITH"
,
85
"GOPGR"
,
"GWPGR"
,
"GGPGR"
,
"GVPGR"
,
86
"GOIGR"
,
"GWIGR"
,
"GGIGR"
,
87
"GGCR"
,
"GGIMR"
,
"GGCT"
,
"GGIMT"
,
88
};
89
90
// Note: guide rates don't exist at the FIELD level.
91
const
std::vector<std::string> restart_field_keys = {
"FOPP"
,
"FWPP"
,
"FOPR"
,
"FWPR"
,
"FGPR"
,
92
"FVPR"
,
"FWIR"
,
"FGIR"
,
"FWCT"
,
"FGOR"
,
93
"FOPT"
,
"FWPT"
,
"FGPT"
,
"FVPT"
,
94
"FOPTS"
,
"FGPTS"
,
95
"FWIT"
,
"FGIT"
,
"FVIT"
,
96
"FOPTH"
,
"FWPTH"
,
"FGPTH"
,
97
"FGCR"
,
"FGCT"
,
"FGIMR"
,
"FGIMT"
,
98
"FWITH"
,
"FGITH"
};
99
100
const
std::map<std::string, size_t> groupKeyToIndex = {
101
{
"GOPR"
, 0},
102
{
"GWPR"
, 1},
103
{
"GGPR"
, 2},
104
{
"GVPR"
, 3},
105
{
"GWIR"
, 5},
106
{
"GGIR"
, 6},
107
{
"GWCT"
, 8},
108
{
"GGOR"
, 9},
109
{
"GOPT"
, 10},
110
{
"GWPT"
, 11},
111
{
"GGPT"
, 12},
112
{
"GVPT"
, 13},
113
{
"GWIT"
, 15},
114
{
"GGIT"
, 16},
115
{
"GVIT"
, 17},
116
{
"GGCR"
, 19},
117
{
"GGCT"
, 21},
118
{
"GOPP"
, 22},
119
{
"GWPP"
, 23},
120
{
"GGIMR"
, 51},
121
{
"GGIMT"
, 52},
122
{
"GOPTS"
, 73},
123
{
"GGPTS"
, 74},
124
{
"GOPGR"
, 85},
125
{
"GWPGR"
, 86},
126
{
"GGPGR"
, 87},
127
{
"GVPGR"
, 88},
128
{
"GOIGR"
, 89},
129
{
"GWIGR"
, 91},
130
{
"GGIGR"
, 93},
131
{
"GOPTH"
, 135},
132
{
"GWPTH"
, 139},
133
{
"GWITH"
, 140},
134
{
"GGPTH"
, 143},
135
{
"GGITH"
, 144},
136
};
137
138
const
std::map<std::string, size_t> fieldKeyToIndex = {
139
{
"FOPR"
, 0},
140
{
"FWPR"
, 1},
141
{
"FGPR"
, 2},
142
{
"FVPR"
, 3},
143
{
"FWIR"
, 5},
144
{
"FGIR"
, 6},
145
{
"FWCT"
, 8},
146
{
"FGOR"
, 9},
147
{
"FOPT"
, 10},
148
{
"FWPT"
, 11},
149
{
"FGPT"
, 12},
150
{
"FVPT"
, 13},
151
{
"FWIT"
, 15},
152
{
"FGIT"
, 16},
153
{
"FVIT"
, 17},
154
{
"FGCR"
, 19},
155
{
"FGCT"
, 21},
156
{
"FOPP"
, 22},
157
{
"FWPP"
, 23},
158
{
"FGIMR"
, 51},
159
{
"FGIMT"
, 52},
160
{
"FOPTS"
, 73},
161
{
"FGPTS"
, 74},
162
{
"FOPTH"
, 135},
163
{
"FWPTH"
, 139},
164
{
"FWITH"
, 140},
165
{
"FGPTH"
, 143},
166
{
"FGITH"
, 144},
167
};
168
169
private
:
171
WindowedArray<int>
iGroup_;
172
174
WindowedArray<float>
sGroup_;
175
177
WindowedArray<double>
xGroup_;
178
180
WindowedArray<EclIO::PaddedOutputString<8>
> zGroup_;
181
183
int
nWGMax_;
184
186
int
nGMaxz_;
187
};
188
189
}}}
// Opm::RestartIO::Helpers
190
191
#endif
// OPM_AGGREGATE_WELL_DATA_HPP
WindowedArray.hpp
Provide facilities to simplify constructing restart vectors such as IWEL or RSEG.
Opm::RestartIO::Helpers::WindowedArray
Provide read-only and read/write access to constantly sized portions/windows of a linearised buffer w...
Definition
WindowedArray.hpp:50
Opm::Schedule
Definition
Schedule.hpp:101
Opm::SummaryState
Definition
SummaryState.hpp:72
Opm::UnitSystem
Definition
UnitSystem.hpp:34
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition
Exceptions.hpp:30
opm
output
eclipse
AggregateGroupData.hpp
Generated by
1.17.0