mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add serialization for WellType
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/RFTConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleTypes.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.hpp>
|
||||
@@ -531,6 +532,12 @@ std::size_t packSize(const ThresholdPressure& data, Dune::MPIHelper::MPICommunic
|
||||
packSize(data.pressureTable(), comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const WellType& data, Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.producer(), comm) +
|
||||
packSize(data.preferred_phase(), comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const DenT& data, Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.records(), comm);
|
||||
@@ -2220,6 +2227,12 @@ void pack(const Aquifetp::AQUFETP_data& data, std::vector<char>& buffer, int& po
|
||||
pack(data.p0, buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const WellType& data, std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm) {
|
||||
pack(data.producer(), buffer, position, comm);
|
||||
pack(data.preferred_phase(), buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const DenT& data, std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm) {
|
||||
pack(data.records(), buffer, position, comm);
|
||||
@@ -4024,6 +4037,17 @@ void unpack(AquiferCT::AQUCT_data& data, std::vector<char>& buffer, int& positio
|
||||
}
|
||||
|
||||
|
||||
void unpack(WellType& data, std::vector<char>& buffer, int& position, Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
Phase preferred_phase;
|
||||
bool producer;
|
||||
unpack(producer, buffer, position, comm);
|
||||
unpack(preferred_phase, buffer, position, comm);
|
||||
data = WellType( producer, phase );
|
||||
}
|
||||
|
||||
|
||||
|
||||
void unpack(DenT& data, std::vector<char>& buffer, int& position, Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
std::vector<DenT::entry> records;
|
||||
|
||||
Reference in New Issue
Block a user