mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-03 21:16:54 -06:00
remove old serialization support for Segment
This commit is contained in:
parent
e53584ffec
commit
fde0e42e8d
@ -345,25 +345,6 @@ std::size_t packSize(const UDAValue& data,
|
||||
packSize(data.get<std::string>(), comm));
|
||||
}
|
||||
|
||||
std::size_t packSize(const Segment& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.segmentNumber(), comm) +
|
||||
packSize(data.branchNumber(), comm) +
|
||||
packSize(data.outletSegment(), comm) +
|
||||
packSize(data.inletSegments(), comm) +
|
||||
packSize(data.totalLength(), comm) +
|
||||
packSize(data.depth(), comm) +
|
||||
packSize(data.internalDiameter(), comm) +
|
||||
packSize(data.roughness(), comm) +
|
||||
packSize(data.crossArea(), comm) +
|
||||
packSize(data.volume(), comm) +
|
||||
packSize(data.dataReady(), comm) +
|
||||
packSize(data.segmentType(), comm) +
|
||||
packSize(data.spiralICD(), comm) +
|
||||
packSize(data.getValve(), comm);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
std::size_t packSize(const std::shared_ptr<T>& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
@ -804,26 +785,6 @@ void pack(const UDAValue& data,
|
||||
pack(data.get<std::string>(), buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const Segment& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.segmentNumber(), buffer, position, comm);
|
||||
pack(data.branchNumber(), buffer, position, comm);
|
||||
pack(data.outletSegment(), buffer, position, comm);
|
||||
pack(data.inletSegments(), buffer, position, comm);
|
||||
pack(data.totalLength(), buffer, position, comm);
|
||||
pack(data.depth(), buffer, position, comm);
|
||||
pack(data.internalDiameter(), buffer, position, comm);
|
||||
pack(data.roughness(), buffer, position, comm);
|
||||
pack(data.crossArea(), buffer, position, comm);
|
||||
pack(data.volume(), buffer, position, comm);
|
||||
pack(data.dataReady(), buffer, position, comm);
|
||||
pack(data.segmentType(), buffer, position, comm);
|
||||
pack(data.spiralICD(), buffer, position, comm);
|
||||
pack(data.getValve(), buffer, position, comm);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void pack(const std::shared_ptr<T>& data, std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
@ -1312,38 +1273,6 @@ void unpack(UDAValue& data,
|
||||
}
|
||||
}
|
||||
|
||||
void unpack(Segment& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
int segmentNumber, branchNumber, outletSegment;
|
||||
std::vector<int> inletSegments;
|
||||
double totalLength, depth, internalDiameter, roughness, crossArea, volume;
|
||||
bool dataReady;
|
||||
Segment::SegmentType segmentType;
|
||||
std::shared_ptr<SpiralICD> spiralICD;
|
||||
std::shared_ptr<Valve> valve;
|
||||
|
||||
unpack(segmentNumber, buffer, position, comm);
|
||||
unpack(branchNumber, buffer, position, comm);
|
||||
unpack(outletSegment, buffer, position, comm);
|
||||
unpack(inletSegments, buffer, position, comm);
|
||||
unpack(totalLength, buffer, position, comm);
|
||||
unpack(depth, buffer, position, comm);
|
||||
unpack(internalDiameter, buffer, position, comm);
|
||||
unpack(roughness, buffer, position, comm);
|
||||
unpack(crossArea, buffer, position, comm);
|
||||
unpack(volume, buffer, position, comm);
|
||||
unpack(dataReady, buffer, position, comm);
|
||||
unpack(segmentType, buffer, position, comm);
|
||||
unpack(spiralICD, buffer, position, comm);
|
||||
unpack(valve, buffer, position, comm);
|
||||
data = Segment(segmentNumber, branchNumber, outletSegment,
|
||||
inletSegments, totalLength, depth,
|
||||
internalDiameter, roughness, crossArea,
|
||||
volume, dataReady, segmentType, spiralICD, valve);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void unpack(std::shared_ptr<T>& data, std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
|
@ -44,7 +44,6 @@ namespace Opm
|
||||
|
||||
class Dimension;
|
||||
template<class T> class IOrderSet;
|
||||
class Segment;
|
||||
class UDAValue;
|
||||
class UnitSystem;
|
||||
class VFPInjTable;
|
||||
@ -373,7 +372,6 @@ ADD_PACK_PROTOTYPES(Group::GroupInjectionProperties)
|
||||
ADD_PACK_PROTOTYPES(Group::GroupProductionProperties)
|
||||
ADD_PACK_PROTOTYPES(RestartKey)
|
||||
ADD_PACK_PROTOTYPES(RestartValue)
|
||||
ADD_PACK_PROTOTYPES(Segment)
|
||||
ADD_PACK_PROTOTYPES(std::string)
|
||||
ADD_PACK_PROTOTYPES(UDAValue)
|
||||
ADD_PACK_PROTOTYPES(UnitSystem)
|
||||
|
@ -1532,7 +1532,7 @@ BOOST_AUTO_TEST_CASE(Segment)
|
||||
Opm::Segment::SegmentType::SICD,
|
||||
std::make_shared<Opm::SpiralICD>(),
|
||||
std::make_shared<Opm::Valve>());
|
||||
auto val2 = PackUnpack(val1);
|
||||
auto val2 = PackUnpack2(val1);
|
||||
DO_CHECKS(Segment)
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user