[Commits] [svn:einsteintoolkit] AHFinderDirect/trunk/src/driver/ (Rev. 1572)
rhaas at tapir.caltech.edu
rhaas at tapir.caltech.edu
Fri Feb 1 22:54:18 CST 2013
User: rhaas
Date: 2013/02/01 10:54 PM
Modified:
/trunk/src/driver/
BH_diagnostics.cc
Log:
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
File Changes:
Directory: /trunk/src/driver/
=============================
File [modified]: BH_diagnostics.cc
Delta lines: +6 -3
===================================================================
--- trunk/src/driver/BH_diagnostics.cc 2013-01-18 17:54:47 UTC (rev 1571)
+++ trunk/src/driver/BH_diagnostics.cc 2013-02-02 04:54:18 UTC (rev 1572)
@@ -834,9 +834,12 @@
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);
More information about the Commits
mailing list