Skip to content
Snippets Groups Projects
Commit ae352cf0 authored by Chichi Lalescu's avatar Chichi Lalescu
Browse files

not tested --- tweak checkpointing

make sure code stops at multiples of niter_todo, or when
the file "stop_<simname>" is found.
i.e. if i stop it at iteration 3, and niter_todo is 16, it should next
stop at 16, not at 19.
parent ce18921d
No related branches found
No related tags found
2 merge requests!21Bugfix/nansampling,!3Bugfix/event manager show html
...@@ -32,6 +32,7 @@ import argparse ...@@ -32,6 +32,7 @@ import argparse
import h5py import h5py
from datetime import datetime from datetime import datetime
import math import math
import warnings
import bfps import bfps
from ._base import _base from ._base import _base
......
...@@ -264,7 +264,7 @@ class _fluid_particle_base(_code): ...@@ -264,7 +264,7 @@ class _fluid_particle_base(_code):
'<< time_difference/nprocs << " seconds" << std::endl;\n' + '<< time_difference/nprocs << " seconds" << std::endl;\n' +
'time0 = time1;\n') 'time0 = time1;\n')
if not postprocess_mode: if not postprocess_mode:
self.main += 'for (int max_iter = iteration+niter_todo; iteration < max_iter; iteration++)\n' self.main += 'for (int max_iter = iteration+niter_todo-iteration%niter_todo; iteration < max_iter; iteration++)\n'
self.main += '{\n' self.main += '{\n'
self.main += """ self.main += """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment