diff options
author | schnetter <schnetter@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2008-10-04 02:27:16 +0000 |
---|---|---|
committer | schnetter <schnetter@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2008-10-04 02:27:16 +0000 |
commit | 3f089c600ca2860b10fa5120b6043ce7a7ada0af (patch) | |
tree | 770ea63ce3318af660817585f9018fc320493945 | |
parent | 79efedb881c80cc541329d813b67cfc4d0caedd8 (diff) |
Add new parameters track_origin_from_grid_scalar. They tell
AHFinderDirect to look at certain grid scalars to reset the origin
used for horizon finding.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1530 f88db872-0e4f-0410-b76b-b9085cfa78c5
-rw-r--r-- | param.ccl | 19 | ||||
-rw-r--r-- | src/driver/Newton.cc | 22 |
2 files changed, 41 insertions, 0 deletions
@@ -1124,6 +1124,25 @@ boolean predict_origin_movement "predict origin movement when moving the origins { } "no" +boolean track_origin_from_grid_scalar[101] "track horizon origin from given grid scalars" STEERABLE=recover +{ +} "no" +string track_origin_source_x[101] "grid scalar containing the x component of the origin estimate" STEERABLE=recover +{ + "" :: "don't use this feature" + "[a-zA-Z_][a-zA-Z0-9_]*[:][:][a-zA-Z_][a-zA-Z0-9_]*(\[0-9+\])" :: "name of a grid scalar" +} "" +string track_origin_source_y[101] "grid scalar containing the x component of the origin estimate" STEERABLE=recover +{ + "" :: "don't use this feature" + "[a-zA-Z_][a-zA-Z0-9_]*[:][:][a-zA-Z_][a-zA-Z0-9_]*(\[0-9+\])" :: "name of a grid scalar" +} "" +string track_origin_source_z[101] "grid scalar containing the x component of the origin estimate" STEERABLE=recover +{ + "" :: "don't use this feature" + "[a-zA-Z_][a-zA-Z0-9_]*[:][:][a-zA-Z_][a-zA-Z0-9_]*(\[0-9+\])" :: "name of a grid scalar" +} "" + # # The "(rotating)" patch system types are ok for evaluating Theta(h), # but alas they don't work yet for apparent horizon finding diff --git a/src/driver/Newton.cc b/src/driver/Newton.cc index 62bab31..26460d2 100644 --- a/src/driver/Newton.cc +++ b/src/driver/Newton.cc @@ -331,6 +331,28 @@ if (hs.has_genuine_horizons()) ps.synchronize(); } } + if (track_origin_from_grid_scalar[hn] && AH_data_ptr->depends_on == 0) { + // move the origin as specified in the grid scalars + fp const * const ox = + static_cast<CCTK_REAL const *> + (CCTK_VarDataPtr (cctkGH, 0, track_origin_source_x[hn])); + assert (ox); + fp const * const oy = + static_cast<CCTK_REAL const *> + (CCTK_VarDataPtr (cctkGH, 0, track_origin_source_y[hn])); + assert (oy); + fp const * const oz = + static_cast<CCTK_REAL const *> + (CCTK_VarDataPtr (cctkGH, 0, track_origin_source_z[hn])); + assert (oz); + if (verbose_info.print_algorithm_highlights) { + std::cout << "AHF tracked position ox " << *ox << " oy " << *oy << " oz " << *oz << std::endl; + } + patch_system& ps = *ps_ptr; + ps.origin_x (*ox); + ps.origin_y (*oy); + ps.origin_z (*oz); + } // modify the initial guess jtutil::norm<fp> norms; |