diff options
author | rhaas <rhaas@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2012-10-29 18:06:51 +0000 |
---|---|---|
committer | rhaas <rhaas@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2012-10-29 18:06:51 +0000 |
commit | 529c41f8496c93156cae3b5acef105b52a0101dc (patch) | |
tree | 9a3cb0b797194f7d3148a53965e63d413f2d5613 | |
parent | d434e5a84eeeff8660f22d40475e8fca68dfdf72 (diff) |
Initialize Cactus grid scalar with data from internal data structures
this is avoids errors when new horizons are turned on in a checkpoint recovery.
The reason is that AHFinderDirect attempts to initialize its internal variables
from checkpointed data (in particular the patch system origin). Since the new
horizons did not exist at the time of checkpoint (and the whole variable is
missing) the recovery routine in CarpetIOHDF5 reads in no data which leaves the
Cactus group uninitialized which in turn leads to invalid values in
AHFinderDirect's internal data structures.
The attached fix circumvents this by having AHFinderDirect initialize the
Cactus group from its internal data structures (which it constructed from the
parameters) at BaseGrid. This way, any newly created horizon will retain the
values from the parameter file, but existing ones have their values
overwritten.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1569 f88db872-0e4f-0410-b76b-b9085cfa78c5
-rw-r--r-- | src/driver/setup.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/driver/setup.cc b/src/driver/setup.cc index 5217097..c8ce8cc 100644 --- a/src/driver/setup.cc +++ b/src/driver/setup.cc @@ -683,6 +683,13 @@ if (strlen(surface_interpolator_name) > 0) printf ("AHF setup %d found_flag=%d\n", n+1, (int) AH_data.found_flag); } } + + // Save in grid array in case a recovery only recovers some horizons + for (int n = 0; n < N_horizons; ++ n) { + struct AH_data& AH_data = *state.AH_data_array[n+1]; + const struct BH_diagnostics& BH_diagnostics = AH_data.BH_diagnostics; + BH_diagnostics.save(cctkGH, n+1); + } } |