This commit is contained in:
Halvor Møll Nilsen 2025-02-14 20:42:09 +01:00 committed by GitHub
commit fd1f3ac226
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -233,7 +233,8 @@ namespace Opm {
// the case of failed iterations // the case of failed iterations
this->commitWGState(); 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 // structure change. That way we don't end up here in
// subsequent calls to beginTimeStep() unless there's a new // subsequent calls to beginTimeStep() unless there's a new
// dynamic change to the well structure during a report step. // dynamic change to the well structure during a report step.
this->wellStructureChangedDynamically_ = false; //this->wellStructureChangedDynamically_ = false;
} }
this->resetWGState(); this->resetWGState();
@ -784,8 +785,10 @@ namespace Opm {
DeferredLogger local_deferredLogger; DeferredLogger local_deferredLogger;
const int nw = this->numLocalWells(); const int nw = this->numLocalWells();
if(this->wellStructureChangedDynamically_ == true){
well_container_.clear(); well_container_.clear();
this->wellStructureChangedDynamically_ = false;
}
if (nw > 0) { if (nw > 0) {
well_container_.reserve(nw); well_container_.reserve(nw);