diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index df3c8b11b2..cffa91fb6a 100644 Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ diff --git a/.doctrees/projects/Hamiltonian.doctree b/.doctrees/projects/Hamiltonian.doctree index bdfc12f065..6aa47e5994 100644 Binary files a/.doctrees/projects/Hamiltonian.doctree and b/.doctrees/projects/Hamiltonian.doctree differ diff --git a/.doctrees/projects/doc_fput.doctree b/.doctrees/projects/doc_fput.doctree index 6050aa5988..7b80d2e84d 100644 Binary files a/.doctrees/projects/doc_fput.doctree and b/.doctrees/projects/doc_fput.doctree differ diff --git a/.doctrees/pySDC/implementations.convergence_controller_classes.step_size_limiter.doctree b/.doctrees/pySDC/implementations.convergence_controller_classes.step_size_limiter.doctree index 99485a8510..a6df5c0506 100644 Binary files a/.doctrees/pySDC/implementations.convergence_controller_classes.step_size_limiter.doctree and b/.doctrees/pySDC/implementations.convergence_controller_classes.step_size_limiter.doctree differ diff --git a/.doctrees/tutorial/doc_step_2_C.doctree b/.doctrees/tutorial/doc_step_2_C.doctree index 4ea9fee403..ba6cb70d0c 100644 Binary files a/.doctrees/tutorial/doc_step_2_C.doctree and b/.doctrees/tutorial/doc_step_2_C.doctree differ diff --git a/.doctrees/tutorial/doc_step_3_B.doctree b/.doctrees/tutorial/doc_step_3_B.doctree index d120544601..94ccf36cd3 100644 Binary files a/.doctrees/tutorial/doc_step_3_B.doctree and b/.doctrees/tutorial/doc_step_3_B.doctree differ diff --git a/.doctrees/tutorial/doc_step_4_D.doctree b/.doctrees/tutorial/doc_step_4_D.doctree index 0750b3fa66..56f2f77380 100644 Binary files a/.doctrees/tutorial/doc_step_4_D.doctree and b/.doctrees/tutorial/doc_step_4_D.doctree differ diff --git a/.doctrees/tutorial/doc_step_7_A.doctree b/.doctrees/tutorial/doc_step_7_A.doctree index 1e8b7f61b7..9e35634835 100644 Binary files a/.doctrees/tutorial/doc_step_7_A.doctree and b/.doctrees/tutorial/doc_step_7_A.doctree differ diff --git a/.doctrees/tutorial/doc_step_7_B.doctree b/.doctrees/tutorial/doc_step_7_B.doctree index d26a65274f..5112f1a4d2 100644 Binary files a/.doctrees/tutorial/doc_step_7_B.doctree and b/.doctrees/tutorial/doc_step_7_B.doctree differ diff --git a/.doctrees/tutorial/doc_step_7_C.doctree b/.doctrees/tutorial/doc_step_7_C.doctree index b4c034368f..674a23ab8c 100644 Binary files a/.doctrees/tutorial/doc_step_7_C.doctree and b/.doctrees/tutorial/doc_step_7_C.doctree differ diff --git a/.doctrees/tutorial/doc_step_7_D.doctree b/.doctrees/tutorial/doc_step_7_D.doctree index b99f9066c3..120dec7cfe 100644 Binary files a/.doctrees/tutorial/doc_step_7_D.doctree and b/.doctrees/tutorial/doc_step_7_D.doctree differ diff --git a/.doctrees/tutorial/doc_step_8_C.doctree b/.doctrees/tutorial/doc_step_8_C.doctree index 2c8aa7e7b4..fc4d28fc8b 100644 Binary files a/.doctrees/tutorial/doc_step_8_C.doctree and b/.doctrees/tutorial/doc_step_8_C.doctree differ diff --git a/.doctrees/tutorial/step_2.doctree b/.doctrees/tutorial/step_2.doctree index 88edb2ab97..e0b0dcf4ed 100644 Binary files a/.doctrees/tutorial/step_2.doctree and b/.doctrees/tutorial/step_2.doctree differ diff --git a/.doctrees/tutorial/step_3.doctree b/.doctrees/tutorial/step_3.doctree index 7604b6e7e4..3b45663369 100644 Binary files a/.doctrees/tutorial/step_3.doctree and b/.doctrees/tutorial/step_3.doctree differ diff --git a/.doctrees/tutorial/step_4.doctree b/.doctrees/tutorial/step_4.doctree index 11c2806257..630e83393e 100644 Binary files a/.doctrees/tutorial/step_4.doctree and b/.doctrees/tutorial/step_4.doctree differ diff --git a/.doctrees/tutorial/step_7.doctree b/.doctrees/tutorial/step_7.doctree index 60eeb40c7d..90d787f7f5 100644 Binary files a/.doctrees/tutorial/step_7.doctree and b/.doctrees/tutorial/step_7.doctree differ diff --git a/.doctrees/tutorial/step_8.doctree b/.doctrees/tutorial/step_8.doctree index 2ac02e447e..8f4b142c6d 100644 Binary files a/.doctrees/tutorial/step_8.doctree and b/.doctrees/tutorial/step_8.doctree differ diff --git a/_images/timings_SDC_variants_Fisher.png b/_images/timings_SDC_variants_Fisher.png index 4effc86926..83c2b50c27 100644 Binary files a/_images/timings_SDC_variants_Fisher.png and b/_images/timings_SDC_variants_Fisher.png differ diff --git a/_images/timings_SDC_variants_GrayScott.png b/_images/timings_SDC_variants_GrayScott.png index 3b98951b3b..adfeedea89 100644 Binary files a/_images/timings_SDC_variants_GrayScott.png and b/_images/timings_SDC_variants_GrayScott.png differ diff --git a/_modules/implementations/convergence_controller_classes/adaptivity.html b/_modules/implementations/convergence_controller_classes/adaptivity.html index e0ac4ba2b5..96e493d9c9 100644 --- a/_modules/implementations/convergence_controller_classes/adaptivity.html +++ b/_modules/implementations/convergence_controller_classes/adaptivity.html @@ -98,7 +98,7 @@

Source code for implementations.convergence_controller_classes.adaptivity Returns: None """ - step_limiter_keys = ['dt_min', 'dt_max', 'dt_slope_min', 'dt_slope_max'] + step_limiter_keys = ['dt_min', 'dt_max', 'dt_slope_min', 'dt_slope_max', 'dt_rel_min_slope'] available_keys = [me for me in step_limiter_keys if me in self.params.__dict__.keys()] if len(available_keys) > 0: diff --git a/_modules/implementations/convergence_controller_classes/step_size_limiter.html b/_modules/implementations/convergence_controller_classes/step_size_limiter.html index 95fdcdca75..0c9aea2673 100644 --- a/_modules/implementations/convergence_controller_classes/step_size_limiter.html +++ b/_modules/implementations/convergence_controller_classes/step_size_limiter.html @@ -85,7 +85,7 @@

Source code for implementations.convergence_controller_classes.step_size_lim Returns: None """ - slope_limiter_keys = ['dt_slope_min', 'dt_slope_max'] + slope_limiter_keys = ['dt_slope_min', 'dt_slope_max', 'dt_rel_min_slope'] available_keys = [me for me in slope_limiter_keys if me in self.params.__dict__.keys()] if len(available_keys) > 0: @@ -143,7 +143,9 @@

Source code for implementations.convergence_controller_classes.step_size_lim """ Class to set limits to adaptive step size computation during run time - Please supply dt_min or dt_max in the params to limit in either direction + Please supply `dt_slope_min` or `dt_slope_max` in the params to limit in either direction. + You can also supply `dt_rel_min_slope` in order to keep the old step size in case the relative change is smaller + than this minimum. """
@@ -164,6 +166,7 @@

Source code for implementations.convergence_controller_classes.step_size_lim "control_order": 91, "dt_slope_min": 0, "dt_slope_max": np.inf, + "dt_rel_min_slope": 0, } return {**defaults, **super().setup(controller, params, description, **kwargs)}

@@ -201,6 +204,12 @@

Source code for implementations.convergence_controller_classes.step_size_lim S, ) L.status.dt_new = dt_new + elif abs(L.status.dt_new / L.params.dt - 1) < self.params.dt_rel_min_slope: + L.status.dt_new = L.params.dt + self.log( + f"Step size did not change sufficiently to warrant step size change, keeping {L.status.dt_new:.2e}", + S, + ) return None diff --git a/coverage/class_index.html b/coverage/class_index.html index 79a3458d2d..fd2355ac48 100644 --- a/coverage/class_index.html +++ b/coverage/class_index.html @@ -55,7 +55,7 @@

coverage.py v7.6.1, - created at 2024-09-14 06:55 +0000 + created at 2024-09-16 12:43 +0000

@@ -859,10 +859,10 @@

pySDC/implementations/convergence_controller_classes/step_size_limiter.py StepSizeSlopeLimiter - 13 + 16 0 1 - 100% + 100% pySDC/implementations/convergence_controller_classes/step_size_limiter.py @@ -5381,10 +5381,10 @@

Total   - 26113 + 26116 5713 4997 - 78% + 78% @@ -5397,7 +5397,7 @@

coverage.py v7.6.1, - created at 2024-09-14 06:55 +0000 + created at 2024-09-16 12:43 +0000