Use enum Well::Status to indicate well status instead of bool

This commit is contained in:
Joakim Hove
2020-12-09 10:44:24 +01:00
committed by Bård Skaflestad
parent 0468b2eee6
commit 9662d4019e
6 changed files with 15 additions and 14 deletions

View File

@@ -892,7 +892,7 @@ namespace Opm
return rates;
};
if (wellIsStopped_) {
if (this->wellIsStopped()) {
control_eq = getWQTotal();
} else if (this->isInjector()) {
// Find injection rate.
@@ -1365,7 +1365,7 @@ namespace Opm
const int np = well_state.numPhases();
const auto& summaryState = ebos_simulator.vanguard().summaryState();
if (wellIsStopped_) {
if (this->wellIsStopped()) {
for (int p = 0; p<np; ++p) {
well_state.wellRates()[well_index*np + p] = 0.0;
}
@@ -3490,7 +3490,7 @@ namespace Opm
CR::WellFailure::Type ctrltype = CR::WellFailure::Type::Invalid;
const int well_index = index_of_well_;
if (wellIsStopped_) {
if (this->wellIsStopped()) {
ctrltype = CR::WellFailure::Type::ControlRate;
control_tolerance = 1.e-6; // use smaller tolerance for zero control?
}