mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #2981 from joakim-hove/skip-prev-closed-well
Skip previously shut wells in WellState init
This commit is contained in:
@@ -189,8 +189,12 @@ namespace Opm
|
|||||||
auto it = prevState->wellMap().find(well.name());
|
auto it = prevState->wellMap().find(well.name());
|
||||||
if ( it != end )
|
if ( it != end )
|
||||||
{
|
{
|
||||||
const int oldIndex = (*it).second[ 0 ];
|
|
||||||
const int newIndex = w;
|
const int newIndex = w;
|
||||||
|
const int oldIndex = it->second[ 0 ];
|
||||||
|
if (prevState->status_[oldIndex] == Well::Status::SHUT) {
|
||||||
|
// Well was shut in previous state, do not use its values.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// bhp
|
// bhp
|
||||||
bhp()[ newIndex ] = prevState->bhp()[ oldIndex ];
|
bhp()[ newIndex ] = prevState->bhp()[ oldIndex ];
|
||||||
|
|||||||
Reference in New Issue
Block a user