Use WellType when serializing and constructing Well

This commit is contained in:
Joakim Hove
2020-03-03 17:43:58 +01:00
parent 69871fdefd
commit 3ab0e570c7
2 changed files with 11 additions and 14 deletions

View File

@@ -1264,7 +1264,7 @@ std::size_t packSize(const Well& data,
packSize(data.getHeadI(), comm) +
packSize(data.getHeadJ(), comm) +
packSize(data.getRefDepth(), comm) +
packSize(data.getPreferredPhase(), comm) +
packSize(data.wellType(), comm) +
packSize(data.getWellConnectionOrdering(), comm) +
packSize(data.units(), comm) +
packSize(data.udqUndefined(), comm) +
@@ -1272,7 +1272,6 @@ std::size_t packSize(const Well& data,
packSize(data.getDrainageRadius(), comm) +
packSize(data.getAllowCrossFlow(), comm) +
packSize(data.getAutomaticShutIn(), comm) +
packSize(data.isProducer(), comm) +
packSize(data.wellGuideRate(), comm) +
packSize(data.getEfficiencyFactor(), comm) +
packSize(data.getSolventFraction(), comm) +
@@ -2912,7 +2911,7 @@ void pack(const Well& data,
pack(data.getHeadI(), buffer, position, comm);
pack(data.getHeadJ(), buffer, position, comm);
pack(data.getRefDepth(), buffer, position, comm);
pack(data.getPreferredPhase(), buffer, position, comm);
pack(data.wellType(), buffer, position, comm);
pack(data.getWellConnectionOrdering(), buffer, position, comm);
pack(data.units(), buffer, position, comm);
pack(data.udqUndefined(), buffer, position, comm);
@@ -2920,7 +2919,6 @@ void pack(const Well& data,
pack(data.getDrainageRadius(), buffer, position, comm);
pack(data.getAllowCrossFlow(), buffer, position, comm);
pack(data.getAutomaticShutIn(), buffer, position, comm);
pack(data.isProducer(), buffer, position, comm);
pack(data.wellGuideRate(), buffer, position, comm);
pack(data.getEfficiencyFactor(), buffer, position, comm);
pack(data.getSolventFraction(), buffer, position, comm);
@@ -4043,7 +4041,7 @@ void unpack(WellType& data, std::vector<char>& buffer, int& position, Dune::MPIH
bool producer;
unpack(producer, buffer, position, comm);
unpack(preferred_phase, buffer, position, comm);
data = WellType( producer, phase );
data = WellType( producer, preferred_phase );
}
@@ -5091,13 +5089,13 @@ void unpack(Well& data,
std::size_t firstTimeStep, seqIndex;
int headI, headJ;
double ref_depth;
Phase phase;
WellType wtype;
Connection::Order ordering;
UnitSystem units;
double udq_undefined;
Well::Status status;
double drainageRadius;
bool allowCrossFlow, automaticShutIn, isProducer;
bool allowCrossFlow, automaticShutIn;
Well::WellGuideRate guideRate;
double efficiencyFactor;
double solventFraction;
@@ -5119,7 +5117,7 @@ void unpack(Well& data,
unpack(headI, buffer, position, comm);
unpack(headJ, buffer, position, comm);
unpack(ref_depth, buffer, position, comm);
unpack(phase, buffer, position, comm);
unpack(wtype, buffer, position, comm);
unpack(ordering, buffer, position, comm);
unpack(units, buffer, position, comm);
unpack(udq_undefined, buffer, position, comm);
@@ -5127,7 +5125,6 @@ void unpack(Well& data,
unpack(drainageRadius, buffer, position, comm);
unpack(allowCrossFlow, buffer, position, comm);
unpack(automaticShutIn, buffer, position, comm);
unpack(isProducer, buffer, position, comm);
unpack(guideRate, buffer, position, comm);
unpack(efficiencyFactor, buffer, position, comm);
unpack(solventFraction, buffer, position, comm);
@@ -5147,8 +5144,8 @@ void unpack(Well& data,
unpack(*segments, buffer, position, comm);
}
data = Well(name, groupName, firstTimeStep, seqIndex, headI, headJ,
ref_depth, phase, ordering, units, udq_undefined, status,
drainageRadius, allowCrossFlow, automaticShutIn, isProducer,
ref_depth, wtype, ordering, units, udq_undefined, status,
drainageRadius, allowCrossFlow, automaticShutIn,
guideRate, efficiencyFactor, solventFraction, prediction_mode,
econLimits, foamProperties, polymerProperties, brineProperties,
tracerProperties, connection, production, injection, segments);