mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Fixes parallel runs with solve_welleq_initially
If this option was set there were some branches in the code that did depend on the local number of wells but should depend on the number of wells in the reservoir no matter on which process they are stored. With this commit we introduce BlackOilModelBase::localWellsActive() which only takes local wells into account. The function now BlackOilModelBase::wellsActive() considers all active wells in the reservoir.
This commit is contained in:
@@ -253,6 +253,7 @@ namespace Opm {
|
||||
|
||||
ModelParameters param_;
|
||||
bool use_threshold_pressure_;
|
||||
bool wells_active_;
|
||||
V threshold_pressures_by_interior_face_;
|
||||
|
||||
std::vector<ReservoirResidualQuant> rq_;
|
||||
@@ -287,8 +288,10 @@ namespace Opm {
|
||||
return static_cast<const Implementation&>(*this);
|
||||
}
|
||||
|
||||
// return true if wells are available
|
||||
bool wellsActive() const { return wells_ ? wells_->number_of_wells > 0 : false ; }
|
||||
// return true if wells are available in the reservoir
|
||||
bool wellsActive() const { return wells_active_; }
|
||||
// return true if wells are available on this process
|
||||
bool localWellsActive() const { return wells_ ? (wells_->number_of_wells > 0 ) : false; }
|
||||
// return wells object
|
||||
const Wells& wells () const { assert( bool(wells_ != 0) ); return *wells_; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user