remove old serialization support for WellTestConfig

This commit is contained in:
Arne Morten Kvarving 2020-03-17 15:40:52 +01:00
parent a936523165
commit 778f1cfb8e
3 changed files with 2 additions and 64 deletions

View File

@ -360,23 +360,6 @@ std::size_t packSize(const VFPProdTable& data,
packSize(data.getTable(), comm);
}
std::size_t packSize(const WellTestConfig::WTESTWell& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.name, comm) +
packSize(data.shut_reason, comm) +
packSize(data.test_interval, comm) +
packSize(data.num_test, comm) +
packSize(data.startup_time, comm) +
packSize(data.begin_report_step, comm);
}
std::size_t packSize(const WellTestConfig& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.getWells(), comm);
}
std::size_t packSize(const WellTracerProperties& data,
Dune::MPIHelper::MPICommunicator comm)
{
@ -1177,25 +1160,6 @@ void pack(const VFPProdTable& data,
pack(data.getTable(), buffer, position, comm);
}
void pack(const WellTestConfig::WTESTWell& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.name, buffer, position, comm);
pack(data.shut_reason, buffer, position, comm);
pack(data.test_interval, buffer, position, comm);
pack(data.num_test, buffer, position, comm);
pack(data.startup_time, buffer, position, comm);
pack(data.begin_report_step, buffer, position, comm);
}
void pack(const WellTestConfig& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.getWells(), buffer, position, comm);
}
void pack(const WellTracerProperties& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
@ -2073,27 +2037,6 @@ void unpack(VFPProdTable& data,
wfrAxis, gfrAxis, alqAxis, table);
}
void unpack(WellTestConfig::WTESTWell& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
unpack(data.name, buffer, position, comm);
unpack(data.shut_reason, buffer, position, comm);
unpack(data.test_interval, buffer, position, comm);
unpack(data.num_test, buffer, position, comm);
unpack(data.startup_time, buffer, position, comm);
unpack(data.begin_report_step, buffer, position, comm);
}
void unpack(WellTestConfig& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::vector<WellTestConfig::WTESTWell> ddata;
unpack(ddata, buffer, position, comm);
data = WellTestConfig(ddata);
}
void unpack(WellTracerProperties& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
@ -2945,7 +2888,6 @@ template void unpack(std::shared_ptr<__VA_ARGS__>& data, \
INSTANTIATE_PACK_SHARED_PTR(SpiralICD)
INSTANTIATE_PACK_SHARED_PTR(VFPInjTable)
INSTANTIATE_PACK_SHARED_PTR(Well)
INSTANTIATE_PACK_SHARED_PTR(WellTestConfig)
#undef INSTANTIATE_PACK_SHARED_PTR
#define INSTANTIATE_PACK(...) \
@ -2981,7 +2923,6 @@ INSTANTIATE_PACK(DynamicState<std::shared_ptr<GConSale>>)
INSTANTIATE_PACK(DynamicState<std::shared_ptr<GConSump>>)
INSTANTIATE_PACK(DynamicState<std::shared_ptr<GuideRateConfig>>)
INSTANTIATE_PACK(DynamicState<Well::ProducerCMode>)
INSTANTIATE_PACK(DynamicState<std::shared_ptr<WellTestConfig>>)
INSTANTIATE_PACK(DynamicState<std::shared_ptr<WListManager>>)
INSTANTIATE_PACK(DynamicVector<Deck>)

View File

@ -33,7 +33,6 @@
#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Group/GuideRateConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp>
#include <dune/common/parallel/mpihelper.hh>
@ -450,8 +449,6 @@ ADD_PACK_PROTOTYPES(WellEconProductionLimits)
ADD_PACK_PROTOTYPES(WellFoamProperties)
ADD_PACK_PROTOTYPES(WellPolymerProperties)
ADD_PACK_PROTOTYPES(WellSegments)
ADD_PACK_PROTOTYPES(WellTestConfig)
ADD_PACK_PROTOTYPES(WellTestConfig::WTESTWell)
ADD_PACK_PROTOTYPES(WellTracerProperties)
ADD_PACK_PROTOTYPES(WList)
ADD_PACK_PROTOTYPES(WListManager)

View File

@ -1341,7 +1341,7 @@ BOOST_AUTO_TEST_CASE(WTESTWell)
#ifdef HAVE_MPI
Opm::WellTestConfig::WTESTWell val1{"test", Opm::WellTestConfig::ECONOMIC,
1.0, 2, 3.0, 4};
auto val2 = PackUnpack(val1);
auto val2 = PackUnpack2(val1);
DO_CHECKS(WellTestConfig::WTESTWell)
#endif
}
@ -1353,7 +1353,7 @@ BOOST_AUTO_TEST_CASE(WellTestConfig)
Opm::WellTestConfig::WTESTWell tw{"test", Opm::WellTestConfig::ECONOMIC,
1.0, 2, 3.0, 4};
Opm::WellTestConfig val1({tw, tw, tw});
auto val2 = PackUnpack(val1);
auto val2 = PackUnpack2(val1);
DO_CHECKS(WellTestConfig)
#endif
}