remove old serialization support for InitConfig

This commit is contained in:
Arne Morten Kvarving
2020-03-13 10:22:25 +01:00
parent 0dfdb29851
commit fbe739ec9b
3 changed files with 1 additions and 46 deletions

View File

@@ -25,7 +25,6 @@
#include <opm/common/OpmLog/Location.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
#include <opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionAST.hpp>
@@ -539,17 +538,6 @@ std::size_t packSize(const TableContainer& data, Dune::MPIHelper::MPICommunicato
return res;
}
std::size_t packSize(const InitConfig& data, Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.getEquil(), comm) +
packSize(data.getFoamConfig(), comm) +
packSize(data.filleps(), comm) +
packSize(data.hasGravity(), comm) +
packSize(data.restartRequested(), comm) +
packSize(data.getRestartStep(), comm) +
packSize(data.getRestartRootName(), comm);
}
std::size_t packSize(const TimeMap& data, Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.timeList(), comm);
@@ -1963,18 +1951,6 @@ void pack(const TableContainer& data, std::vector<char>& buffer, int& position,
}
}
void pack(const InitConfig& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.getEquil(), buffer, position, comm);
pack(data.getFoamConfig(), buffer, position, comm);
pack(data.filleps(), buffer, position, comm);
pack(data.hasGravity(), buffer, position, comm);
pack(data.restartRequested(), buffer, position, comm);
pack(data.getRestartStep(), buffer, position, comm);
pack(data.getRestartRootName(), buffer, position, comm);
}
void pack(const TimeMap& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
@@ -3529,25 +3505,6 @@ void unpack(TableContainer& data, std::vector<char>& buffer, int& position,
}
}
void unpack(InitConfig& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
Equil equil;
FoamConfig foam;
bool filleps, hasGravity, restartRequested;
int restartStep;
std::string restartRootName;
unpack(equil, buffer, position, comm);
unpack(foam, buffer, position, comm);
unpack(filleps, buffer, position, comm);
unpack(hasGravity, buffer, position, comm);
unpack(restartRequested, buffer, position, comm);
unpack(restartStep, buffer, position, comm);
unpack(restartRootName, buffer, position, comm);
data = InitConfig(equil, foam, filleps, hasGravity,
restartRequested, restartStep, restartRootName);
}
void unpack(TimeMap& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{

View File

@@ -80,7 +80,6 @@ class EclipseConfig;
class Eqldims;
class EndpointScaling;
class Events;
class InitConfig;
class IOConfig;
template<class T> class IOrderSet;
class JFunc;
@@ -528,7 +527,6 @@ ADD_PACK_PROTOTYPES(GuideRateModel)
ADD_PACK_PROTOTYPES(Group)
ADD_PACK_PROTOTYPES(Group::GroupInjectionProperties)
ADD_PACK_PROTOTYPES(Group::GroupProductionProperties)
ADD_PACK_PROTOTYPES(InitConfig)
ADD_PACK_PROTOTYPES(IOConfig)
ADD_PACK_PROTOTYPES(JFunc)
ADD_PACK_PROTOTYPES(Location)

View File

@@ -835,7 +835,7 @@ BOOST_AUTO_TEST_CASE(InitConfig)
Opm::InitConfig val1(Opm::Equil({getEquilRecord(), getEquilRecord()}),
getFoamConfig(),
true, true, true, 20, "test1");
auto val2 = PackUnpack(val1);
auto val2 = PackUnpack2(val1);
DO_CHECKS(InitConfig)
#endif
}