My Project
Loading...
Searching...
No Matches
FieldProps.hpp
1/*
2 Copyright 2019 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 terms
7 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 FOR
13 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along with
16 OPM. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef FIELDPROPS_HPP
20#define FIELDPROPS_HPP
21
22#include <opm/input/eclipse/EclipseState/Grid/Box.hpp>
23#include <opm/input/eclipse/EclipseState/Grid/FieldData.hpp>
24#include <opm/input/eclipse/EclipseState/Grid/Keywords.hpp>
25#include <opm/input/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.hpp>
26#include <opm/input/eclipse/EclipseState/Grid/TranCalculator.hpp>
27#include <opm/input/eclipse/EclipseState/Runspec.hpp>
28#include <opm/input/eclipse/EclipseState/Util/OrderedMap.hpp>
29#include <opm/input/eclipse/EclipseState/Tables/TableManager.hpp>
30
31#include <opm/input/eclipse/Units/UnitSystem.hpp>
32
33#include <opm/input/eclipse/Deck/DeckSection.hpp>
34#include <opm/input/eclipse/Deck/value_status.hpp>
35
36#include <cstddef>
37#include <limits>
38#include <map>
39#include <memory>
40#include <optional>
41#include <set>
42#include <stdexcept>
43#include <string>
44#include <string_view>
45#include <unordered_map>
46#include <unordered_set>
47#include <utility>
48#include <vector>
49
50namespace Opm {
51
52class Deck;
53class EclipseGrid;
54class NumericalAquifers;
55
56namespace Fieldprops
57{
58
59namespace keywords {
60
61/*
62 Regarding global keywords
63 =========================
64
65 It turns out that when the option 'ALL' is used for the PINCH keyword we
66 require the MULTZ keyword specified for all cells, also the inactive cells.
67 The premise for the FieldProps implementation has all the way been that only
68 the active cells should be stored.
69
70 In order to support the ALL option of the PINCH keyword we have bolted on a
71 limited support for global storage. By setting .global = true in the
72 keyword_info describing the keyword you get:
73
74 1. Normal deck assignment like
75
76 MULTZ
77 ..... /
78
79 2. Scalar operations like EQUALS and MULTIPLY.
80
81 These operations also support the full details of the BOX behavior.
82
83 The following operations do not work
84 ------------------------------------
85
86 1. Operations involving multiple keywords like
87
88 COPY
89 MULTX MULTZ /
90 /
91
92 this also includes the OPERATE which involves multiple keywords for some
93 of its operations.
94
95 2. All region operatins like EQUALREG and MULTREG.
96
97 The operations which are not properly implemented will be intercepted and a
98 std::logic_error() exception will be thrown.
99*/
100
101
102
103inline bool isFipxxx(const std::string& keyword) {
104 // FIPxxxx can be any keyword, e.g. FIPREG or FIPXYZ that has the pattern "FIP.+"
105 // However, it can not be FIPOWG as that is an actual keyword.
106 if (keyword.size() < 4 || keyword == "FIPOWG") {
107 return false;
108 }
109 return keyword[0] == 'F' && keyword[1] == 'I' && keyword[2] == 'P';
110}
111
112
113/*
114 The aliased_keywords map defines aliases for other keywords. The FieldProps
115 objects will translate those keywords before further processing. The aliases
116 will also be exposed by the FieldPropsManager object.
117
118 However, the following methods of FieldProps do not fully support aliases:
119 - FieldProps::keys() does not return the aliases.
120 - FieldProps::erase() and FieldProps::extract() do not support aliases. Using
121 them with an aliased keyword will also remove the alias.
122
123 Note that the aliases are also added to GRID::double_keywords.
124
125 The PERMR and PERMTHT keywords are aliases for PERMX and PERMY, respectively.
126*/
127namespace ALIAS {
128 static const std::unordered_map<std::string, std::string> aliased_keywords = {{"PERMR", "PERMX"},
129 {"PERMTHT", "PERMY"}};
130}
131
132
133namespace GRID {
134static const std::unordered_map<std::string, keyword_info<double>> double_keywords = {{"DISPERC",keyword_info<double>{}.unit_string("Length")},
135 {"MINPVV", keyword_info<double>{}.unit_string("ReservoirVolume").global_kw(true)},
136 {"MULTPV", keyword_info<double>{}.init(1.0)},
137 {"NTG", keyword_info<double>{}.init(1.0)},
138 {"PORO", keyword_info<double>{}.distribute_top(true)},
139 {"PERMX", keyword_info<double>{}.unit_string("Permeability").distribute_top(true)},
140 {"PERMY", keyword_info<double>{}.unit_string("Permeability").distribute_top(true)},
141 {"PERMZ", keyword_info<double>{}.unit_string("Permeability").distribute_top(true)},
142 {"PERMR", keyword_info<double>{}.unit_string("Permeability").distribute_top(true)},
143 {"PERMTHT", keyword_info<double>{}.unit_string("Permeability").distribute_top(true)},
144 {"TEMPI", keyword_info<double>{}.unit_string("Temperature")},
145 {"THCONR", keyword_info<double>{}.unit_string("Energy/AbsoluteTemperature*Length*Time")},
146 {"THCONSF", keyword_info<double>{}},
147 {"HEATCR", keyword_info<double>{}.unit_string("Energy/ReservoirVolume*AbsoluteTemperature")},
148 {"HEATCRT", keyword_info<double>{}.unit_string("Energy/ReservoirVolume*AbsoluteTemperature*AbsoluteTemperature")},
149 {"THCROCK", keyword_info<double>{}.unit_string("Energy/AbsoluteTemperature*Length*Time")},
150 {"THCOIL", keyword_info<double>{}.unit_string("Energy/AbsoluteTemperature*Length*Time")},
151 {"THCGAS", keyword_info<double>{}.unit_string("Energy/AbsoluteTemperature*Length*Time")},
152 {"THCWATER",keyword_info<double>{}.unit_string("Energy/AbsoluteTemperature*Length*Time")},
153 {"YMODULE", keyword_info<double>{}.unit_string("Giga*Pascal")},
154 {"PRATIO", keyword_info<double>{}.unit_string("1")},
155 {"BIOTCOEF", keyword_info<double>{}.unit_string("1")},
156 {"POELCOEF", keyword_info<double>{}.unit_string("1")},
157 {"THERMEXR", keyword_info<double>{}.unit_string("1/AbsoluteTemperature")},
158 {"THELCOEF", keyword_info<double>{}.unit_string("Pressure/AbsoluteTemperature")},
159 {"MULTX", keyword_info<double>{}.init(1.0).mult(true)},
160 {"MULTX-", keyword_info<double>{}.init(1.0).mult(true)},
161 {"MULTY", keyword_info<double>{}.init(1.0).mult(true)},
162 {"MULTY-", keyword_info<double>{}.init(1.0).mult(true)},
163 {"MULTZ", keyword_info<double>{}.init(1.0).mult(true).global_kw(true)},
164 {"MULTZ-", keyword_info<double>{}.init(1.0).mult(true).global_kw(true)}};
165
166static const std::unordered_map<std::string, keyword_info<int>> int_keywords = {{"ACTNUM", keyword_info<int>{}.init(1)},
167 {"FLUXNUM", keyword_info<int>{}},
168 {"ISOLNUM", keyword_info<int>{}.init(1)},
169 {"MULTNUM", keyword_info<int>{}.init(1)},
170 {"OPERNUM", keyword_info<int>{}},
171 {"ROCKNUM", keyword_info<int>{}}};
172
173}
174
175namespace EDIT {
176
177/*
178 The TRANX, TRANY and TRANZ properties are handled very differently from the
179 other properties. It is important that these fields are not entered into the
180 double_keywords list of the EDIT section, that way we risk silent failures
181 due to the special treatment of the TRAN fields.
182*/
183
184static const std::unordered_map<std::string, keyword_info<double>> double_keywords = {{"MULTPV", keyword_info<double>{}.init(1.0)},
185 {"PORV", keyword_info<double>{}.unit_string("ReservoirVolume")},
186 {"MULTX", keyword_info<double>{}.init(1.0).mult(true)},
187 {"MULTX-", keyword_info<double>{}.init(1.0).mult(true)},
188 {"MULTY", keyword_info<double>{}.init(1.0).mult(true)},
189 {"MULTY-", keyword_info<double>{}.init(1.0).mult(true)},
190 {"MULTZ", keyword_info<double>{}.init(1.0).mult(true).global_kw(true)},
191 {"MULTZ-", keyword_info<double>{}.init(1.0).mult(true).global_kw(true)}};
192
193static const std::unordered_map<std::string, keyword_info<int>> int_keywords = {};
194}
195
196namespace PROPS {
197static const std::unordered_map<std::string, keyword_info<double>> double_keywords = {{"SWATINIT", keyword_info<double>{}},
198 {"PCG", keyword_info<double>{}.unit_string("Pressure")},
199 {"IPCG", keyword_info<double>{}.unit_string("Pressure")},
200 {"PCW", keyword_info<double>{}.unit_string("Pressure")},
201 {"IPCW", keyword_info<double>{}.unit_string("Pressure")}};
202static const std::unordered_map<std::string, keyword_info<int>> int_keywords = {};
203
204#define dirfunc(base) base, base "X", base "X-", base "Y", base "Y-", base "Z", base "Z-"
205
206static const std::set<std::string> satfunc = {"SWLPC", "ISWLPC", "SGLPC", "ISGLPC",
207 dirfunc("SGL"),
208 dirfunc("ISGL"),
209 dirfunc("SGU"),
210 dirfunc("ISGU"),
211 dirfunc("SWL"),
212 dirfunc("ISWL"),
213 dirfunc("SWU"),
214 dirfunc("ISWU"),
215 dirfunc("SGCR"),
216 dirfunc("ISGCR"),
217 dirfunc("SOWCR"),
218 dirfunc("ISOWCR"),
219 dirfunc("SOGCR"),
220 dirfunc("ISOGCR"),
221 dirfunc("SWCR"),
222 dirfunc("ISWCR"),
223 dirfunc("KRW"),
224 dirfunc("IKRW"),
225 dirfunc("KRWR"),
226 dirfunc("IKRWR"),
227 dirfunc("KRO"),
228 dirfunc("IKRO"),
229 dirfunc("KRORW"),
230 dirfunc("IKRORW"),
231 dirfunc("KRORG"),
232 dirfunc("IKRORG"),
233 dirfunc("KRG"),
234 dirfunc("IKRG"),
235 dirfunc("KRGR"),
236 dirfunc("IKRGR")};
237
238#undef dirfunc
239}
240
241namespace REGIONS {
242
243static const std::unordered_map<std::string, keyword_info<int>> int_keywords = {{"ENDNUM", keyword_info<int>{}.init(1)},
244 {"EOSNUM", keyword_info<int>{}.init(1)},
245 {"EQLNUM", keyword_info<int>{}.init(1)},
246 {"FIPNUM", keyword_info<int>{}.init(1)},
247 {"IMBNUM", keyword_info<int>{}.init(1)},
248 {"OPERNUM", keyword_info<int>{}},
249 {"STRESSEQUILNUM", keyword_info<int>{}.init(1)},
250 {"MISCNUM", keyword_info<int>{}},
251 {"MISCNUM", keyword_info<int>{}},
252 {"PVTNUM", keyword_info<int>{}.init(1)},
253 {"SATNUM", keyword_info<int>{}.init(1)},
254 {"LWSLTNUM", keyword_info<int>{}},
255 {"ROCKNUM", keyword_info<int>{}},
256 {"KRNUMX", keyword_info<int>{}},
257 {"KRNUMY", keyword_info<int>{}},
258 {"KRNUMZ", keyword_info<int>{}},
259 {"IMBNUMX", keyword_info<int>{}},
260 {"IMBNUMY", keyword_info<int>{}},
261 {"IMBNUMZ", keyword_info<int>{}},
262 };
263}
264
265namespace SOLUTION {
266
267static const std::unordered_map<std::string, keyword_info<double>> double_keywords = {{"PRESSURE", keyword_info<double>{}.unit_string("Pressure")},
268 {"SPOLY", keyword_info<double>{}.unit_string("Density")},
269 {"SPOLYMW", keyword_info<double>{}},
270 {"SSOL", keyword_info<double>{}},
271 {"SWAT", keyword_info<double>{}},
272 {"SGAS", keyword_info<double>{}},
273 {"SMICR", keyword_info<double>{}.unit_string("Density")},
274 {"SOXYG", keyword_info<double>{}.unit_string("Density")},
275 {"SUREA", keyword_info<double>{}.unit_string("Density")},
276 {"SBIOF", keyword_info<double>{}},
277 {"SCALC", keyword_info<double>{}},
278 {"SALTP", keyword_info<double>{}},
279 {"SALT", keyword_info<double>{}.unit_string("Salinity")},
280 {"TEMPI", keyword_info<double>{}.unit_string("Temperature")},
281 {"RS", keyword_info<double>{}.unit_string("GasDissolutionFactor")},
282 {"RV", keyword_info<double>{}.unit_string("OilDissolutionFactor")},
283 {"RVW", keyword_info<double>{}.unit_string("OilDissolutionFactor")}
284 };
285
286}
287
288namespace SCHEDULE {
289
290static const std::unordered_map<std::string, keyword_info<double>> double_keywords = {{"MULTX", keyword_info<double>{}.init(1.0).mult(true)},
291 {"MULTX-", keyword_info<double>{}.init(1.0).mult(true)},
292 {"MULTY", keyword_info<double>{}.init(1.0).mult(true)},
293 {"MULTY-", keyword_info<double>{}.init(1.0).mult(true)},
294 {"MULTZ", keyword_info<double>{}.init(1.0).mult(true).global_kw(true)},
295 {"MULTZ-", keyword_info<double>{}.init(1.0).mult(true).global_kw(true)}};
296
297static const std::unordered_map<std::string, keyword_info<int>> int_keywords = {{"ROCKNUM", keyword_info<int>{}}};
298
299}
300
301template <typename T>
302keyword_info<T> global_kw_info(const std::string& name, bool allow_unsupported = false);
303
304bool is_oper_keyword(const std::string& name);
305} // end namespace keywords
306
307} // end namespace FieldProps
308
310public:
311
312 using ScalarOperation = Fieldprops::ScalarOperation;
313
315 int region_value;
316 double multiplier;
317 std::string region_name;
318
319
320 MultregpRecord(int rv, double m, const std::string& rn) :
321 region_value(rv),
322 multiplier(m),
323 region_name(rn)
324 {}
325
326
327 bool operator==(const MultregpRecord& other) const {
328 return this->region_value == other.region_value &&
329 this->multiplier == other.multiplier &&
330 this->region_name == other.region_name;
331 }
332 };
333
334 enum class GetStatus {
335 OK = 1,
336 INVALID_DATA = 2, // std::runtime_error
337 MISSING_KEYWORD = 3, // std::out_of_range
338 NOT_SUPPPORTED_KEYWORD = 4 // std::logic_error
339 };
340
341 template<typename T>
343 const std::string& keyword;
344 GetStatus status;
346 const Data * data_ptr;
347
348 FieldDataManager(const std::string& k, GetStatus s, const Data * d) :
349 keyword(k),
350 status(s),
351 data_ptr(d)
352 { }
353
354
355 void verify_status() const {
356 switch (status) {
357 case FieldProps::GetStatus::OK:
358 return;
359 case FieldProps::GetStatus::INVALID_DATA:
360 throw std::runtime_error("The keyword: " + keyword + " has not been fully initialized");
361 case FieldProps::GetStatus::MISSING_KEYWORD:
362 throw std::out_of_range("No such keyword in deck: " + keyword);
363 case FieldProps::GetStatus::NOT_SUPPPORTED_KEYWORD:
364 throw std::logic_error("The keyword " + keyword + " is not supported");
365 }
366 }
367
368 const std::vector<T>* ptr() const {
369 if (this->data_ptr)
370 return std::addressof(this->data_ptr->data);
371 else
372 return nullptr;
373 }
374
375 const std::vector<T>& data() const {
376 this->verify_status();
377 return this->data_ptr->data;
378 }
379
380 const Data& field_data() const {
381 this->verify_status();
382 return *this->data_ptr;
383 }
384
385 bool valid() const {
386 return (this->status == GetStatus::OK);
387 }
388
389 };
390
392 FieldProps(const Deck& deck, const Phases& phases, const EclipseGrid& grid, const TableManager& table_arg);
393
395 FieldProps(const Deck& deck, const EclipseGrid& grid);
396
397 void reset_actnum(const std::vector<int>& actnum);
398
399 void apply_numerical_aquifers(const NumericalAquifers& numerical_aquifers);
400
401 const std::string& default_region() const;
402
403 std::vector<int> actnum();
404 const std::vector<int>& actnumRaw() const;
405
406 template <typename T>
407 static bool supported(const std::string& keyword);
408
409 template <typename T>
410 bool has(const std::string& keyword) const;
411
412 template <typename T>
413 std::vector<std::string> keys() const;
414
415 template <typename T>
417 try_get(const std::string& keyword, const bool allow_unsupported = false)
418 {
419 if (!allow_unsupported && !FieldProps::template supported<T>(keyword)) {
420 return { keyword, GetStatus::NOT_SUPPPORTED_KEYWORD, nullptr };
421 }
422
423 const auto has0 = this->template has<T>(keyword);
424
425 const auto& field_data =
426 this->template init_get<T>(keyword, std::is_same<T,double>::value && allow_unsupported);
427
428 if (field_data.valid() || allow_unsupported) {
429 // Note: FieldDataManager depends on init_get<>() producing a
430 // long-lived FieldData instance.
431 return { keyword, GetStatus::OK, &field_data };
432 }
433
434 if (! has0) {
435 this->template erase<T>(keyword);
436
437 return { keyword, GetStatus::MISSING_KEYWORD, nullptr };
438 }
439
440 return { keyword, GetStatus::INVALID_DATA, nullptr };
441 }
442
443 template <typename T>
444 const std::vector<T>& get(const std::string& keyword)
445 {
446 return this->template try_get<T>(keyword).data();
447 }
448
449 template <typename T>
450 std::vector<T> get_global(const std::string& keyword)
451 {
452 const auto managed_field_data = this->template try_get<T>(keyword);
453 const auto& field_data = managed_field_data.field_data();
454
455 const auto& kw_info = Fieldprops::keywords::
456 template global_kw_info<T>(keyword);
457
458 return kw_info.global
459 ? *field_data.global_data
460 : this->global_copy(field_data.data, kw_info.scalar_init);
461 }
462
463 template <typename T>
464 std::vector<T> get_copy(const std::string& keyword, bool global)
465 {
466 const auto has0 = this->template has<T>(keyword);
467
468 // Recall: FieldDataManager::field_data() will throw various
469 // exception types if the 'status' is anything other than 'OK'.
470 //
471 // Get_copy() depends on this behaviour to not proceed to extracting
472 // values in such cases. In other words, get_copy() uses exceptions
473 // for control flow, and we cannot move this try_get() call into the
474 // 'has0' branch even though the actual 'field_data' object returned
475 // from try_get() is only needed/used there.
476 const auto& field_data = this->template try_get<T>(keyword).field_data();
477
478 if (has0) {
479 return this->get_copy(field_data.data, field_data.kw_info.scalar_init, global);
480 }
481
482 const auto initial_value = Fieldprops::keywords::
483 template global_kw_info<T>(keyword).scalar_init;
484
485 return this->get_copy(this->template extract<T>(keyword), initial_value, global);
486 }
487
488 template <typename T>
489 std::vector<bool> defaulted(const std::string& keyword)
490 {
491 const auto& field = this->template init_get<T>(keyword);
492 std::vector<bool> def(field.size());
493
494 for (std::size_t i = 0; i < def.size(); ++i) {
495 def[i] = value::defaulted(field.value_status[i]);
496 }
497
498 return def;
499 }
500
501 template <typename T>
502 std::vector<T> global_copy(const std::vector<T>& data,
503 const std::optional<T>& default_value) const
504 {
505 const T fill_value = default_value.has_value() ? *default_value : 0;
506
507 std::vector<T> global_data(this->global_size, fill_value);
508
509 std::size_t i = 0;
510 for (std::size_t g = 0; g < this->global_size; g++) {
511 if (this->m_actnum[g]) {
512 global_data[g] = data[i];
513 ++i;
514 }
515 }
516
517 return global_data;
518 }
519
520 std::size_t active_size;
521 std::size_t global_size;
522
523 std::size_t num_int() const
524 {
525 return this->int_data.size();
526 }
527
528 std::size_t num_double() const
529 {
530 return this->double_data.size();
531 }
532
533 void handle_schedule_keywords(const std::vector<DeckKeyword>& keywords);
534 bool tran_active(const std::string& keyword) const;
535 void apply_tran(const std::string& keyword, std::vector<double>& data);
536 bool operator==(const FieldProps& other) const;
537 static bool rst_cmp(const FieldProps& full_arg, const FieldProps& rst_arg);
538
539 const std::unordered_map<std::string,Fieldprops::TranCalculator>& getTran() const
540 {
541 return tran;
542 }
543
544 std::vector<std::string> fip_regions() const;
545
546 void deleteMINPVV();
547
548private:
549 void scanGRIDSection(const GRIDSection& grid_section);
550 void scanGRIDSectionOnlyACTNUM(const GRIDSection& grid_section);
551 void scanEDITSection(const EDITSection& edit_section);
552 void scanPROPSSection(const PROPSSection& props_section);
553 void scanREGIONSSection(const REGIONSSection& regions_section);
554 void scanSOLUTIONSection(const SOLUTIONSection& solution_section);
555 double getSIValue(const std::string& keyword, double raw_value) const;
556 double getSIValue(ScalarOperation op, const std::string& keyword, double raw_value) const;
557 template <typename T>
558 void erase(const std::string& keyword);
559
560 template <typename T>
561 std::vector<T> extract(const std::string& keyword);
562
563 template <typename T>
564 std::vector<T> get_copy(const std::vector<T>& x,
565 const std::optional<T>& initial_value,
566 const bool global) const
567 {
568 return (! global) ? x : this->global_copy(x, initial_value);
569 }
570
571 template <typename T>
572 std::vector<T> get_copy(std::vector<T>&& x,
573 const std::optional<T>& initial_value,
574 const bool global) const
575 {
576 return (! global) ? std::move(x) : this->global_copy(x, initial_value);
577 }
578
579 template <typename T>
580 void operate(const DeckRecord& record, Fieldprops::FieldData<T>& target_data, const Fieldprops::FieldData<T>& src_data, const std::vector<Box::cell_index>& index_list);
581
582 template <typename T>
583 static void apply(ScalarOperation op, std::vector<T>& data, std::vector<value::status>& value_status, T scalar_value, const std::vector<Box::cell_index>& index_list);
584
585 template <typename T>
586 Fieldprops::FieldData<T>& init_get(const std::string& keyword, bool allow_unsupported = false);
587
588 template <typename T>
589 Fieldprops::FieldData<T>& init_get(const std::string& keyword, const Fieldprops::keywords::keyword_info<T>& kw_info, bool multiplier_in_edit = false);
590
591 std::string region_name(const DeckItem& region_item);
592 std::vector<Box::cell_index> region_index( const std::string& region_name, int region_value );
593 void handle_OPERATE(const DeckKeyword& keyword, Box box);
594 void handle_operation(Section section, const DeckKeyword& keyword, Box box);
595 void handle_region_operation(const DeckKeyword& keyword);
596 void handle_COPY(const DeckKeyword& keyword, Box box, bool region);
597 void distribute_toplayer(Fieldprops::FieldData<double>& field_data, const std::vector<double>& deck_data, const Box& box);
598 double get_beta(const std::string& func_name, const std::string& target_array, double raw_beta);
599 double get_alpha(const std::string& func_name, const std::string& target_array, double raw_alpha);
600
601 void handle_keyword(Section section, const DeckKeyword& keyword, Box& box);
602 void handle_double_keyword(Section section, const Fieldprops::keywords::keyword_info<double>& kw_info, const DeckKeyword& keyword, const std::string& keyword_name, const Box& box);
603 void handle_double_keyword(Section section, const Fieldprops::keywords::keyword_info<double>& kw_info, const DeckKeyword& keyword, const Box& box);
604 void handle_int_keyword(const Fieldprops::keywords::keyword_info<int>& kw_info, const DeckKeyword& keyword, const Box& box);
605 void init_satfunc(const std::string& keyword, Fieldprops::FieldData<double>& satfunc);
606 void init_porv(Fieldprops::FieldData<double>& porv);
607 void init_tempi(Fieldprops::FieldData<double>& tempi);
608 std::string canonical_fipreg_name(const std::string& fipreg);
609 const std::string& canonical_fipreg_name(const std::string& fipreg) const;
610
616 void apply_multipliers();
617
618 static constexpr std::string_view getMultiplierPrefix()
619 {
620 using namespace std::literals;
621 return "__MULT__"sv;
622 }
623
624 const UnitSystem unit_system;
625 std::size_t nx,ny,nz;
626 Phases m_phases;
627 SatFuncControls m_satfuncctrl;
628 std::vector<int> m_actnum;
629 std::vector<double> cell_volume;
630 std::vector<double> cell_depth;
631 const std::string m_default_region;
632 const EclipseGrid * grid_ptr; // A bit undecided whether to properly use the grid or not ...
633 TableManager tables;
634 std::optional<satfunc::RawTableEndPoints> m_rtep;
635 std::vector<MultregpRecord> multregp;
636 std::unordered_map<std::string, Fieldprops::FieldData<int>> int_data;
637 std::unordered_map<std::string, Fieldprops::FieldData<double>> double_data;
638 std::unordered_map<std::string, std::string> fipreg_shortname_translation{};
639
640 std::unordered_map<std::string,Fieldprops::TranCalculator> tran;
641
647 std::unordered_map<std::string,Fieldprops::keywords::keyword_info<double>> multiplier_kw_infos_;
648};
649
650}
651#endif
Definition Deck.hpp:49
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition EclipseGrid.hpp:55
Definition FieldProps.hpp:309
Definition NumericalAquifers.hpp:38
Definition Runspec.hpp:46
Definition TableManager.hpp:66
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Definition FieldProps.hpp:342
Definition FieldProps.hpp:314
Definition FieldData.hpp:55