Merge pull request #3756 from akva2/fipconfig_rptsol
EclipseConfig: add FIPConfig for RPTSOL
This commit is contained in:
commit
8b2be3d797
@ -21,6 +21,7 @@
|
||||
#define OPM_ECLIPSE_CONFIG_HPP
|
||||
|
||||
#include <opm/input/eclipse/EclipseState/InitConfig/InitConfig.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/IOConfig/FIPConfig.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
|
||||
namespace Opm {
|
||||
@ -32,7 +33,9 @@ namespace Opm {
|
||||
public:
|
||||
EclipseConfig() = default;
|
||||
explicit EclipseConfig(const Deck& deck);
|
||||
EclipseConfig(const InitConfig& initConfig, const IOConfig& io_conf);
|
||||
EclipseConfig(const InitConfig& initConfig,
|
||||
const FIPConfig& fip_conf,
|
||||
const IOConfig& io_conf);
|
||||
|
||||
static EclipseConfig serializationTestObject();
|
||||
|
||||
@ -40,6 +43,7 @@ namespace Opm {
|
||||
IOConfig& io();
|
||||
const IOConfig& io() const;
|
||||
const InitConfig& init() const;
|
||||
const FIPConfig& fip() const;
|
||||
|
||||
bool operator==(const EclipseConfig& data) const;
|
||||
static bool rst_cmp(const EclipseConfig& full_config, const EclipseConfig& rst_config);
|
||||
@ -47,11 +51,13 @@ namespace Opm {
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_initConfig);
|
||||
serializer(fip_config);
|
||||
serializer(io_config);
|
||||
}
|
||||
|
||||
private:
|
||||
InitConfig m_initConfig;
|
||||
FIPConfig fip_config;
|
||||
IOConfig io_config;
|
||||
};
|
||||
}
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include <config.h>
|
||||
#include <opm/common/utility/MemPacker.hpp>
|
||||
|
||||
#include <opm/input/eclipse/EclipseState/IOConfig/FIPConfig.hpp>
|
||||
|
||||
namespace Opm {
|
||||
namespace Serialization {
|
||||
namespace detail {
|
||||
@ -100,6 +102,8 @@ unpack(time_point& data, std::vector<char>& buffer, int& position)
|
||||
template struct Packing<false,std::bitset<3>>;
|
||||
template struct Packing<false,std::bitset<4>>;
|
||||
template struct Packing<false,std::bitset<10>>;
|
||||
constexpr int NumFip = static_cast<int>(FIPConfig::OutputField::NUM_FIP_REPORT);
|
||||
template struct Packing<false,std::bitset<NumFip>>;
|
||||
|
||||
}
|
||||
|
||||
|
@ -28,13 +28,17 @@ namespace Opm {
|
||||
|
||||
EclipseConfig::EclipseConfig(const Deck& deck) :
|
||||
m_initConfig(deck),
|
||||
fip_config(deck),
|
||||
io_config(deck)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
EclipseConfig::EclipseConfig(const InitConfig& initConfig, const IOConfig& io_conf):
|
||||
EclipseConfig::EclipseConfig(const InitConfig& initConfig,
|
||||
const FIPConfig& fip_conf,
|
||||
const IOConfig& io_conf):
|
||||
m_initConfig(initConfig),
|
||||
fip_config(fip_conf),
|
||||
io_config(io_conf)
|
||||
{
|
||||
}
|
||||
@ -44,6 +48,7 @@ namespace Opm {
|
||||
{
|
||||
EclipseConfig result;
|
||||
result.m_initConfig = InitConfig::serializationTestObject();
|
||||
result.fip_config = FIPConfig::serializationTestObject();
|
||||
result.io_config = IOConfig::serializationTestObject();
|
||||
|
||||
return result;
|
||||
@ -59,17 +64,21 @@ namespace Opm {
|
||||
|
||||
bool EclipseConfig::operator==(const EclipseConfig& data) const {
|
||||
return this->init() == data.init() &&
|
||||
this->fip() == data.fip() &&
|
||||
this->io() == data.io();
|
||||
}
|
||||
|
||||
IOConfig& EclipseConfig::io() {
|
||||
return const_cast<IOConfig &>(this->io_config);
|
||||
return this->io_config;
|
||||
}
|
||||
|
||||
const IOConfig& EclipseConfig::io() const {
|
||||
return this->io_config;
|
||||
}
|
||||
|
||||
const FIPConfig& EclipseConfig::fip() const {
|
||||
return this->fip_config;
|
||||
}
|
||||
|
||||
bool EclipseConfig::rst_cmp(const EclipseConfig& full_config, const EclipseConfig& rst_config) {
|
||||
return IOConfig::rst_cmp(full_config.io(), rst_config.io()) &&
|
||||
|
Loading…
Reference in New Issue
Block a user