p-costa / SNaC

A multi-block solver for massively parallel direct numerical simulations (DNS) of fluid flows
MIT License
39 stars 9 forks source link

add `num_checkpoint_max` parameter #32

Closed p-costa closed 2 years ago

p-costa commented 2 years ago

In order to maintain a small number of checkpoint files, introduce an num_checkpoint_max parameter, which overwrites the saved checkpoints every n time steps. Say n=5, the savings will proceed in time as follows:

1, 2, 3, 4, 5 ; 6->1, 7->2, 8->3, 9->4, 10->5; with -> meaning that files are overwritten.

One can still use the current symbolic link approach to have fld.bin pointing to the last saved files.

Thanks @arashalizadbanaei for the discussion!