Skip to content
Snippets Groups Projects
Commit a7ca8e9f authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

Merge branch 'fix/initial_condition_search' into 'master'

fixes initial condition search procedure

See merge request !109
parents ae2d011f a4ba9f0a
Branches
Tags 5.4.5
1 merge request!109fixes initial condition search procedure
Pipeline #205168 failed
...@@ -881,12 +881,13 @@ class DNS(_code): ...@@ -881,12 +881,13 @@ class DNS(_code):
for cp in range(source_current_checkpoint+1)] for cp in range(source_current_checkpoint+1)]
src_file = None src_file = None
for check_file in source_checkpoints: for check_file in source_checkpoints:
f0 = h5py.File(check_file, 'r') if os.path.exists(check_file):
if ('{0}'.format(opt.src_iteration) f0 = h5py.File(check_file, 'r')
in f0[checkpoint_field + '/complex'].keys()): if ('{0}'.format(opt.src_iteration)
f0.close() in f0[checkpoint_field + '/complex'].keys()):
src_file = check_file f0.close()
break src_file = check_file
break
self.copy_complex_field( self.copy_complex_field(
src_file, src_file,
checkpoint_field + '/complex/{0}'.format(opt.src_iteration), checkpoint_field + '/complex/{0}'.format(opt.src_iteration),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment