mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
restoring the original wellstate when solveWelleq fails.
This commit is contained in:
parent
233a275191
commit
fcd31d74ac
@ -1584,6 +1584,7 @@ namespace detail {
|
||||
std::vector<ADB> cq_s(np, ADB::null());
|
||||
std::vector<int> indices = variableWellStateIndices();
|
||||
SolutionState state0 = state;
|
||||
WellState well_state0 = well_state;
|
||||
asImpl().makeConstantState(state0);
|
||||
|
||||
std::vector<ADB> mob_perfcells_const(np, ADB::null());
|
||||
@ -1661,6 +1662,10 @@ namespace detail {
|
||||
asImpl().computeWellConnectionPressures(state, well_state);
|
||||
}
|
||||
|
||||
if (!converged) {
|
||||
well_state = well_state0;
|
||||
}
|
||||
|
||||
return converged;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user