My Project
Loading...
Searching...
No Matches
EclEpsGridProperties.hpp
Go to the documentation of this file.
1/*
2 This file is part of the Open Porous Media project (OPM).
3
4 OPM is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 OPM is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with OPM. If not, see <http://www.gnu.org/licenses/>.
16
17 Consult the COPYING file in the top-level source directory of this
18 module for the precise wording of the license and the list of
19 copyright holders.
20*/
25#ifndef OPM_ECL_EPS_GRID_PROPERTIES_HPP
26#define OPM_ECL_EPS_GRID_PROPERTIES_HPP
27
29
30#include <cstddef>
31#include <vector>
32
33namespace Opm {
34
35#if HAVE_ECL_INPUT
36class EclipseState;
37#endif
38
47{
48
49public:
50#if HAVE_ECL_INPUT
51 EclEpsGridProperties(const EclipseState& eclState,
52 bool useImbibition);
53#endif
54
55 unsigned satRegion(std::size_t active_index) const {
56 return this->compressed_satnum[active_index] - 1;
57 }
58
59 double permx(std::size_t active_index) const {
60 return this->compressed_permx[active_index];
61 }
62
63 double permy(std::size_t active_index) const {
64 return this->compressed_permy[active_index];
65 }
66
67 double permz(std::size_t active_index) const {
68 return this->compressed_permz[active_index];
69 }
70
71 double poro(std::size_t active_index) const {
72 return this->compressed_poro[active_index];
73 }
74
75 const double * swl(std::size_t active_index) const {
76 return this->satfunc(this->compressed_swl, active_index);
77 }
78
79 const double * sgl(std::size_t active_index) const {
80 return this->satfunc(this->compressed_sgl, active_index);
81 }
82
83 const double * swcr(std::size_t active_index) const {
84 return this->satfunc(this->compressed_swcr, active_index);
85 }
86
87 const double * sgcr(std::size_t active_index) const {
88 return this->satfunc(this->compressed_sgcr, active_index);
89 }
90
91 const double * sowcr(std::size_t active_index) const {
92 return this->satfunc(this->compressed_sowcr, active_index);
93 }
94
95 const double * sogcr(std::size_t active_index) const {
96 return this->satfunc(this->compressed_sogcr, active_index);
97 }
98
99 const double * swu(std::size_t active_index) const {
100 return this->satfunc(this->compressed_swu, active_index);
101 }
102
103 const double * sgu(std::size_t active_index) const {
104 return this->satfunc(this->compressed_sgu, active_index);
105 }
106
107 const double * pcw(std::size_t active_index) const {
108 return this->satfunc(this->compressed_pcw, active_index);
109 }
110
111 const double * pcg(std::size_t active_index) const {
112 return this->satfunc(this->compressed_pcg, active_index);
113 }
114
115 const double * krw(std::size_t active_index) const {
116 return this->satfunc(this->compressed_krw, active_index);
117 }
118
119 const double * krwr(std::size_t active_index) const {
120 return this->satfunc(this->compressed_krwr, active_index);
121 }
122
123 const double * krg(std::size_t active_index) const {
124 return this->satfunc(this->compressed_krg, active_index);
125 }
126
127 const double * krgr(std::size_t active_index) const {
128 return this->satfunc(this->compressed_krgr, active_index);
129 }
130
131 const double * kro(std::size_t active_index) const {
132 return this->satfunc(this->compressed_kro, active_index);
133 }
134
135 const double * krorg(std::size_t active_index) const {
136 return this->satfunc(this->compressed_krorg, active_index);
137 }
138
139 const double * krorw(std::size_t active_index) const {
140 return this->satfunc(this->compressed_krorw, active_index);
141 }
142
143private:
144 const double *
145 satfunc(const std::vector<double>& data,
146 const std::size_t active_index) const
147 {
148 return data.empty() ? nullptr : &data[active_index];
149 }
150
151
152 std::vector<int> compressed_satnum;
153 std::vector<double> compressed_swl;
154 std::vector<double> compressed_sgl;
155 std::vector<double> compressed_swcr;
156 std::vector<double> compressed_sgcr;
157 std::vector<double> compressed_sowcr;
158 std::vector<double> compressed_sogcr;
159 std::vector<double> compressed_swu;
160 std::vector<double> compressed_sgu;
161 std::vector<double> compressed_pcw;
162 std::vector<double> compressed_pcg;
163 std::vector<double> compressed_krw;
164 std::vector<double> compressed_krwr;
165 std::vector<double> compressed_kro;
166 std::vector<double> compressed_krorg;
167 std::vector<double> compressed_krorw;
168 std::vector<double> compressed_krg;
169 std::vector<double> compressed_krgr;
170
171 std::vector<double> compressed_permx;
172 std::vector<double> compressed_permy;
173 std::vector<double> compressed_permz;
174 std::vector<double> compressed_poro;
175};
176}
177#endif
178
Specifies the configuration used by the endpoint scaling code.
Collects all grid properties which are relevant for end point scaling.
Definition EclEpsGridProperties.hpp:47
Definition EclipseState.hpp:63
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30