diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index e616628e2..348af94d0 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -1203,8 +1203,7 @@ std::size_t packSize(const std::unique_ptr& data, std::size_t packSize(const Dimension& data, Dune::MPIHelper::MPICommunicator comm) { - return packSize(data.getName(), comm) + - packSize(data.getSIScalingRaw(), comm) + + return packSize(data.getSIScalingRaw(), comm) + packSize(data.getSIOffset(), comm); } @@ -2830,7 +2829,6 @@ void pack(const Dimension& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { - pack(data.getName(), buffer, position, comm); pack(data.getSIScalingRaw(), buffer, position, comm); pack(data.getSIOffset(), buffer, position, comm); } @@ -4962,13 +4960,11 @@ void unpack(Dimension& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { - std::string name; double siScaling, siOffset; - unpack(name, buffer, position, comm); unpack(siScaling, buffer, position, comm); unpack(siOffset, buffer, position, comm); - data = Dimension(name, siScaling, siOffset, false); + data = Dimension(siScaling, siOffset); } void unpack(UnitSystem& data, diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index aeb27b929..f2e3473c3 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -423,15 +423,15 @@ Opm::DeckRecord getDeckRecord() Opm::type_tag::string, "test5", {Opm::value::status::deck_value}, true, - {Opm::Dimension("DimensionLess", 7.0, 8.0)}, - {Opm::Dimension("Metric", 10.0, 11.0)}); + {Opm::Dimension(7.0, 8.0)}, + {Opm::Dimension(10.0, 11.0)}); Opm::DeckItem item2({1.0}, {2}, {"test3"}, {Opm::UDAValue(4)}, Opm::type_tag::string, "test6", {Opm::value::status::deck_value}, true, - {Opm::Dimension("DimensionLess", 7.0, 8.0)}, - {Opm::Dimension("Metric", 10.0, 11.0)}); + {Opm::Dimension(7.0, 8.0)}, + {Opm::Dimension(10.0, 11.0)}); return Opm::DeckRecord({item1, item2}); } @@ -1563,7 +1563,7 @@ BOOST_AUTO_TEST_CASE(Segment) BOOST_AUTO_TEST_CASE(Dimension) { #ifdef HAVE_MPI - Opm::Dimension val1("test", 1.0, 2.0); + Opm::Dimension val1(1.0, 2.0); auto val2 = PackUnpack(val1); DO_CHECKS(Dimension) #endif @@ -1948,8 +1948,8 @@ BOOST_AUTO_TEST_CASE(DeckItem) Opm::type_tag::string, "test5", {Opm::value::status::deck_value}, true, - {Opm::Dimension("DimensionLess", 7.0, 8.0)}, - {Opm::Dimension("Metric", 10.0, 11.0)}); + {Opm::Dimension(7.0, 8.0)}, + {Opm::Dimension(10.0, 11.0)}); auto val2 = PackUnpack(val1); DO_CHECKS(DeckItem)