remove old serialization support for SpiralICD

This commit is contained in:
Arne Morten Kvarving 2020-03-18 09:29:02 +01:00
parent 41950690fd
commit 2bb892139d
3 changed files with 1 additions and 69 deletions

View File

@ -24,7 +24,6 @@
#include "ParallelRestart.hpp"
#include <opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/icd.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/SpiralICD.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/Valve.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/RFTConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleTypes.hpp>
@ -347,22 +346,6 @@ std::size_t packSize(const UDAValue& data,
packSize(data.get<std::string>(), comm));
}
std::size_t packSize(const SpiralICD& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.strength(), comm) +
packSize(data.length(), comm) +
packSize(data.densityCalibration(), comm) +
packSize(data.viscosityCalibration(), comm) +
packSize(data.criticalValue(), comm) +
packSize(data.widthTransitionRegion(), comm) +
packSize(data.maxViscosityRatio(), comm) +
packSize(data.methodFlowScaling(), comm) +
packSize(data.maxAbsoluteRate(), comm) +
packSize(data.status(), comm) +
packSize(data.scalingFactor(), comm);
}
std::size_t packSize(const Valve& data,
Dune::MPIHelper::MPICommunicator comm)
{
@ -835,23 +818,6 @@ void pack(const UDAValue& data,
pack(data.get<std::string>(), buffer, position, comm);
}
void pack(const SpiralICD& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.strength(), buffer, position, comm);
pack(data.length(), buffer, position, comm);
pack(data.densityCalibration(), buffer, position, comm);
pack(data.viscosityCalibration(), buffer, position, comm);
pack(data.criticalValue(), buffer, position, comm);
pack(data.widthTransitionRegion(), buffer, position, comm);
pack(data.maxViscosityRatio(), buffer, position, comm);
pack(data.methodFlowScaling(), buffer, position, comm);
pack(data.maxAbsoluteRate(), buffer, position, comm);
pack(data.status(), buffer, position, comm);
pack(data.scalingFactor(), buffer, position, comm);
}
void pack(const Valve& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
@ -1374,37 +1340,6 @@ void unpack(UDAValue& data,
}
}
void unpack(SpiralICD& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
double strength, length, densityCalibration,
viscosityCalibration, criticalValue,
widthTransitionRegion, maxViscosityRatio;
int methodFlowScaling;
double maxAbsoluteRate;
ICDStatus status;
double scalingFactor;
unpack(strength, buffer, position, comm);
unpack(length, buffer, position, comm);
unpack(densityCalibration, buffer, position, comm);
unpack(viscosityCalibration, buffer, position, comm);
unpack(criticalValue, buffer, position, comm);
unpack(widthTransitionRegion, buffer, position, comm);
unpack(maxViscosityRatio, buffer, position, comm);
unpack(methodFlowScaling, buffer, position, comm);
unpack(maxAbsoluteRate, buffer, position, comm);
unpack(status, buffer, position, comm);
unpack(scalingFactor, buffer, position, comm);
data = SpiralICD(strength, length, densityCalibration,
viscosityCalibration, criticalValue,
widthTransitionRegion, maxViscosityRatio,
methodFlowScaling, maxAbsoluteRate,
status, scalingFactor);
}
void unpack(Valve& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
@ -1740,7 +1675,6 @@ template void unpack(std::shared_ptr<__VA_ARGS__>& data, \
std::vector<char>& buffer, int& position, \
Dune::MPIHelper::MPICommunicator comm);
INSTANTIATE_PACK_SHARED_PTR(SpiralICD)
INSTANTIATE_PACK_SHARED_PTR(VFPInjTable)
INSTANTIATE_PACK_SHARED_PTR(Well)
#undef INSTANTIATE_PACK_SHARED_PTR

View File

@ -45,7 +45,6 @@ namespace Opm
class Dimension;
template<class T> class IOrderSet;
class Segment;
class SpiralICD;
class UDAValue;
class UnitSystem;
class Valve;
@ -376,7 +375,6 @@ ADD_PACK_PROTOTYPES(Group::GroupProductionProperties)
ADD_PACK_PROTOTYPES(RestartKey)
ADD_PACK_PROTOTYPES(RestartValue)
ADD_PACK_PROTOTYPES(Segment)
ADD_PACK_PROTOTYPES(SpiralICD)
ADD_PACK_PROTOTYPES(std::string)
ADD_PACK_PROTOTYPES(UDAValue)
ADD_PACK_PROTOTYPES(UnitSystem)

View File

@ -1509,7 +1509,7 @@ BOOST_AUTO_TEST_CASE(SpiralICD)
#ifdef HAVE_MPI
Opm::SpiralICD val1(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8, 9.0,
Opm::ICDStatus::OPEN, 10.0);
auto val2 = PackUnpack(val1);
auto val2 = PackUnpack2(val1);
DO_CHECKS(SpiralICD)
#endif
}