From 8e2b610b0cd65653329e67acd6591f4e78416983 Mon Sep 17 00:00:00 2001 From: ianhin Date: Mon, 2 Nov 2009 12:34:55 +0000 Subject: PunctureTracker: Clean up use of spherical surfaces Set spherical surface centroid, active and valid. Don't set CarpetRegrid2 variables directly; this is what CarpetTracker is for. Don't set origin. Schedule in POSTSTEP instead of PREREGRID. git-svn-id: http://svn.aei.mpg.de/numrel/AEIThorns/PunctureTracker/trunk@15 a2659f00-0f4f-0410-9214-a4596bbb8a4f --- schedule.ccl | 4 ++-- src/puncture_tracker.c | 32 ++++++++++++-------------------- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/schedule.ccl b/schedule.ccl index cce26af..74fe206 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -14,8 +14,8 @@ SCHEDULE PunctureTracker_Track AT evol AFTER MoL_Evolution OPTIONS: GLOBAL } "Calculate new location of punctures" -SCHEDULe PunctureTracker_SetPositions AT preregrid +SCHEDULE PunctureTracker_SetPositions AT POSTSTEP { LANG: C OPTIONS: global -} "Set positions of refined regions" +} "Copy puncture positions to spherical surfaces" diff --git a/src/puncture_tracker.c b/src/puncture_tracker.c index 9dee438..786ed93 100644 --- a/src/puncture_tracker.c +++ b/src/puncture_tracker.c @@ -282,35 +282,27 @@ PunctureTracker_SetPositions (CCTK_ARGUMENTS) for (int n = 0; n < max_num_tracked; ++ n) { if (track[n]) { - if (verbose) { CCTK_VInfo (CCTK_THORNSTRING, - "Setting position of refined region from puncture #%d to (%g,%g,%g)", + "Setting spherical surface centroid from puncture #%d to (%g,%g,%g)", n, (double)pt_loc_x[n], (double)pt_loc_y[n], (double)pt_loc_z[n]); } - - // Set position in CarpetRegrid2 - position_x[n] = pt_loc_x[n]; - position_y[n] = pt_loc_y[n]; - position_z[n] = pt_loc_z[n]; - - } - // store puncture location in spherical surface - if (which_surface_to_store_info[n] != -1) - { - int sn = which_surface_to_store_info[n]; - - sf_origin_x[sn] = position_x[n]; - sf_origin_y[sn] = position_y[n]; - sf_origin_z[sn] = position_z[n]; - - sf_active[sn] = 1; + // store puncture location in spherical surface + if (which_surface_to_store_info[n] != -1) { + int sn = which_surface_to_store_info[n]; + + sf_centroid_x[sn] = position_x[n]; + sf_centroid_y[sn] = position_y[n]; + sf_centroid_z[sn] = position_z[n]; + + sf_active[sn] = 1; + sf_valid[sn] = 1; + } } - } if ( modify_puncture[0]>=0 && modify_puncture[0]