From 2b8ebc7ffcedbbad51a48df4e7138edb083307fe Mon Sep 17 00:00:00 2001 From: Thomas Baumann <39156931+brownbaerchen@users.noreply.github.com> Date: Fri, 20 Sep 2024 18:28:32 +0200 Subject: [PATCH] TB: small fixes (#487) --- pySDC/core/controller.py | 2 +- .../interpolate_between_restarts.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pySDC/core/controller.py b/pySDC/core/controller.py index b77790fe10..2549cc6221 100644 --- a/pySDC/core/controller.py +++ b/pySDC/core/controller.py @@ -47,7 +47,7 @@ def __init__(self, controller_params, description, useMPI=None): user_hooks = controller_params.get('hook_class', []) hook_classes += user_hooks if type(user_hooks) == list else [user_hooks] [self.add_hook(hook) for hook in hook_classes] - controller_params['hook_class'] = controller_params.get('hook_class', hook_classes) + controller_params['hook_class'] = hook_classes for hook in self.hooks: hook.pre_setup(step=None, level_number=None) diff --git a/pySDC/implementations/convergence_controller_classes/interpolate_between_restarts.py b/pySDC/implementations/convergence_controller_classes/interpolate_between_restarts.py index 934588ad94..d785497a81 100644 --- a/pySDC/implementations/convergence_controller_classes/interpolate_between_restarts.py +++ b/pySDC/implementations/convergence_controller_classes/interpolate_between_restarts.py @@ -56,7 +56,7 @@ def post_spread_processing(self, controller, step, **kwargs): for m in range(len(level.u)): level.u[m][:] = self.status.u_inter[i][m].reshape(level.prob.init[0])[:] - level.f[m][:] = self.status.f_inter[i][m].reshape(level.prob.init[0])[:] + level.f[m][:] = self.status.f_inter[i][m].reshape(level.f[m].shape)[:] # reset the status variables self.status.perform_interpolation = False