remove old serialization support for FoamConfig, FoamData

This commit is contained in:
Arne Morten Kvarving 2020-03-13 10:21:26 +01:00
parent 542a10e426
commit 0dfdb29851
3 changed files with 2 additions and 73 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/FoamConfig.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>
@ -540,13 +539,6 @@ std::size_t packSize(const TableContainer& data, Dune::MPIHelper::MPICommunicato
return res;
}
std::size_t packSize(const FoamConfig& data, Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.records(), comm) +
packSize(data.getTransportPhase(), comm) +
packSize(data.getMobilityModel(), comm);
}
std::size_t packSize(const InitConfig& data, Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.getEquil(), comm) +
@ -1441,16 +1433,6 @@ std::size_t packSize(const PvtwsaltTable& data,
packSize(data.getTableValues(), comm);
}
std::size_t packSize(const FoamData& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.referenceSurfactantConcentration(), comm) +
packSize(data.exponent(), comm) +
packSize(data.minimumSurfactantConcentration(), comm) +
packSize(data.allowDesorption(), comm) +
packSize(data.rockDensity(), comm);
}
std::size_t packSize(const RestartSchedule& data,
Dune::MPIHelper::MPICommunicator comm)
{
@ -1981,14 +1963,6 @@ void pack(const TableContainer& data, std::vector<char>& buffer, int& position,
}
}
void pack(const FoamConfig& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.records(), buffer, position, comm);
pack(data.getTransportPhase(), buffer, position, comm);
pack(data.getMobilityModel(), buffer, position, comm);
}
void pack(const InitConfig& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
@ -2910,17 +2884,6 @@ void pack(const PvtwsaltTable& data,
pack(data.getTableValues(), buffer, position, comm);
}
void pack(const FoamData& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.referenceSurfactantConcentration(), buffer, position, comm);
pack(data.exponent(), buffer, position, comm);
pack(data.minimumSurfactantConcentration(), buffer, position, comm);
pack(data.allowDesorption(), buffer, position, comm);
pack(data.rockDensity(), buffer, position, comm);
}
void pack(const RestartSchedule& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
@ -3566,18 +3529,6 @@ void unpack(TableContainer& data, std::vector<char>& buffer, int& position,
}
}
void unpack(FoamConfig& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::vector<FoamData> records;
Phase transport_phase;
FoamConfig::MobilityModel mobility_model;
unpack(records, buffer, position, comm);
unpack(transport_phase, buffer, position, comm);
unpack(mobility_model, buffer, position, comm);
data = FoamConfig(records, transport_phase, mobility_model);
}
void unpack(InitConfig& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
@ -4973,24 +4924,6 @@ void unpack(PvtwsaltTable& data, std::vector<char>& buffer, int& position,
data = PvtwsaltTable(refPressValue, refSaltConValue, tableValues);
}
void unpack(FoamData& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
double referenceSurfactantConcentration, exponent;
double minimumSurfactantConcentration;
bool allowDesorption;
double rockDensity;
unpack(referenceSurfactantConcentration, buffer, position, comm);
unpack(exponent, buffer, position, comm);
unpack(minimumSurfactantConcentration, buffer, position, comm);
unpack(allowDesorption, buffer, position, comm);
unpack(rockDensity, buffer, position, comm);
data = FoamData(referenceSurfactantConcentration, exponent,
minimumSurfactantConcentration, allowDesorption, rockDensity);
}
void unpack(RestartSchedule& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)

View File

@ -80,8 +80,6 @@ class EclipseConfig;
class Eqldims;
class EndpointScaling;
class Events;
class FoamConfig;
class FoamData;
class InitConfig;
class IOConfig;
template<class T> class IOrderSet;
@ -519,8 +517,6 @@ ADD_PACK_PROTOTYPES(EclipseConfig)
ADD_PACK_PROTOTYPES(EndpointScaling)
ADD_PACK_PROTOTYPES(Eqldims)
ADD_PACK_PROTOTYPES(Events)
ADD_PACK_PROTOTYPES(FoamConfig)
ADD_PACK_PROTOTYPES(FoamData)
ADD_PACK_PROTOTYPES(GConSale)
ADD_PACK_PROTOTYPES(GConSale::GCONSALEGroup)
ADD_PACK_PROTOTYPES(GConSump)

View File

@ -813,7 +813,7 @@ BOOST_AUTO_TEST_CASE(FoamData)
{
#if HAVE_MPI
Opm::FoamData val1 = getFoamData();
auto val2 = PackUnpack(val1);
auto val2 = PackUnpack2(val1);
DO_CHECKS(FoamData)
#endif
}
@ -823,7 +823,7 @@ BOOST_AUTO_TEST_CASE(FoamConfig)
{
#if HAVE_MPI
Opm::FoamConfig val1 = getFoamConfig();
auto val2 = PackUnpack(val1);
auto val2 = PackUnpack2(val1);
DO_CHECKS(FoamConfig)
#endif
}