diff options
author | rhaas <rhaas@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2013-02-02 04:54:18 +0000 |
---|---|---|
committer | rhaas <rhaas@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2013-02-02 04:54:18 +0000 |
commit | da6980d7c376f5e7e77c45ce313994705e5e2cf4 (patch) | |
tree | f054a99e592983f1c20a67db1a94dab0021cccec | |
parent | aa66659b505ca60be26e80b4fc9ebfd98d77b2c3 (diff) |
Dont use recovered origin if AH was never found
Problem: After some time in the simulation, I want to search for an horizon. I
do not know where the horizon appears initially when the simulation started. I
therefore leave origin_* and initial_guesscoord_sphere*_center at zero.
By some means later, I have figured out where the horizon will appear.
Therefore, after recovery, I want to set origin_* and
initial_guesscoord_sphere*_center to the origin where I believe the horizon
will appear.
Unfortunately, upon recovery, the new origin_* is overwritten by whatever was
stored in ah_origin_* (this would be zero). Generally, this means that the
initial guess ellipsoid that is setup when a horizon has never been found, is
ill-posed (because the initial (and incorrect) origin_* are used with the
updated initial_guesscoord_sphere*_center).
Solution: Don't use the stored AH origin upon recovery when a horizon has never
been found before.
Patch by Christian Reisswig
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1572 f88db872-0e4f-0410-b76b-b9085cfa78c5
-rw-r--r-- | src/driver/BH_diagnostics.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/driver/BH_diagnostics.cc b/src/driver/BH_diagnostics.cc index dde7d5c..123819b 100644 --- a/src/driver/BH_diagnostics.cc +++ b/src/driver/BH_diagnostics.cc @@ -834,9 +834,12 @@ void BH_diagnostics::load(CCTK_ARGUMENTS, struct AH_data& AH_data = *state.AH_data_array[horizon_number]; patch_system& ps = *AH_data.ps_ptr; - ps.origin_x(ah_origin_x[horizon_number-1]); - ps.origin_y(ah_origin_y[horizon_number-1]); - ps.origin_z(ah_origin_z[horizon_number-1]); + // only use stored origins if horizon had not yet been found! + if (ah_found_flag[horizon_number-1]) { + ps.origin_x(ah_origin_x[horizon_number-1]); + ps.origin_y(ah_origin_y[horizon_number-1]); + ps.origin_z(ah_origin_z[horizon_number-1]); + } for (int pn = 0; pn < ps.N_patches(); ++pn) { assert (pn < 6); |