diff --git a/opm/simulators/timestepping/TimeStepControl.cpp b/opm/simulators/timestepping/TimeStepControl.cpp index d72251b1c..c88dd433c 100644 --- a/opm/simulators/timestepping/TimeStepControl.cpp +++ b/opm/simulators/timestepping/TimeStepControl.cpp @@ -192,7 +192,7 @@ namespace Opm OpmLog::info(fmt::format("Computed step size (tol): {} days", unit::convert::to( newDt, unit::day ))); return newDt; } - else if (errors_[1] == 0 || errors_[2] == 0.) + else if (errors_[0] == 0 || errors_[1] == 0 || errors_[2] == 0.) { if ( verbose_ ) OpmLog::info("The solution between time steps does not change, there is no time step constraint from the PID time step control "); @@ -206,7 +206,7 @@ namespace Opm const double kD = 0.01 ; const double newDt = (dt * std::pow( errors_[ 1 ] / errors_[ 2 ], kP ) * std::pow( tol_ / errors_[ 2 ], kI ) * - std::pow( errors_[0]*errors_[0]/errors_[ 1 ]/errors_[ 2 ], kD )); + std::pow( errors_[1]*errors_[1]/errors_[ 0 ]/errors_[ 2 ], kD )); if( verbose_ ) OpmLog::info(fmt::format("Computed step size (pow): {} days", unit::convert::to( newDt, unit::day ))); return newDt; diff --git a/parallelTests.cmake b/parallelTests.cmake index d1301d290..626128d66 100644 --- a/parallelTests.cmake +++ b/parallelTests.cmake @@ -201,9 +201,9 @@ add_test_compare_parallel_simulation(CASENAME 3_a_mpi_multflt_mod2 FILENAME 3_A_MPI_MULTFLT_SCHED_MODEL2 SIMULATOR flow ABS_TOL ${abs_tol_parallel} - REL_TOL ${rel_tol_parallel} - DIR model2 - TEST_ARGS --linear-solver-reduction=1e-7 --tolerance-cnv=5e-6 --tolerance-mb=1e-8 --enable-drift-compensation=false) + REL_TOL 1.0e-3 + DIR model2 + TEST_ARGS --linear-solver-reduction=1e-7 --tolerance-cnv=5e-6 --tolerance-mb=1e-8 --newton-max-iterations=30 --enable-drift-compensation=false) add_test_compare_parallel_simulation(CASENAME rxft FILENAME TEST_RXFT