diff --git a/opm/simulators/wells/BlackoilWellModel_impl.hpp b/opm/simulators/wells/BlackoilWellModel_impl.hpp index 4a49e298f..0415984e0 100644 --- a/opm/simulators/wells/BlackoilWellModel_impl.hpp +++ b/opm/simulators/wells/BlackoilWellModel_impl.hpp @@ -233,7 +233,8 @@ namespace Opm { // the case of failed iterations this->commitWGState(); - this->wellStructureChangedDynamically_ = false; + //NB should check if anything is changed for now recreate all wells + this->wellStructureChangedDynamically_ = true; } @@ -362,7 +363,7 @@ namespace Opm { // structure change. That way we don't end up here in // subsequent calls to beginTimeStep() unless there's a new // dynamic change to the well structure during a report step. - this->wellStructureChangedDynamically_ = false; + //this->wellStructureChangedDynamically_ = false; } this->resetWGState(); @@ -784,8 +785,10 @@ namespace Opm { DeferredLogger local_deferredLogger; const int nw = this->numLocalWells(); - - well_container_.clear(); + if(this->wellStructureChangedDynamically_ == true){ + well_container_.clear(); + this->wellStructureChangedDynamically_ = false; + } if (nw > 0) { well_container_.reserve(nw);