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 /src | |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/driver/Newton.cc | 22 |
1 files changed, 22 insertions, 0 deletions
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; |