pyfsi/coconut

Allow limited changes upon restart

Closed this issue · 2 comments

This issue concerns the adding of new functionality with respect to restart:

  • allow to change the predictor, upon change only the last solution is available (prediction in first new time step will be constant)
  • allow to change some settings in the model, such as the reuse parameter

Have you considered save_results and save_restart? If you choose to change those upon restart (let's say we change both parameters from 50 to 7 for some reason), then the reference is very important. Assume we restart a calculation from timestep 50. In case the save operation is always referred to 0 (which is now the case), the first save moment will come on timestep 56 while the user might have expected a save on timestep 57 (7 timesteps after the new timestep_start).
It seems useful to let the user change these parameters upon restart. My personal thought is to always refer the timestep relative to timestep_start.

With respect to save_results: First it's important to emphasize that this value is the time step interval at which a pickle file is written containing some main results for ALL previous time steps. Taking this into account, its value is not very important. The reason that you limit the writing action to certain time steps, is that for large cases the writing of this file make a few seconds. Moreover, It is important to notice that this file is also always written at the end of the calculation and when the restart pickle is written.
To answer your question, the writing action occurs when the time_step modulo save_results is zero, independent of this is after restart or not.

With respect to save_restart: The same applies: the restart file is written when time_step modulo save_restart is zero, independent of this is after restart or not.

These values can already be changed upon restart, without any problem. Also see the documentation for more information. The limit changes in this issue refer to the possible models used in the coupled solver and the predictor.