diff --git a/pySDC/implementations/hooks/log_solution.py b/pySDC/implementations/hooks/log_solution.py index 12b49da45..5bf5dc4b1 100644 --- a/pySDC/implementations/hooks/log_solution.py +++ b/pySDC/implementations/hooks/log_solution.py @@ -99,10 +99,13 @@ class LogToFile(Hooks): path = None file_name = 'solution' + def logging_condition(L): return True + def process_solution(L): return {'t': L.time + L.dt, 'u': L.uend.view(np.ndarray)} + def format_index(index): return f'{index:06d}' diff --git a/pySDC/projects/PinTSimE/switch_estimator.py b/pySDC/projects/PinTSimE/switch_estimator.py index 2ad57c6e7..cc51db0b8 100644 --- a/pySDC/projects/PinTSimE/switch_estimator.py +++ b/pySDC/projects/PinTSimE/switch_estimator.py @@ -297,6 +297,7 @@ def get_switch(t_interp, state_function, m_guess): """ LagrangeInterpolation = LagrangeApproximation(points=t_interp, fValues=state_function) + def p(t): return LagrangeInterpolation.__call__(t)