changed: update FoamConfig serialization

This commit is contained in:
Arne Morten Kvarving
2020-03-04 10:53:57 +01:00
parent 76afa6ba40
commit cd0a686349
2 changed files with 25 additions and 7 deletions

View File

@@ -200,18 +200,19 @@ Opm::ThresholdPressure getThresholdPressure()
{{{1,2},{false,3.0}},{{2,3},{true,4.0}}});
}
Opm::RockConfig getRockConfig()
{
return Opm::RockConfig(true, {{100, 0.25}, {200, 0.30}}, "ROCKNUM", 10, false, Opm::RockConfig::Hysteresis::HYSTER);
}
Opm::BCConfig getBCConfig()
{
return Opm::BCConfig({{10,11,12,13,14,15,Opm::BCType::RATE,Opm::FaceDir::XPlus, Opm::BCComponent::GAS, 100.0}});
}
Opm::TableSchema getTableSchema()
{
Opm::OrderedMap<std::string, Opm::ColumnSchema> data;
@@ -230,7 +231,8 @@ Opm::TableColumn getTableColumn()
}
Opm::DenT getDenT() {
Opm::DenT getDenT()
{
std::vector<Opm::DenT::entry> records;
records.emplace_back(1,2,3);
records.emplace_back(4,5,6);
@@ -257,6 +259,14 @@ Opm::FoamData getFoamData()
}
Opm::FoamConfig getFoamConfig()
{
return Opm::FoamConfig({getFoamData(), getFoamData()},
Opm::Phase::GAS,
Opm::FoamConfig::MobilityModel::TAB);
}
Opm::TimeMap getTimeMap()
{
return Opm::TimeMap({123});
@@ -792,7 +802,7 @@ BOOST_AUTO_TEST_CASE(FoamData)
BOOST_AUTO_TEST_CASE(FoamConfig)
{
#if HAVE_MPI
Opm::FoamConfig val1({getFoamData(), getFoamData()});
Opm::FoamConfig val1 = getFoamConfig();
auto val2 = PackUnpack(val1);
DO_CHECKS(FoamConfig)
#endif
@@ -803,7 +813,7 @@ BOOST_AUTO_TEST_CASE(InitConfig)
{
#if HAVE_MPI
Opm::InitConfig val1(Opm::Equil({getEquilRecord(), getEquilRecord()}),
Opm::FoamConfig({getFoamData(), getFoamData()}),
getFoamConfig(),
true, true, true, 20, "test1");
auto val2 = PackUnpack(val1);
DO_CHECKS(InitConfig)
@@ -2425,7 +2435,7 @@ BOOST_AUTO_TEST_CASE(EclipseConfig)
Opm::IOConfig io(true, false, true, false, false, true, "test1", true,
"test2", true, "test3", false);
Opm::InitConfig init(Opm::Equil({getEquilRecord(), getEquilRecord()}),
Opm::FoamConfig({getFoamData(), getFoamData()}),
getFoamConfig(),
true, true, true, 20, "test1");
Opm::EclipseConfig val1{init, io};