diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index cd1a97609..47733c5b9 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -553,22 +552,6 @@ std::size_t packSize(const RestartConfig& data, Dune::MPIHelper::MPICommunicator packSize(data.saveKeywords(), comm); } -std::size_t packSize(const IOConfig& data, Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.getWriteINITFile(), comm) + - packSize(data.getWriteEGRIDFile(), comm) + - packSize(data.getUNIFIN(), comm) + - packSize(data.getUNIFOUT(), comm) + - packSize(data.getFMTIN(), comm) + - packSize(data.getFMTOUT(), comm) + - packSize(data.getDeckFileName(), comm) + - packSize(data.getOutputEnabled(), comm) + - packSize(data.getOutputDir(), comm) + - packSize(data.getNoSim(), comm) + - packSize(data.getBaseName(), comm) + - packSize(data.getEclCompatibleRST(), comm); -} - std::size_t packSize(const Phases& data, Dune::MPIHelper::MPICommunicator comm) { return packSize(data.getBits(), comm); @@ -1968,23 +1951,6 @@ void pack(const RestartConfig& data, std::vector& buffer, int& position, pack(data.saveKeywords(), buffer, position, comm); } -void pack(const IOConfig& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.getWriteINITFile(), buffer, position, comm); - pack(data.getWriteEGRIDFile(), buffer, position, comm); - pack(data.getUNIFIN(), buffer, position, comm); - pack(data.getUNIFOUT(), buffer, position, comm); - pack(data.getFMTIN(), buffer, position, comm); - pack(data.getFMTOUT(), buffer, position, comm); - pack(data.getDeckFileName(), buffer, position, comm); - pack(data.getOutputEnabled(), buffer, position, comm); - pack(data.getOutputDir(), buffer, position, comm); - pack(data.getNoSim(), buffer, position, comm); - pack(data.getBaseName(), buffer, position, comm); - pack(data.getEclCompatibleRST(), buffer, position, comm); -} - void pack(const Phases& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { @@ -3533,30 +3499,6 @@ void unpack(RestartConfig& data, std::vector& buffer, int& position, restart_keyw, save_keyw); } -void unpack(IOConfig& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - bool write_init, write_egrid, unifin, unifout, fmtin, fmtout; - std::string deck_name, output_dir, base_name; - bool output_enabled, no_sim, ecl_compatible_rst; - - unpack(write_init, buffer, position, comm); - unpack(write_egrid, buffer, position, comm); - unpack(unifin, buffer, position, comm); - unpack(unifout, buffer, position, comm); - unpack(fmtin, buffer, position, comm); - unpack(fmtout, buffer, position, comm); - unpack(deck_name, buffer, position, comm); - unpack(output_enabled, buffer, position, comm); - unpack(output_dir, buffer, position, comm); - unpack(no_sim, buffer, position, comm); - unpack(base_name, buffer, position, comm); - unpack(ecl_compatible_rst, buffer, position, comm); - data = IOConfig(write_init, write_egrid, unifin, unifout, fmtin, fmtout, - deck_name, output_enabled, output_dir, - no_sim, base_name, ecl_compatible_rst); -} - void unpack(Phases& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { diff --git a/opm/simulators/utils/ParallelRestart.hpp b/opm/simulators/utils/ParallelRestart.hpp index b5977e912..71222f605 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -80,7 +80,6 @@ class EclipseConfig; class Eqldims; class EndpointScaling; class Events; -class IOConfig; template class IOrderSet; class JFunc; class Location; @@ -527,7 +526,6 @@ ADD_PACK_PROTOTYPES(GuideRateModel) ADD_PACK_PROTOTYPES(Group) ADD_PACK_PROTOTYPES(Group::GroupInjectionProperties) ADD_PACK_PROTOTYPES(Group::GroupProductionProperties) -ADD_PACK_PROTOTYPES(IOConfig) ADD_PACK_PROTOTYPES(JFunc) ADD_PACK_PROTOTYPES(Location) ADD_PACK_PROTOTYPES(MessageLimits) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index e3921a54a..60f1fff1b 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -901,7 +901,7 @@ BOOST_AUTO_TEST_CASE(IOConfig) #if HAVE_MPI Opm::IOConfig val1(true, false, true, false, false, true, "test1", true, "test2", true, "test3", false); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(IOConfig) #endif }