stepper infinite loop
Summary
When a NewtonLineSearchError
occurs the same step size is repeated indefinitely
Steps to reproduce
Simulate brusselator example model in GUI (using membranes branch of dune-copasi)
What is the current bug behaviour?
Stuck in infinite loop
What is the expected correct behaviour?
Timestep should reduce, simulation should finish
Relevant logs, screenshots, files...?
Anything that helps reproducing the bug
Expand to see logs
00:00:16.617 Increase factor: 1.5 00:00:16.617 Decrease factor: 0.5 00:00:16.617 Runge-Kutta method: alexander_2 00:00:16.617 Setting up time stepper 00:00:16.617 Stepper methd: Alexander (order 2) 00:00:16.617 Evolving system: 25.50s -> 26.00s 00:00:16.617 Trying step: 25.50s + 0.21s -> 25.71s 00:00:16.617 Get non-linear operator 00:00:16.618 Get one step operator 00:00:16.618 TIME STEP [Alexander (order 2)] 1 time (from): 2.5500e+01 dt: 2.0546e-01 time (to): 2.5705e+01 00:00:16.618 STAGE 1 time (to): 2.5560e+01. 00:00:16.643 === Dune::BiCGSTABSolver 00:00:16.644 === rate=2.217e-07, T=0.000998, TIT=inf, IT=0 00:00:16.659 === Dune::BiCGSTABSolver 00:00:16.661 === rate=3.776e-07, T=0.001888, TIT=0.001888, IT=1 00:00:16.675 === Dune::BiCGSTABSolver 00:00:16.676 === rate=7.807e-08, T=0.001001, TIT=inf, IT=0 00:00:16.682 Newton converged after 3 iterations. Reduction: 5.9287e-11 (6.1181e-02s) 00:00:16.682 STAGE 2 time (to): 2.5705e+01. 00:00:16.703 === Dune::BiCGSTABSolver 00:00:16.704 === rate=2.378e-07, T=0.0009979, TIT=inf, IT=0 00:00:16.719 === Dune::BiCGSTABSolver 00:00:16.721 === rate=3.441e-07, T=0.001873, TIT=0.001873, IT=1 00:00:16.736 === Dune::BiCGSTABSolver 00:00:16.738 === rate=1.65e-07, T=0.00187, TIT=0.00187, IT=1 00:00:16.744 Newton converged after 3 iterations. Reduction: 8.5140e-12 (5.5057e-02s) 00:00:16.744 ::: timesteps 1 (1) 00:00:16.744 ::: nl iterations 6 (6) 00:00:16.744 ::: lin iterations 3 (3) 00:00:16.744 ::: assemble time 5.0082e-02 (5.0082e-02) 00:00:16.744 ::: lin solve time 8.8332e-03 (8.8332e-03) 00:00:16.744 Time Step: 25.50s + 0.21s -> 25.71s 00:00:16.744 Stopped redirection of std::cout 00:00:16.744 Increasing step size: 0.21s -> 0.31s 00:00:16.744 Reduce step to match end time: 0.31s -> 0.29 00:00:16.744 Trying step: 25.71s + 0.29s -> 26.00s 00:00:16.744 TIME STEP [Alexander (order 2)] 2 time (from): 2.5705e+01 dt: 2.9454e-01 time (to): 2.6000e+01 00:00:16.744 STAGE 1 time (to): 2.5792e+01. 00:00:16.762 === Dune::BiCGSTABSolver 00:00:16.763 === rate=3.922e-07, T=0.001005, TIT=inf, IT=0 00:00:16.778 === Dune::BiCGSTABSolver 00:00:16.779 === rate=1.314e-07, T=0.0009983, TIT=inf, IT=0 00:00:16.793 === Dune::BiCGSTABSolver 00:00:16.795 === rate=4.439e-07, T=0.001902, TIT=0.001902, IT=1 00:00:16.801 Newton converged after 3 iterations. Reduction: 2.3010e-09 (5.3757e-02s) 00:00:16.801 STAGE 2 time (to): 2.6000e+01. 00:00:16.823 === Dune::BiCGSTABSolver 00:00:16.824 === rate=4.643e-07, T=0.0009912, TIT=inf, IT=0 00:00:16.838 === Dune::BiCGSTABSolver 00:00:16.839 === rate=6.009e-07, T=0.001013, TIT=inf, IT=0 00:00:16.854 === Dune::BiCGSTABSolver 00:00:16.858 === rate=0.001523, T=0.003725, TIT=0.001863, IT=2 00:00:16.890 === Dune::BiCGSTABSolver 00:00:16.894 === rate=0.0009026, T=0.003671, TIT=0.001836, IT=2 00:00:16.952 === Dune::BiCGSTABSolver 00:00:16.956 === rate=0.004191, T=0.003662, TIT=0.001831, IT=2 00:00:17.024 Step failed (NewtonError) 00:00:17.024 NewtonLineSearchError [line_search:/home/lkeegan/install/dune/include/dune/pdelab/newton/newton.hh:703]: NewtonLineSearch::line_search(): line search failed, max iteration count reached, defect did not improve enough 00:00:17.024 Stopped redirection of std::cout 00:00:17.024 Trying step: 25.71s + 0.29s -> 26.00s 00:00:17.024 TIME STEP [Alexander (order 2)] 2 time (from): 2.5705e+01 dt: 2.9454e-01 time (to): 2.6000e+01 00:00:17.024 STAGE 1 time (to): 2.5792e+01. 00:00:17.042 === Dune::BiCGSTABSolver 00:00:17.043 === rate=3.922e-07, T=0.001016, TIT=inf, IT=0 00:00:17.058 === Dune::BiCGSTABSolver 00:00:17.059 === rate=1.314e-07, T=0.000987, TIT=inf, IT=0 00:00:17.073 === Dune::BiCGSTABSolver 00:00:17.075 === rate=4.439e-07, T=0.001888, TIT=0.001888, IT=1 00:00:17.081 Newton converged after 3 iterations. Reduction: 2.3010e-09 (5.3635e-02s) 00:00:17.081 STAGE 2 time (to): 2.6000e+01. 00:00:17.102 === Dune::BiCGSTABSolver 00:00:17.103 === rate=4.643e-07, T=0.001001, TIT=inf, IT=0 00:00:17.118 === Dune::BiCGSTABSolver 00:00:17.119 === rate=6.009e-07, T=0.001005, TIT=inf, IT=0 00:00:17.134 === Dune::BiCGSTABSolver 00:00:17.137 === rate=0.001523, T=0.003684, TIT=0.001842, IT=2 00:00:17.170 === Dune::BiCGSTABSolver 00:00:17.174 === rate=0.0009026, T=0.003683, TIT=0.001841, IT=2 00:00:17.232 === Dune::BiCGSTABSolver 00:00:17.236 === rate=0.004191, T=0.003712, TIT=0.001856, IT=2 00:00:17.304 Step failed (NewtonError) 00:00:17.304 NewtonLineSearchError [line_search:/home/lkeegan/install/dune/include/dune/pdelab/newton/newton.hh:703]: NewtonLineSearch::line_search(): line search failed, max iteration count reached, defect did not improve enough 00:00:17.304 Stopped redirection of std::cout 00:00:17.304 Trying step: 25.71s + 0.29s -> 26.00s 00:00:17.304 TIME STEP [Alexander (order 2)] 2 time (from): 2.5705e+01 dt: 2.9454e-01 time (to): 2.6000e+01 00:00:17.304 STAGE 1 time (to): 2.5792e+01. 00:00:17.322 === Dune::BiCGSTABSolver 00:00:17.323 === rate=3.922e-07, T=0.0009902, TIT=inf, IT=0 00:00:17.338 === Dune::BiCGSTABSolver 00:00:17.339 === rate=1.314e-07, T=0.001004, TIT=inf, IT=0 00:00:17.353 === Dune::BiCGSTABSolver 00:00:17.355 === rate=4.439e-07, T=0.00188, TIT=0.00188, IT=1 00:00:17.361 Newton converged after 3 iterations. Reduction: 2.3010e-09 (5.4121e-02s) 00:00:17.361 STAGE 2 time (to): 2.6000e+01. 00:00:17.382 === Dune::BiCGSTABSolver 00:00:17.383 === rate=4.643e-07, T=0.001016, TIT=inf, IT=0 00:00:17.398 === Dune::BiCGSTABSolver 00:00:17.399 === rate=6.009e-07, T=0.001008, TIT=inf, IT=0 00:00:17.414 === Dune::BiCGSTABSolver 00:00:17.417 === rate=0.001523, T=0.003659, TIT=0.001829, IT=2 00:00:17.450 === Dune::BiCGSTABSolver 00:00:17.454 === rate=0.0009026, T=0.003672, TIT=0.001836, IT=2 00:00:17.512 === Dune::BiCGSTABSolver 00:00:17.515 === rate=0.004191, T=0.00389, TIT=0.001945, IT=2 00:00:17.583 Step failed (NewtonError) 00:00:17.583 NewtonLineSearchError [line_search:/home/lkeegan/install/dune/include/dune/pdelab/newton/newton.hh:703]: NewtonLineSearch::line_search(): line search failed, max iteration count reached, defect did not improve enough 00:00:17.583 Stopped redirection of std::cout 00:00:17.583 Trying step: 25.71s + 0.29s -> 26.00s 00:00:17.583 TIME STEP [Alexander (order 2)] 2 time (from): 2.5705e+01 dt: 2.9454e-01 time (to): 2.6000e+01 00:00:17.583 STAGE 1 time (to): 2.5792e+01. 00:00:17.601 === Dune::BiCGSTABSolver 00:00:17.602 === rate=3.922e-07, T=0.001004, TIT=inf, IT=0 00:00:17.617 === Dune::BiCGSTABSolver 00:00:17.618 === rate=1.314e-07, T=0.001006, TIT=inf, IT=0 00:00:17.633 === Dune::BiCGSTABSolver 00:00:17.635 === rate=4.439e-07, T=0.001901, TIT=0.001901, IT=1 00:00:17.641 Newton converged after 3 iterations. Reduction: 2.3010e-09 (5.4131e-02s) 00:00:17.641 STAGE 2 time (to): 2.6000e+01. 00:00:17.662 === Dune::BiCGSTABSolver 00:00:17.663 === rate=4.643e-07, T=0.0009904, TIT=inf, IT=0 00:00:17.677 === Dune::BiCGSTABSolver 00:00:17.678 === rate=6.009e-07, T=0.0009754, TIT=inf, IT=0 00:00:17.693 === Dune::BiCGSTABSolver 00:00:17.697 === rate=0.001523, T=0.003655, TIT=0.001827, IT=2 00:00:17.730 === Dune::BiCGSTABSolver 00:00:17.734 === rate=0.0009026, T=0.003729, TIT=0.001864, IT=2 00:00:17.791 === Dune::BiCGSTABSolver 00:00:17.795 === rate=0.004191, T=0.003691, TIT=0.001845, IT=2 00:00:17.863 Step failed (NewtonError) 00:00:17.863 NewtonLineSearchError [line_search:/home/lkeegan/install/dune/include/dune/pdelab/newton/newton.hh:703]: NewtonLineSearch::line_search(): line search failed, max iteration count reached, defect did not improve enough 00:00:17.863 Stopped redirection of std::cout 00:00:17.863 Trying step: 25.71s + 0.29s -> 26.00setc
Reproducing input
Do you have input files reproducing the problem? Insert them here:
Input data | |
---|---|
Simulation Case | Description goes here |
GMSH grid file | grid.msh |
Run config file | dune_compartment.ini |
Ideas how to fix this?
I haven't looked at the changes in the stepper in detail, so not sure exactly what the problem is - but adding a test case where the timestep has to decrease for the simulation to run (like the attached model) might be a good idea.