remove old serialization support for RestartConfig

This commit is contained in:
Arne Morten Kvarving 2020-03-17 13:58:42 +01:00
parent f0bc3e3815
commit 6d74eb8e88
3 changed files with 2 additions and 79 deletions

View File

@ -24,7 +24,6 @@
#include "ParallelRestart.hpp" #include "ParallelRestart.hpp"
#include <opm/common/OpmLog/Location.hpp> #include <opm/common/OpmLog/Location.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp> #include <opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp>
#include <opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionAST.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionAST.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/Actions.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/Action/Actions.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionX.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionX.hpp>
@ -341,16 +340,6 @@ std::size_t packSize(const TimeMap& data, Dune::MPIHelper::MPICommunicator comm)
return packSize(data.timeList(), comm); return packSize(data.timeList(), comm);
} }
std::size_t packSize(const RestartConfig& data, Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.timeMap(), comm) +
packSize(data.getFirstRestartStep(), comm) +
packSize(data.writeInitialRst(), comm) +
packSize(data.restartSchedule(), comm) +
packSize(data.restartKeywords(), comm) +
packSize(data.saveKeywords(), comm);
}
template template
std::size_t packSize(const std::map<Phase,Group::GroupInjectionProperties>& data, std::size_t packSize(const std::map<Phase,Group::GroupInjectionProperties>& data,
Dune::MPIHelper::MPICommunicator comm); Dune::MPIHelper::MPICommunicator comm);
@ -904,16 +893,6 @@ std::size_t packSize(const Action::Actions& data,
return packSize(data.getActions(), comm); return packSize(data.getActions(), comm);
} }
std::size_t packSize(const RestartSchedule& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.timestep, comm) +
packSize(data.basic, comm) +
packSize(data.frequency, comm) +
packSize(data.rptsched_restart_set, comm) +
packSize(data.rptsched_restart, comm);
}
std::size_t packSize(const WellPolymerProperties& data, std::size_t packSize(const WellPolymerProperties& data,
Dune::MPIHelper::MPICommunicator comm) Dune::MPIHelper::MPICommunicator comm)
{ {
@ -1221,17 +1200,6 @@ void pack(const TimeMap& data, std::vector<char>& buffer, int& position,
pack(data.timeList(), buffer, position, comm); pack(data.timeList(), buffer, position, comm);
} }
void pack(const RestartConfig& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.timeMap(), buffer, position, comm);
pack(data.getFirstRestartStep(), buffer, position, comm);
pack(data.writeInitialRst(), buffer, position, comm);
pack(data.restartSchedule(), buffer, position, comm);
pack(data.restartKeywords(), buffer, position, comm);
pack(data.saveKeywords(), buffer, position, comm);
}
void pack(const OilVaporizationProperties& data, void pack(const OilVaporizationProperties& data,
std::vector<char>& buffer, int& position, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm) Dune::MPIHelper::MPICommunicator comm)
@ -1820,17 +1788,6 @@ void pack(const Action::Actions& data,
pack(data.getActions(), buffer, position, comm); pack(data.getActions(), buffer, position, comm);
} }
void pack(const RestartSchedule& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.timestep, buffer, position, comm);
pack(data.basic, buffer, position, comm);
pack(data.frequency, buffer, position, comm);
pack(data.rptsched_restart_set, buffer, position, comm);
pack(data.rptsched_restart, buffer, position, comm);
}
void pack(const WellPolymerProperties& data, void pack(const WellPolymerProperties& data,
std::vector<char>& buffer, int& position, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm) Dune::MPIHelper::MPICommunicator comm)
@ -2165,25 +2122,6 @@ void unpack(TimeMap& data, std::vector<char>& buffer, int& position,
data = TimeMap(timeList); data = TimeMap(timeList);
} }
void unpack(RestartConfig& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
TimeMap timemap;
int firstRstStep;
bool writeInitialRst;
DynamicState<RestartSchedule> restart_sched;
DynamicState<std::map<std::string,int>> restart_keyw;
std::vector<bool> save_keyw;
unpack(timemap, buffer, position, comm);
unpack(firstRstStep, buffer, position, comm);
unpack(writeInitialRst, buffer, position, comm);
unpack(restart_sched, buffer, position, comm);
unpack(restart_keyw, buffer, position, comm);
unpack(save_keyw, buffer, position, comm);
data = RestartConfig(timemap, firstRstStep, writeInitialRst, restart_sched,
restart_keyw, save_keyw);
}
void unpack(OilVaporizationProperties& data, void unpack(OilVaporizationProperties& data,
std::vector<char>& buffer, int& position, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm) Dune::MPIHelper::MPICommunicator comm)
@ -3072,17 +3010,6 @@ void unpack(Action::Actions& data, std::vector<char>& buffer, int& position,
data = Action::Actions(actions); data = Action::Actions(actions);
} }
void unpack(RestartSchedule& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
unpack(data.timestep, buffer, position, comm);
unpack(data.basic, buffer, position, comm);
unpack(data.frequency, buffer, position, comm);
unpack(data.rptsched_restart_set, buffer, position, comm);
unpack(data.rptsched_restart, buffer, position, comm);
}
void unpack(WellPolymerProperties& data, void unpack(WellPolymerProperties& data,
std::vector<char>& buffer, int& position, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm) Dune::MPIHelper::MPICommunicator comm)

View File

@ -67,8 +67,6 @@ class Location;
class MessageLimits; class MessageLimits;
class MLimits; class MLimits;
class OilVaporizationProperties; class OilVaporizationProperties;
class RestartConfig;
class RestartSchedule;
class RFTConfig; class RFTConfig;
class Segment; class Segment;
class SpiralICD; class SpiralICD;
@ -442,9 +440,7 @@ ADD_PACK_PROTOTYPES(Location)
ADD_PACK_PROTOTYPES(MessageLimits) ADD_PACK_PROTOTYPES(MessageLimits)
ADD_PACK_PROTOTYPES(MLimits) ADD_PACK_PROTOTYPES(MLimits)
ADD_PACK_PROTOTYPES(OilVaporizationProperties) ADD_PACK_PROTOTYPES(OilVaporizationProperties)
ADD_PACK_PROTOTYPES(RestartConfig)
ADD_PACK_PROTOTYPES(RestartKey) ADD_PACK_PROTOTYPES(RestartKey)
ADD_PACK_PROTOTYPES(RestartSchedule)
ADD_PACK_PROTOTYPES(RestartValue) ADD_PACK_PROTOTYPES(RestartValue)
ADD_PACK_PROTOTYPES(RFTConfig) ADD_PACK_PROTOTYPES(RFTConfig)
ADD_PACK_PROTOTYPES(Segment) ADD_PACK_PROTOTYPES(Segment)

View File

@ -866,7 +866,7 @@ BOOST_AUTO_TEST_CASE(RestartSchedule)
{ {
#if HAVE_MPI #if HAVE_MPI
Opm::RestartSchedule val1(1, 2, 3); Opm::RestartSchedule val1(1, 2, 3);
auto val2 = PackUnpack(val1); auto val2 = PackUnpack2(val1);
DO_CHECKS(RestartSchedule) DO_CHECKS(RestartSchedule)
#endif #endif
} }
@ -891,7 +891,7 @@ BOOST_AUTO_TEST_CASE(RestartConfig)
Opm::IOConfig io(true, false, true, false, false, true, "test1", true, Opm::IOConfig io(true, false, true, false, false, true, "test1", true,
"test2", true, "test3", false); "test2", true, "test3", false);
Opm::RestartConfig val1(getTimeMap(), 1, true, rsched, rkw, {false, true}); Opm::RestartConfig val1(getTimeMap(), 1, true, rsched, rkw, {false, true});
auto val2 = PackUnpack(val1); auto val2 = PackUnpack2(val1);
DO_CHECKS(RestartConfig) DO_CHECKS(RestartConfig)
#endif #endif
} }