Merge pull request #2433 from akva2/serialize_stonetype

update mpi serialization for Runspec
This commit is contained in:
Arne Morten Kvarving
2020-03-09 11:21:40 +01:00
committed by GitHub
2 changed files with 11 additions and 4 deletions

View File

@@ -774,7 +774,8 @@ std::size_t packSize(const Runspec& data, Dune::MPIHelper::MPICommunicator comm)
packSize(data.udqParams(), comm) + packSize(data.udqParams(), comm) +
packSize(data.hysterPar(), comm) + packSize(data.hysterPar(), comm) +
packSize(data.actdims(), comm) + packSize(data.actdims(), comm) +
packSize(data.saturationFunctionControls(), comm); packSize(data.saturationFunctionControls(), comm) +
packSize(data.stoneType(), comm);
} }
std::size_t packSize(const PvtxTable& data, Dune::MPIHelper::MPICommunicator comm) std::size_t packSize(const PvtxTable& data, Dune::MPIHelper::MPICommunicator comm)
@@ -2455,6 +2456,7 @@ void pack(const Runspec& data, std::vector<char>& buffer, int& position,
pack(data.hysterPar(), buffer, position, comm); pack(data.hysterPar(), buffer, position, comm);
pack(data.actdims(), buffer, position, comm); pack(data.actdims(), buffer, position, comm);
pack(data.saturationFunctionControls(), buffer, position, comm); pack(data.saturationFunctionControls(), buffer, position, comm);
pack(data.stoneType(), buffer, position, comm);
} }
void pack(const PvtxTable& data, std::vector<char>& buffer, int& position, void pack(const PvtxTable& data, std::vector<char>& buffer, int& position,
@@ -4367,6 +4369,8 @@ void unpack(Runspec& data, std::vector<char>& buffer, int& position,
EclHysterConfig hystPar; EclHysterConfig hystPar;
Actdims actdims; Actdims actdims;
SatFuncControls sfuncctrl; SatFuncControls sfuncctrl;
Runspec::StoneType stonetype;
unpack(phases, buffer, position, comm); unpack(phases, buffer, position, comm);
unpack(tabdims, buffer, position, comm); unpack(tabdims, buffer, position, comm);
unpack(endScale, buffer, position, comm); unpack(endScale, buffer, position, comm);
@@ -4376,8 +4380,9 @@ void unpack(Runspec& data, std::vector<char>& buffer, int& position,
unpack(hystPar, buffer, position, comm); unpack(hystPar, buffer, position, comm);
unpack(actdims, buffer, position, comm); unpack(actdims, buffer, position, comm);
unpack(sfuncctrl, buffer, position, comm); unpack(sfuncctrl, buffer, position, comm);
unpack(stonetype, buffer, position, comm);
data = Runspec(phases, tabdims, endScale, wellDims, wsegDims, data = Runspec(phases, tabdims, endScale, wellDims, wsegDims,
udqparams, hystPar, actdims, sfuncctrl); udqparams, hystPar, actdims, sfuncctrl, stonetype);
} }
template<class PVTType> template<class PVTType>

View File

@@ -977,7 +977,8 @@ BOOST_AUTO_TEST_CASE(Runspec)
Opm::UDQParams(true, 1, 2.0, 3.0, 4.0), Opm::UDQParams(true, 1, 2.0, 3.0, 4.0),
Opm::EclHysterConfig(true, 1, 2), Opm::EclHysterConfig(true, 1, 2),
Opm::Actdims(1,2,3,4), Opm::Actdims(1,2,3,4),
Opm::SatFuncControls(5.0e-7)); Opm::SatFuncControls(5.0e-7),
Opm::Runspec::StoneType::STONE2);
auto val2 = PackUnpack(val1); auto val2 = PackUnpack(val1);
DO_CHECKS(Runspec) DO_CHECKS(Runspec)
@@ -2070,7 +2071,8 @@ BOOST_AUTO_TEST_CASE(Schedule)
Opm::UDQParams(true, 1, 2.0, 3.0, 4.0), Opm::UDQParams(true, 1, 2.0, 3.0, 4.0),
Opm::EclHysterConfig(true, 1, 2), Opm::EclHysterConfig(true, 1, 2),
Opm::Actdims(1,2,3,4), Opm::Actdims(1,2,3,4),
Opm::SatFuncControls(5.6e-7)); Opm::SatFuncControls(5.6e-7),
Opm::Runspec::StoneType::STONE1);
Opm::Schedule::VFPProdMap vfpProd {{1, {{std::make_shared<Opm::VFPProdTable>(getVFPProdTable())},1}}}; Opm::Schedule::VFPProdMap vfpProd {{1, {{std::make_shared<Opm::VFPProdTable>(getVFPProdTable())},1}}};
Opm::Schedule::VFPInjMap vfpIn{{1, {{std::make_shared<Opm::VFPInjTable>(getVFPInjTable())},1}}}; Opm::Schedule::VFPInjMap vfpIn{{1, {{std::make_shared<Opm::VFPInjTable>(getVFPInjTable())},1}}};
Opm::WellTestConfig::WTESTWell tw{"test", Opm::WellTestConfig::ECONOMIC, Opm::WellTestConfig::WTESTWell tw{"test", Opm::WellTestConfig::ECONOMIC,