25#ifndef OPM_ECL_EPS_GRID_PROPERTIES_HPP
26#define OPM_ECL_EPS_GRID_PROPERTIES_HPP
31#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
32#include <opm/input/eclipse/EclipseState/Grid/FieldPropsManager.hpp>
33#include <opm/input/eclipse/EclipseState/Tables/SgfnTable.hpp>
34#include <opm/input/eclipse/EclipseState/Tables/SgofTable.hpp>
35#include <opm/input/eclipse/EclipseState/Tables/SlgofTable.hpp>
36#include <opm/input/eclipse/EclipseState/Tables/Sof2Table.hpp>
37#include <opm/input/eclipse/EclipseState/Tables/Sof3Table.hpp>
38#include <opm/input/eclipse/EclipseState/Tables/SwfnTable.hpp>
39#include <opm/input/eclipse/EclipseState/Tables/SwofTable.hpp>
40#include <opm/input/eclipse/EclipseState/Tables/TableManager.hpp>
58std::vector<double> try_get(
const FieldPropsManager& fp,
const std::string& keyword) {
59 if (fp.has_double(keyword))
60 return fp.get_double(keyword);
77 const std::string kwPrefix = useImbibition ?
"I" :
"";
79 const auto& fp = eclState.fieldProps();
81 compressed_satnum = useImbibition
82 ? fp.get_int(
"IMBNUM") : fp.get_int(
"SATNUM");
84 this->compressed_swl = try_get( fp, kwPrefix+
"SWL");
85 this->compressed_sgl = try_get( fp, kwPrefix+
"SGL");
86 this->compressed_swcr = try_get( fp, kwPrefix+
"SWCR");
87 this->compressed_sgcr = try_get( fp, kwPrefix+
"SGCR");
88 this->compressed_sowcr = try_get( fp, kwPrefix+
"SOWCR");
89 this->compressed_sogcr = try_get( fp, kwPrefix+
"SOGCR");
90 this->compressed_swu = try_get( fp, kwPrefix+
"SWU");
91 this->compressed_sgu = try_get( fp, kwPrefix+
"SGU");
92 this->compressed_pcw = try_get( fp, kwPrefix+
"PCW");
93 this->compressed_pcg = try_get( fp, kwPrefix+
"PCG");
94 this->compressed_krw = try_get( fp, kwPrefix+
"KRW");
95 this->compressed_krwr = try_get( fp, kwPrefix+
"KRWR");
96 this->compressed_kro = try_get( fp, kwPrefix+
"KRO");
97 this->compressed_krorg = try_get( fp, kwPrefix+
"KRORG");
98 this->compressed_krorw = try_get( fp, kwPrefix+
"KRORW");
99 this->compressed_krg = try_get( fp, kwPrefix+
"KRG");
100 this->compressed_krgr = try_get( fp, kwPrefix+
"KRGR");
103 if (fp.has_double(
"PORO"))
104 this->compressed_poro = fp.get_double(
"PORO");
106 this->compressed_permx = fp.has_double(
"PERMX")
107 ? fp.get_double(
"PERMX")
108 : std::vector<double>(this->compressed_satnum.size());
110 this->compressed_permy = fp.has_double(
"PERMY")
111 ? fp.get_double(
"PERMY") : this->compressed_permx;
113 this->compressed_permz = fp.has_double(
"PERMZ")
114 ? fp.get_double(
"PERMZ") : this->compressed_permx;
122 return this->compressed_satnum[active_index] - 1;
125 double permx(std::size_t active_index)
const {
126 return this->compressed_permx[active_index];
129 double permy(std::size_t active_index)
const {
130 return this->compressed_permy[active_index];
133 double permz(std::size_t active_index)
const {
134 return this->compressed_permz[active_index];
137 double poro(std::size_t active_index)
const {
138 return this->compressed_poro[active_index];
141 const double *
swl(std::size_t active_index)
const {
142 return this->satfunc(this->compressed_swl, active_index);
145 const double *
sgl(std::size_t active_index)
const {
146 return this->satfunc(this->compressed_sgl, active_index);
149 const double *
swcr(std::size_t active_index)
const {
150 return this->satfunc(this->compressed_swcr, active_index);
153 const double *
sgcr(std::size_t active_index)
const {
154 return this->satfunc(this->compressed_sgcr, active_index);
157 const double *
sowcr(std::size_t active_index)
const {
158 return this->satfunc(this->compressed_sowcr, active_index);
161 const double *
sogcr(std::size_t active_index)
const {
162 return this->satfunc(this->compressed_sogcr, active_index);
165 const double *
swu(std::size_t active_index)
const {
166 return this->satfunc(this->compressed_swu, active_index);
169 const double *
sgu(std::size_t active_index)
const {
170 return this->satfunc(this->compressed_sgu, active_index);
173 const double *
pcw(std::size_t active_index)
const {
174 return this->satfunc(this->compressed_pcw, active_index);
177 const double *
pcg(std::size_t active_index)
const {
178 return this->satfunc(this->compressed_pcg, active_index);
181 const double *
krw(std::size_t active_index)
const {
182 return this->satfunc(this->compressed_krw, active_index);
185 const double *
krwr(std::size_t active_index)
const {
186 return this->satfunc(this->compressed_krwr, active_index);
189 const double *
krg(std::size_t active_index)
const {
190 return this->satfunc(this->compressed_krg, active_index);
193 const double *
krgr(std::size_t active_index)
const {
194 return this->satfunc(this->compressed_krgr, active_index);
197 const double *
kro(std::size_t active_index)
const {
198 return this->satfunc(this->compressed_kro, active_index);
201 const double *
krorg(std::size_t active_index)
const {
202 return this->satfunc(this->compressed_krorg, active_index);
205 const double *
krorw(std::size_t active_index)
const {
206 return this->satfunc(this->compressed_krorw, active_index);
211 satfunc(
const std::vector<double>& data,
212 const std::size_t active_index)
const
214 return data.empty() ? nullptr : &data[active_index];
218 std::vector<int> compressed_satnum;
219 std::vector<double> compressed_swl;
220 std::vector<double> compressed_sgl;
221 std::vector<double> compressed_swcr;
222 std::vector<double> compressed_sgcr;
223 std::vector<double> compressed_sowcr;
224 std::vector<double> compressed_sogcr;
225 std::vector<double> compressed_swu;
226 std::vector<double> compressed_sgu;
227 std::vector<double> compressed_pcw;
228 std::vector<double> compressed_pcg;
229 std::vector<double> compressed_krw;
230 std::vector<double> compressed_krwr;
231 std::vector<double> compressed_kro;
232 std::vector<double> compressed_krorg;
233 std::vector<double> compressed_krorw;
234 std::vector<double> compressed_krg;
235 std::vector<double> compressed_krgr;
237 std::vector<double> compressed_permx;
238 std::vector<double> compressed_permy;
239 std::vector<double> compressed_permz;
240 std::vector<double> compressed_poro;
Collects all grid properties which are relevant for end point scaling.
Definition: EclEpsGridProperties.hpp:69
const double * krorw(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:205
const double * krwr(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:185
const double * swu(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:165
const double * swl(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:141
const double * sgu(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:169
const double * pcw(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:173
const double * sowcr(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:157
const double * sogcr(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:161
const double * krgr(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:193
double poro(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:137
const double * krorg(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:201
unsigned satRegion(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:121
double permz(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:133
const double * krg(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:189
double permy(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:129
const double * pcg(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:177
double permx(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:125
const double * kro(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:197
const double * swcr(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:149
const double * krw(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:181
const double * sgcr(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:153
const double * sgl(std::size_t active_index) const
Definition: EclEpsGridProperties.hpp:145
Definition: Air_Mesitylene.hpp:34