Closed JHopeCollins closed 2 years ago
As well as the windowing loop in paradiag.solve()
, I also added a few QoL functions that I needed for the for_each_timestep()
method.
A summary of the changes:
paradiag.solve()
now takes the number of windows to solve, as well as two callbacks: one called just before the window solve (so w_all is the initial conditions), and one called just after (so w_all is the solution for the window)paradiag.for_each_timestep()
: calls a callback with the solution at each timestep in turn. Useful for postprocessing.paradiag.set/get_timestep()
: set and extract solution at individual timesteps from all-at-once function.paradiag.shift_index()
: logic for shifting between window/slice indices and dealing with negative indicesparadiag.check_index()
: check a timestep index is within stated range.
Also adding some utility functions such as:
paradiag.get_timestep()
paradiag.set_timestep()
paradiag.for_each_timestep()