KVSlab / turtleFSI

Monolithic Fluid-Structure Interaction (FSI) solver
https://turtlefsi2.readthedocs.io/en/latest/
GNU General Public License v3.0
63 stars 23 forks source link

checkpoint is only saving one time step, n-1 #64

Closed keiyamamo closed 1 year ago

keiyamamo commented 1 year ago

checkpoint function states that it saves last two time steps, but it only saves one time step.

https://github.com/KVSlab/turtleFSI/blob/e8574bb57b9ca2232ee5486f5f331bdf8c365484/turtleFSI/problems/__init__.py#L183-L200

field is generated inside https://github.com/KVSlab/turtleFSI/blob/e8574bb57b9ca2232ee5486f5f331bdf8c365484/turtleFSI/problems/__init__.py#L364-L374

and you can see that it only has dvp_["n-1”]. So when restarting the simulation, we are right now assigning n-1 to both n and n-1

https://github.com/KVSlab/turtleFSI/blob/e8574bb57b9ca2232ee5486f5f331bdf8c365484/turtleFSI/problems/__init__.py#L356-L361

This restart need to be fixed so that we actually restart the problem using two last time steps.