remove old serialization support for Valve

This commit is contained in:
Arne Morten Kvarving 2020-03-18 09:29:02 +01:00
parent 2bb892139d
commit e53584ffec
3 changed files with 1 additions and 57 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/Valve.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/RFTConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleTypes.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunction.hpp>
@ -346,19 +345,6 @@ std::size_t packSize(const UDAValue& data,
packSize(data.get<std::string>(), comm));
}
std::size_t packSize(const Valve& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.conFlowCoefficient(), comm) +
packSize(data.conCrossArea(), comm) +
packSize(data.conMaxCrossArea(), comm) +
packSize(data.pipeAdditionalLength(), comm) +
packSize(data.pipeDiameter(), comm) +
packSize(data.pipeRoughness(), comm) +
packSize(data.pipeCrossArea(), comm) +
packSize(data.status(), comm);
}
std::size_t packSize(const Segment& data,
Dune::MPIHelper::MPICommunicator comm)
{
@ -818,20 +804,6 @@ void pack(const UDAValue& data,
pack(data.get<std::string>(), buffer, position, comm);
}
void pack(const Valve& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.conFlowCoefficient(), buffer, position, comm);
pack(data.conCrossArea(), buffer, position, comm);
pack(data.conMaxCrossArea(), buffer, position, comm);
pack(data.pipeAdditionalLength(), buffer, position, comm);
pack(data.pipeDiameter(), buffer, position, comm);
pack(data.pipeRoughness(), buffer, position, comm);
pack(data.pipeCrossArea(), buffer, position, comm);
pack(data.status(), buffer, position, comm);
}
void pack(const Segment& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
@ -1340,32 +1312,6 @@ void unpack(UDAValue& data,
}
}
void unpack(Valve& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
double conFlowCoefficient;
double conCrossArea;
double conMaxCrossArea;
double pipeAdditionalLength;
double pipeDiameter;
double pipeRoughness;
double pipeCrossArea;
ICDStatus status;
unpack(conFlowCoefficient, buffer, position, comm);
unpack(conCrossArea, buffer, position, comm);
unpack(conMaxCrossArea, buffer, position, comm);
unpack(pipeAdditionalLength, buffer, position, comm);
unpack(pipeDiameter, buffer, position, comm);
unpack(pipeRoughness, buffer, position, comm);
unpack(pipeCrossArea, buffer, position, comm);
unpack(status, buffer, position, comm);
data = Valve(conFlowCoefficient, conCrossArea, conMaxCrossArea,
pipeAdditionalLength, pipeDiameter, pipeRoughness,
pipeCrossArea, status);
}
void unpack(Segment& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)

View File

@ -47,7 +47,6 @@ template<class T> class IOrderSet;
class Segment;
class UDAValue;
class UnitSystem;
class Valve;
class VFPInjTable;
class VFPProdTable;
class WellSegments;
@ -378,7 +377,6 @@ ADD_PACK_PROTOTYPES(Segment)
ADD_PACK_PROTOTYPES(std::string)
ADD_PACK_PROTOTYPES(UDAValue)
ADD_PACK_PROTOTYPES(UnitSystem)
ADD_PACK_PROTOTYPES(Valve)
ADD_PACK_PROTOTYPES(VFPInjTable)
ADD_PACK_PROTOTYPES(VFPProdTable)
ADD_PACK_PROTOTYPES(Well)

View File

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