Feature/restart saves explicit terms : possible bugfix
David Dickinson
Branch: feature/restart_saves_explicit_terms_possible_bugfix
Branch: next
Declined
Declined pull request
Primary bugfix component addressed by PR #114 further changes may come in a later feature PR.
Closed by: David Dickinson·2019-04-15
Don’t allocated explicit source arrays if not needed
Move explicit source array declaration to dist_fn_arrays
Add explicit source terms to restart file and restore if present.
Decides if we should try to store/restore gexp_1/2/3 if the arrays are allocated at the point of calling gs2_save_for_restart/restore_restart.
Currently doesn’t abort if we can’t restore these arrays in order to preserve backwards compatibility with existing restart files. We should consider making this abort once the feature has been in release from a version or two.
Save and restore the time step history to restart file
Ensure that we force the new timestep when reinitialising
This could be viewed as a bugfix as it should help restarted jobs be closer to doing the same thing as longer runs.
Â
Additional small bugfix : restores the `vnmult` array for collisions – previously this was read in from the restart file but not actually used.
Â
These changes may make it difficult to use restart files generated with older versions of the code.
Currently the new approach stores the current timestep as
code_dt
and tries to restore from this value as well. If we useddelt0
instead then we may be able to better support old restart files?