From 3a76c87e57fd6d7229d6e6bc527435d24e28a0ef Mon Sep 17 00:00:00 2001 From: diener Date: Wed, 3 Oct 2007 15:05:34 +0000 Subject: Add the option of changing the number of refinement levels using the distance between two punctures. This is useful when turning off the fine(st) refinement levels after the merger of two black holes and is independent of whether you actually find the common horizon. Of course the distance between punctures has to be chosen so that a common horizon is actually present when the punctures are that close. git-svn-id: http://svn.aei.mpg.de/numrel/AEIThorns/PunctureTracker/trunk@8 a2659f00-0f4f-0410-9214-a4596bbb8a4f --- param.ccl | 15 +++++++++++++++ src/puncture_tracker.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/param.ccl b/param.ccl index 1475ebb..8e38121 100644 --- a/param.ccl +++ b/param.ccl @@ -22,3 +22,18 @@ REAL initial_z[10] "Initial z coordinate positions of punctures" { *:* :: "" } 0.0 + +INT modify_puncture[2] "Punctures to use for modification criteria" +{ + -1:9 :: "One of the tracking punctures or negative for no modification" +} -1 + +REAL modify_distance "Modify levels when the distance is less than this" +{ + 0.0:* :: "zero or positive" +} 0.0 + +INT new_reflevel_number[2] "The new number of refinement levels" +{ + -1:* :: "Negative for no change" +} -1 diff --git a/src/puncture_tracker.c b/src/puncture_tracker.c index d3da795..341b6d4 100644 --- a/src/puncture_tracker.c +++ b/src/puncture_tracker.c @@ -263,6 +263,8 @@ PunctureTracker_SetPositions (CCTK_ARGUMENTS) DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; + CCTK_REAL dist; + for (int n = 0; n < max_num_tracked; ++ n) { if (track[n]) { @@ -282,4 +284,44 @@ PunctureTracker_SetPositions (CCTK_ARGUMENTS) } } + + if ( modify_puncture[0]>=0 && modify_puncture[0]=0 && modify_puncture[1] -1 ) { + if (verbose) { + CCTK_VInfo (CCTK_THORNSTRING, + "Setting the number of refinement levels to %d for refinemenet region #%d", + new_reflevel_number[0],modify_puncture[0]); + } + num_levels[modify_puncture[0]] = new_reflevel_number[0]; + } + + if ( new_reflevel_number[1] > -1 ) { + if (verbose) { + CCTK_VInfo (CCTK_THORNSTRING, + "Setting the number of refinement levels to %d for refinemenet region #%d", + new_reflevel_number[1],modify_puncture[1]); + } + num_levels[modify_puncture[1]] = new_reflevel_number[1]; + } + + } + + } + + } + } -- cgit v1.2.3