Store WELPI Scaling Eligibility as Per-Connection Flag
Greatly simplifies logic in container class (WellConnection). Suggested by: [at]joakim-hove
This commit is contained in:
@@ -122,6 +122,8 @@ namespace RestartIO {
|
||||
void setState(State state);
|
||||
void setComplnum(int compnum);
|
||||
void scaleWellPi(double wellPi);
|
||||
bool prepareWellPIScaling();
|
||||
void applyWellPIScaling(const double scaleFactor);
|
||||
void updateSegmentRST(int segment_number_arg,
|
||||
double center_depth_arg);
|
||||
void updateSegment(int segment_number_arg,
|
||||
@@ -161,6 +163,7 @@ namespace RestartIO {
|
||||
serializer(m_perf_range);
|
||||
serializer(m_defaultSatTabId);
|
||||
serializer(segment_number);
|
||||
serializer(m_subject_to_welpi);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -238,6 +241,9 @@ namespace RestartIO {
|
||||
// 0 means the completion is not related to segment
|
||||
int segment_number = 0;
|
||||
|
||||
// Whether or not this Connection is subject to WELPI scaling.
|
||||
bool m_subject_to_welpi = false;
|
||||
|
||||
static std::string CTFKindToString(const CTFKind);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -121,8 +121,6 @@ namespace Opm {
|
||||
serializer(headI);
|
||||
serializer(headJ);
|
||||
serializer.vector(m_connections);
|
||||
serializer(m_hasWellPIAdjustment);
|
||||
serializer(m_wellPIConnections);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -154,23 +152,9 @@ namespace Opm {
|
||||
void orderTRACK();
|
||||
void orderMSW();
|
||||
|
||||
// Exclude specific connection from WELPI CF scaling. No action unless
|
||||
// this connection set has been prepared for WELPI.
|
||||
void excludeFromWellPI(const std::size_t connID);
|
||||
|
||||
Connection::Order m_ordering = Connection::Order::TRACK;
|
||||
int headI, headJ;
|
||||
std::vector< Connection > m_connections;
|
||||
|
||||
// Backing data for 'WELPI'.
|
||||
// 1. No adjustment if this set of connections has not been prepared
|
||||
// for WELPI (m_hasWellPIAdjustment == false, default value).
|
||||
//
|
||||
// 2. Otherwise, scale Connection::CF() by supplied scaling factor
|
||||
// for those connections that are marked in m_wellPIConnections.
|
||||
// Apply scaling to all connections if m_wellPIConnections.empty().
|
||||
bool m_hasWellPIAdjustment{false};
|
||||
std::vector<bool> m_wellPIConnections{};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user