Loading...
Searching...
No Matches
InitConfig.hpp
/*
Copyright 2015 Statoil ASA.
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_INIT_CONFIG_HPP
#define OPM_INIT_CONFIG_HPP
#include <opm/input/eclipse/EclipseState/InitConfig/Equil.hpp>
#include <opm/input/eclipse/EclipseState/InitConfig/FoamConfig.hpp>
#include <string>
namespace Opm {
class Deck;
class Phases;
} // namespace Opm
namespace Opm {
class InitConfig
{
public:
InitConfig() = default;
InitConfig(const Deck& deck, const Phases& phases);
static InitConfig serializationTestObject();
void setRestart(const std::string& root, int step);
bool restartRequested() const;
int getRestartStep() const;
const std::string& getRestartRootName() const;
const std::string& getRestartRootNameInput() const;
bool hasEquil() const;
const Equil& getEquil() const;
bool hasStressEquil() const;
const StressEquil& getStressEquil() const;
bool hasGravity() const
{
return this->m_gravity;
}
bool hasFoamConfig() const;
const FoamConfig& getFoamConfig() const;
bool filleps() const
{
return this->m_filleps;
}
bool operator==(const InitConfig& config) const;
static bool rst_cmp(const InitConfig& full_config,
const InitConfig& rst_config);
template<class Serializer>
void serializeOp(Serializer& serializer)
{
serializer(equil);
serializer(stress_equil);
serializer(foamconfig);
serializer(m_filleps);
serializer(m_gravity);
serializer(m_restartRequested);
serializer(m_restartStep);
serializer(m_restartRootName);
serializer(m_restartRootNameInput);
}
private:
Equil equil{};
StressEquil stress_equil{};
FoamConfig foamconfig{};
bool m_filleps{false};
bool m_gravity{true};
bool m_restartRequested{false};
int m_restartStep{0};
std::string m_restartRootName{};
std::string m_restartRootNameInput{};
void parseRestartKeyword(const Deck& deck);
};
} // namespace Opm
#endif // OPM_INIT_CONFIG_HPP
Opm::Deck
Definition Deck.hpp:46
Opm::FoamConfig
Foam behaviour data for all SATNUM regions.
Definition FoamConfig.hpp:73
Opm::InitConfig
Settings for model initialisation.
Definition InitConfig.hpp:39
Opm::InitConfig::serializeOp
void serializeOp(Serializer &serializer)
Convert between byte array and object representation.
Definition InitConfig.hpp:167
Opm::InitConfig::hasFoamConfig
bool hasFoamConfig() const
Whether or not run includes foam effects.
Definition InitConfig.cpp:155
Opm::InitConfig::InitConfig
InitConfig()=default
Default constructor.
Opm::InitConfig::hasGravity
bool hasGravity() const
Whether or not run includes gravity effects.
Definition InitConfig.hpp:114
Opm::InitConfig::getRestartStep
int getRestartStep() const
Report step from which to restart the simulation.
Definition InitConfig.cpp:108
Opm::InitConfig::hasEquil
bool hasEquil() const
Whether or not run uses initialisation by equilibration.
Definition InitConfig.cpp:123
Opm::InitConfig::getStressEquil
const StressEquil & getStressEquil() const
Mechanical stress equilibration specification.
Definition InitConfig.cpp:144
Opm::InitConfig::getEquil
const Equil & getEquil() const
Equilibration specification.
Definition InitConfig.cpp:128
Opm::InitConfig::getRestartRootName
const std::string & getRestartRootName() const
Full path to run's restart input (i.e., run's initial pressures, saturations, Rs, &c).
Definition InitConfig.cpp:113
Opm::InitConfig::setRestart
void setRestart(const std::string &root, int step)
Assign simulation restart information.
Definition InitConfig.cpp:96
Opm::InitConfig::rst_cmp
static bool rst_cmp(const InitConfig &full_config, const InitConfig &rst_config)
Equality predicate for objects created from restart file information.
Definition InitConfig.cpp:186
Opm::InitConfig::filleps
bool filleps() const
Whether or not the run specifies the FILLEPS keyword that requests expanded end-point scaling arrays ...
Definition InitConfig.hpp:130
Opm::InitConfig::restartRequested
bool restartRequested() const
Whether or not this is a restarted simulation run (input uses the RESTART keyword).
Definition InitConfig.cpp:103
Opm::InitConfig::getFoamConfig
const FoamConfig & getFoamConfig() const
Run's foam configuration.
Definition InitConfig.cpp:161
Opm::InitConfig::getRestartRootNameInput
const std::string & getRestartRootNameInput() const
Relative path to run's restart input (i.e., run's initial pressures, saturations, Rs,...
Definition InitConfig.cpp:118
Opm::InitConfig::operator==
bool operator==(const InitConfig &config) const
Equality predicate.
Definition InitConfig.cpp:172
Opm::InitConfig::hasStressEquil
bool hasStressEquil() const
Whether or not run initialises its mechanical stresses by an equilibration procedure (STREQUIL keywor...
Definition InitConfig.cpp:139
Opm::InitConfig::serializationTestObject
static InitConfig serializationTestObject()
Create a serialisation test object.
Definition InitConfig.cpp:80
Opm::Phases
Definition Runspec.hpp:46
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