diff options
author | ianhin <ianhin@a2659f00-0f4f-0410-9214-a4596bbb8a4f> | 2009-11-02 12:34:55 +0000 |
---|---|---|
committer | ianhin <ianhin@a2659f00-0f4f-0410-9214-a4596bbb8a4f> | 2009-11-02 12:34:55 +0000 |
commit | 8e2b610b0cd65653329e67acd6591f4e78416983 (patch) | |
tree | a7443e276d54ac53b441a4996e82dbf53fd63cad | |
parent | deabcbb4232037101b4035912303933d7c44f8c7 (diff) |
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
-rw-r--r-- | schedule.ccl | 4 | ||||
-rw-r--r-- | 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]<max_num_tracked && |