My Project
Loading...
Searching...
No Matches
FIPConfig.hpp
1/*
2 Copyright 2023 SINTEF Digital
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_FIP_CONFIG_HPP
21#define OPM_FIP_CONFIG_HPP
22
23#include <bitset>
24
25namespace Opm {
26
27class Deck;
28class DeckKeyword;
29class RPTConfig;
30
32class FIPConfig {
33public:
35 enum class OutputField {
36 FIELD = 0,
37 FIPNUM = 1,
38 FIP = 2,
39 FOAM_FIELD = 3,
40 FOAM_REGION = 4,
41 POLYMER_FIELD = 5,
42 POLYMER_REGION = 6,
43 RESV = 7,
44 SOLVENT_FIELD = 8,
45 SOLVENT_REGION = 9,
48 SURF_FIELD = 12,
49 SURF_REGION = 13,
50 TRACER_FIELD = 14,
51 TRACER_REGION = 15,
52 VE = 16,
53 NUM_FIP_REPORT = 17,
54 };
55
57 FIPConfig() = default;
58
60 explicit FIPConfig(const Deck& deck);
61
63 explicit FIPConfig(const DeckKeyword& keyword);
64
66 explicit FIPConfig(const RPTConfig& rptConfig);
67
70
72 template<class Serializer>
73 void serializeOp(Serializer& serializer)
74 {
75 serializer(m_flags);
76 }
77
79 bool output(OutputField field) const;
80
82 bool operator==(const FIPConfig& rhs) const;
83
84private:
86 void parseRPT(const RPTConfig& rptConfig);
87
89 std::bitset<static_cast<int>(OutputField::NUM_FIP_REPORT)> m_flags = {};
90};
91
92} //namespace Opm
93
94#endif
Definition DeckKeyword.hpp:36
Definition Deck.hpp:49
Class holding FIP configuration from RPTSOL/RPTSCHED keyword.
Definition FIPConfig.hpp:32
bool output(OutputField field) const
Query if FIP output is enabled for a given field.
Definition FIPConfig.cpp:103
static FIPConfig serializationTestObject()
Returns a test object used for serialization tests.
Definition FIPConfig.cpp:93
OutputField
Enumeration of FIP report outputs.
Definition FIPConfig.hpp:35
@ FIP
FIP defined regions.
@ SURF_REGION
Surfacant region report.
@ SOLVENT_REGION
Solvent region report.
@ NUM_FIP_REPORT
Number of configuration flags.
@ SURF_FIELD
Surfacant field report.
@ TRACER_FIELD
Tracer field report.
@ FOAM_FIELD
Foam field report.
@ VE
VE (oil, water, gas) zone report.
@ TRACER_REGION
Tracer region report.
@ FOAM_REGION
Foam region report.
@ SOLVENT_FIELD
Solvent field report.
@ TEMPERATURE_REGION
Temperature region report.
@ POLYMER_FIELD
Polymer field report.
@ POLYMER_REGION
Polymer region report.
@ TEMPERATURE_FIELD
Temperature field report.
void serializeOp(Serializer &serializer)
(De-)serialization handler.
Definition FIPConfig.hpp:73
FIPConfig()=default
Default constructor.
bool operator==(const FIPConfig &rhs) const
Comparison operator.
Definition FIPConfig.cpp:108
Definition RPTConfig.hpp:29
Class for (de-)serializing.
Definition Serializer.hpp:84
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30