From 28a7167d61476a9b74a82d5eac78bfd64bc65a07 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Fri, 22 Sep 2017 13:41:05 +0200 Subject: [PATCH] avoiding the oscillation treatment applied to well solution it is a design to avoid some performance degeneration for parallel running. --- opm/autodiff/BlackoilModelEbos.hpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/opm/autodiff/BlackoilModelEbos.hpp b/opm/autodiff/BlackoilModelEbos.hpp index b3c5a862e..ac8d94630 100644 --- a/opm/autodiff/BlackoilModelEbos.hpp +++ b/opm/autodiff/BlackoilModelEbos.hpp @@ -301,6 +301,15 @@ namespace Opm { perfTimer.reset(); perfTimer.start(); + // handling well state update before oscillation treatment is a decision based + // on observation to avoid some big performance degeneration under some circumstances. + // there is no theorectical explanation which way is better for sure. + + if( nw > 0 ) + { + wellModel().recoverWellSolutionAndUpdateWellState(x, well_state); + } + if (param_.use_update_stabilization_) { // Stabilize the nonlinear update. bool isOscillate = false; @@ -322,10 +331,6 @@ namespace Opm { // chopping of the update. updateState(x,iteration); - if( nw > 0 ) - { - wellModel().recoverWellSolutionAndUpdateWellState(x, well_state); - } report.update_time += perfTimer.stop(); }