diff options
Diffstat (limited to 'src/driver/Newton.cc')
-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; |