SimVascular / svSolver

Separate repository for svSolver
16 stars 23 forks source link

More robust restart #82

Closed mrp089 closed 4 years ago

mrp089 commented 4 years ago

Fixes #80 for reals. This introduces two changes:

1) Write coronary BC files in every time step (analog to RCR BC in #81). This can also restart from simulation output generated from previous svSolver versions, where only legacy QHistCOR.dat, PHistCOR.dat, PlvHistCOR.dat are present.

PHistCOR.dat.1
PHistCOR.dat.2
...
QHistCOR.dat.1
QHistCOR.dat.2
...
PlvHistCOR.dat.1
PlvHistCOR.dat.2
...

2) Increment time step on disk only after all output is written to file. I created a new subroutine writeNumStart to only write numstart.dat. This subroutine is called twice in itrdrv-closedloop-varwall-coronary.f, following each call to restar ('out ', ...) after all functions that write to disk. In case the simulation is terminated while writing to disk, the numstart.dat still points to the previous time step on disk.