Loading...
Searching...
No Matches
FIPConfig.hpp
/*
Copyright 2023 SINTEF Digital
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPM_FIP_CONFIG_HPP
#define OPM_FIP_CONFIG_HPP
#include <bitset>
namespace Opm {
class Deck;
class DeckKeyword;
class RPTConfig;
class FIPConfig {
public:
enum class OutputField {
FIELD = 0,
FIPNUM = 1,
FIP = 2,
FOAM_FIELD = 3,
FOAM_REGION = 4,
POLYMER_FIELD = 5,
POLYMER_REGION = 6,
RESV = 7,
SOLVENT_FIELD = 8,
SOLVENT_REGION = 9,
TEMPERATURE_FIELD = 10,
TEMPERATURE_REGION = 11,
SURF_FIELD = 12,
SURF_REGION = 13,
TRACER_FIELD = 14,
TRACER_REGION = 15,
VE = 16,
NUM_FIP_REPORT = 17,
};
FIPConfig() = default;
explicit FIPConfig(const Deck& deck);
explicit FIPConfig(const DeckKeyword& keyword);
explicit FIPConfig(const RPTConfig& rptConfig);
static FIPConfig serializationTestObject();
template<class Serializer>
void serializeOp(Serializer& serializer)
{
serializer(m_flags);
}
bool output(OutputField field) const;
bool operator==(const FIPConfig& rhs) const;
private:
void parseRPT(const RPTConfig& rptConfig);
std::bitset<static_cast<int>(OutputField::NUM_FIP_REPORT)> m_flags = {};
};
} //namespace Opm
#endif
Opm::DeckKeyword
Definition DeckKeyword.hpp:36
Opm::Deck
Definition Deck.hpp:46
Opm::FIPConfig
Class holding FIP configuration from RPTSOL/RPTSCHED keyword.
Definition FIPConfig.hpp:32
Opm::FIPConfig::output
bool output(OutputField field) const
Query if FIP output is enabled for a given field.
Definition FIPConfig.cpp:103
Opm::FIPConfig::serializationTestObject
static FIPConfig serializationTestObject()
Returns a test object used for serialization tests.
Definition FIPConfig.cpp:93
Opm::FIPConfig::OutputField
OutputField
Enumeration of FIP report outputs.
Definition FIPConfig.hpp:35
Opm::FIPConfig::OutputField::FIP
@ FIP
FIP defined regions.
Definition FIPConfig.hpp:38
Opm::FIPConfig::OutputField::SURF_REGION
@ SURF_REGION
Surfacant region report.
Definition FIPConfig.hpp:49
Opm::FIPConfig::OutputField::RESV
@ RESV
RESV report.
Definition FIPConfig.hpp:43
Opm::FIPConfig::OutputField::FIELD
@ FIELD
Whole field.
Definition FIPConfig.hpp:36
Opm::FIPConfig::OutputField::SOLVENT_REGION
@ SOLVENT_REGION
Solvent region report.
Definition FIPConfig.hpp:45
Opm::FIPConfig::OutputField::NUM_FIP_REPORT
@ NUM_FIP_REPORT
Number of configuration flags.
Definition FIPConfig.hpp:53
Opm::FIPConfig::OutputField::SURF_FIELD
@ SURF_FIELD
Surfacant field report.
Definition FIPConfig.hpp:48
Opm::FIPConfig::OutputField::TRACER_FIELD
@ TRACER_FIELD
Tracer field report.
Definition FIPConfig.hpp:50
Opm::FIPConfig::OutputField::FOAM_FIELD
@ FOAM_FIELD
Foam field report.
Definition FIPConfig.hpp:39
Opm::FIPConfig::OutputField::VE
@ VE
VE (oil, water, gas) zone report.
Definition FIPConfig.hpp:52
Opm::FIPConfig::OutputField::TRACER_REGION
@ TRACER_REGION
Tracer region report.
Definition FIPConfig.hpp:51
Opm::FIPConfig::OutputField::FOAM_REGION
@ FOAM_REGION
Foam region report.
Definition FIPConfig.hpp:40
Opm::FIPConfig::OutputField::FIPNUM
@ FIPNUM
FIPNUM regions.
Definition FIPConfig.hpp:37
Opm::FIPConfig::OutputField::SOLVENT_FIELD
@ SOLVENT_FIELD
Solvent field report.
Definition FIPConfig.hpp:44
Opm::FIPConfig::OutputField::TEMPERATURE_REGION
@ TEMPERATURE_REGION
Temperature region report.
Definition FIPConfig.hpp:47
Opm::FIPConfig::OutputField::POLYMER_FIELD
@ POLYMER_FIELD
Polymer field report.
Definition FIPConfig.hpp:41
Opm::FIPConfig::OutputField::POLYMER_REGION
@ POLYMER_REGION
Polymer region report.
Definition FIPConfig.hpp:42
Opm::FIPConfig::OutputField::TEMPERATURE_FIELD
@ TEMPERATURE_FIELD
Temperature field report.
Definition FIPConfig.hpp:46
Opm::FIPConfig::serializeOp
void serializeOp(Serializer &serializer)
(De-)serialization handler.
Definition FIPConfig.hpp:73
Opm::FIPConfig::FIPConfig
FIPConfig()=default
Default constructor.
Opm::FIPConfig::operator==
bool operator==(const FIPConfig &rhs) const
Comparison operator.
Definition FIPConfig.cpp:108
Opm::RPTConfig
Configuration manager for RPTSCHED and RPTSOL keywords.
Definition RPTConfig.hpp:40
Opm::Serializer
Class for (de-)serializing.
Definition Serializer.hpp:94
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30