diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 0500a9f5b..fe5993169 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -508,7 +508,8 @@ std::size_t packSize(const WellEconProductionLimits& data, std::size_t packSize(const WellConnections& data, Dune::MPIHelper::MPICommunicator comm) { - return packSize(data.getHeadI(), comm) + + return packSize(data.ordering(), comm) + + packSize(data.getHeadI(), comm) + packSize(data.getHeadJ(), comm) + packSize(data.getNumRemoved(), comm) + packSize(data.getConnections(), comm); @@ -641,7 +642,6 @@ std::size_t packSize(const Well& data, packSize(data.getHeadJ(), comm) + packSize(data.getRefDepth(), comm) + packSize(data.wellType(), comm) + - packSize(data.getWellConnectionOrdering(), comm) + packSize(data.units(), comm) + packSize(data.udqUndefined(), comm) + packSize(data.getStatus(), comm) + @@ -1411,6 +1411,7 @@ void pack(const WellConnections& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { + pack(data.ordering(), buffer, position, comm); pack(data.getHeadI(), buffer, position, comm); pack(data.getHeadJ(), buffer, position, comm); pack(data.getNumRemoved(), buffer, position, comm); @@ -1548,7 +1549,6 @@ void pack(const Well& data, pack(data.getHeadJ(), buffer, position, comm); pack(data.getRefDepth(), buffer, position, comm); pack(data.wellType(), buffer, position, comm); - pack(data.getWellConnectionOrdering(), buffer, position, comm); pack(data.units(), buffer, position, comm); pack(data.udqUndefined(), buffer, position, comm); pack(data.getStatus(), buffer, position, comm); @@ -2455,14 +2455,16 @@ void unpack(WellConnections& data, { int headI, headJ; size_t numRemoved; + Connection::Order ordering; std::vector connections; + unpack(ordering, buffer, position, comm), unpack(headI, buffer, position, comm), unpack(headJ, buffer, position, comm), unpack(numRemoved, buffer, position, comm), unpack(connections, buffer, position, comm), - data = WellConnections(headI, headJ, numRemoved, connections); + data = WellConnections(ordering, headI, headJ, numRemoved, connections); } void unpack(Well::WellProductionProperties& data, @@ -2668,7 +2670,6 @@ void unpack(Well& data, int headI, headJ; double ref_depth; WellType wtype; - Connection::Order ordering; UnitSystem units; double udq_undefined; Well::Status status; @@ -2696,7 +2697,6 @@ void unpack(Well& data, unpack(headJ, buffer, position, comm); unpack(ref_depth, buffer, position, comm); unpack(wtype, buffer, position, comm); - unpack(ordering, buffer, position, comm); unpack(units, buffer, position, comm); unpack(udq_undefined, buffer, position, comm); unpack(status, buffer, position, comm); @@ -2722,7 +2722,7 @@ void unpack(Well& data, unpack(*segments, buffer, position, comm); } data = Well(name, groupName, firstTimeStep, seqIndex, headI, headJ, - ref_depth, wtype, ordering, units, udq_undefined, status, + ref_depth, wtype, units, udq_undefined, status, drainageRadius, allowCrossFlow, automaticShutIn, guideRate, efficiencyFactor, solventFraction, prediction_mode, econLimits, foamProperties, polymerProperties, brineProperties, diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index a0882a172..4c9105524 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -330,7 +330,7 @@ Opm::Well getFullWell() { Opm::UnitSystem unitSystem; return Opm::Well("test1", "test2", 1, 2, 3, 4, 5.0, - Opm::WellType(Opm::Phase::WATER), Opm::Connection::Order::DEPTH, + Opm::WellType(Opm::Phase::WATER), unitSystem, 6.0, Opm::Well::Status::SHUT, 7.0, true, false, Opm::Well::WellGuideRate{true, 1.0, Opm::Well::GuideRateTarget::COMB, 2.0}, @@ -1473,7 +1473,7 @@ BOOST_AUTO_TEST_CASE(WellConnections) {9, 10, 11}, Opm::Connection::CTFKind::Defaulted, 12, 13.0, 14.0, true, 15, 16, 17.0); - Opm::WellConnections val1(1, 2, 3, {conn, conn}); + Opm::WellConnections val1(Opm::Connection::Order::TRACK, 1, 2, 3, {conn, conn}); auto val2 = PackUnpack(val1); DO_CHECKS(WellConnections) #endif