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:
Markus Blatt
2015-09-05 20:17:43 +02:00
parent 6f0f90d1b6
commit 4cc87c28f6
2 changed files with 43 additions and 30 deletions

View File

@@ -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_; }