diff options
-rw-r--r-- | param.ccl | 152 | ||||
-rw-r--r-- | schedule.ccl | 34 |
2 files changed, 150 insertions, 36 deletions
@@ -7,20 +7,67 @@ # overall parameters for the apparent horizon finding algorithm itself # +boolean find_AHs_at_postinitial \ + "should we try to find apparent horizons at CCTK_POSTINITIAL?" +{ +} "true" + +boolean find_AHs_at_poststep \ + "should we try to find apparent horizons at CCTK_POSTSTEP?" +{ +} "true" + keyword method "top-level method used to find the apparent horizon" { +# options mostly for testing/debugging "horizon function" :: "evaluate the LHS function H(h)" "Jacobian test" :: \ "compute/print the J[H(h)] Jacobian matrix by all possible methods" "Jacobian test (NP only)" :: \ "compute/print the J[H(h)] Jacobian matrix by numerical perturbation only" +# normal AH finding "Newton solve" :: "find the horizon via Newton's method" -} "horizon function" +} "Newton solve" + +# +# at present we support up to 4 horizons +# +# to increase this, just raise the upper limit for this variable, +# and change all occurences of "[4]" in this file to whatever the new +# upper limit is (no changes are needed in the source code) +# +int N_horizons "number of apparent horizons to search for" +{ +0 :: "turn this thorn into a fancy no-op :)" +1:4 :: "search for this many apparent horizons" +} 1 + +# +# This parameter controls which (how many) informational (non-error) +# messages are printed describing the operation of the apparent horizon +# finder. This is analogous to the -W Cactus command-line option, except +# that this parameter controls (only) *non*-error messages. +# +keyword verbose_level \ + "controls which (how many) messages to print describing AH finding" +{ +"physics highlights" :: "just a few physics messages" +"physics details" :: "more detailed physics messages" +"algorithm highlights" :: \ + "physics details + a few messages about the AH-finding algorithm" +"algorithm details" :: \ + "physics details + lots of messages about the AH-finding algorithm" +} "physics details" + +boolean print_timing_stats \ + "should we print timing stats for the whole apparent-horizon-finding process?" +{ +} "false" ################################################################################ # -# parameters for the Jacobian matrix $J[H(h)]$ +# parameters for the Jacobian matrix # keyword Jacobian_method "how do we compute the Jacobian matrix?" @@ -58,7 +105,7 @@ real Jacobian_perturbation_amplitude \ ################################################################################ # -# parameters for the Newton's-method solution of $H(h) = 0$ +# parameters for the Newton's-method solution of H(h) = 0 # int max_Newton_iterations "maximum number of Newton iterations before giving up" @@ -73,6 +120,18 @@ boolean output_h_and_H_at_each_Newton_iteration \ } "false" # +# to avoid the Newton iteration diverging if there is no horizon present, +# we limit the distance the horizon may move in any single Newton iteration +# (i.e. the infinity-norm of Delta_h) to <= this fraction of the mean horizon +# radius +# +real max_Delta_h_over_h \ + "don't let horizon move > this fraction of mean radius in a Newton iteration" +{ +(0.0:* :: "any positive real number" +} 0.1 + +# # we declare convergence if *either* of the following two criteria are met # real H_norm_for_convergence "declare convergence if ||H||_inf <= this" @@ -95,20 +154,32 @@ boolean final_H_update_if_exit_x_H_small \ ################################################################################ # -# input/output file name parameters +# input/output parameters +# + +# +# These file names are actually just "base" file names, with the +# full file names being +# "%s.t%d.ah%d[.it%d].dat" +# where +# the %s is the base file name, +# the first %d is the global Cactus time iteration number, +# the second %d is the apparent horizon number, ande +# the optional third %d is the horizon finder iteration number # -string h_file_name "file name from/to which to read/write horizon shape h" +string h_base_file_name \ + "base file name for horizon shape h input/output file(s)" { .* :: "any string" } "h.dat" -string H_of_h_file_name "file name to which to write final H(h) function" +string H_of_h_base_file_name "base file name for H(h) output file(s)" { .* :: "any string" } "H.dat" -string Jacobian_file_name "name of the Jacobian output file" +string Jacobian_base_file_name "base file name for Jacobian output file(s)" { .+ :: "any valid file name" } "Jacobian.dat" @@ -116,19 +187,19 @@ string Jacobian_file_name "name of the Jacobian output file" ################################################################################ # -# parameters to define the patch system +# parameters to define the patch systems # private: -real origin_x "global x coordinate of patch system origin" +real origin_x[4] "global x coordinate of patch system origin" { *:* :: "any real number" } 0.0 -real origin_y "global y coordinate of patch system origin" +real origin_y[4] "global y coordinate of patch system origin" { *:* :: "any real number" } 0.0 -real origin_z "global z coordinate of patch system origin" +real origin_z[4] "global z coordinate of patch system origin" { *:* :: "any real number" } 0.0 @@ -169,7 +240,9 @@ real delta_drho_dsigma "angular grid spacing of patches, in degrees" keyword geometry_method "how do we compute the slice's geometry?" { +# for normal use "interpolate from Cactus grid" :: "interpolate gij and Kij from Cactus grid" +# for testing/debugging "Schwarzschild/EF" :: \ "hard-wire to Schwarzschild spacetime / Eddington-Finkelstein slice" } "interpolate from Cactus grid" @@ -239,7 +312,7 @@ real geometry__Schwarzschild_EF__epsilon \ # ... n.b. this finite differencing is *centered*, unlike that in the # Jacobian computation real geometry__Schwarzschild_EF__Delta_xyz \ - "finite diff pseuo-grid spacing for computing $\partial_k g_{ij}$" + "finite diff pseuo-grid spacing for computing partial_k g_ij" { (0.0:* :: "any real number > 0" } 1.0e-6 @@ -266,61 +339,86 @@ string interpatch_interpolator_pars \ # # parameters specifying the initial guess for the apparent horizon shape # + keyword initial_guess_method \ "method used to set up initial guess for apparent horizon shape" { -"read from file" :: "read from input file" -"ellipsoid" :: "set to a coordinate ellipsoid" -"Kerr/Kerr" :: "set to horizon of Kerr spacetime in Kerr coords" -"Kerr/Kerr-Schild" :: "set to horizon of Kerr spacetime in Kerr-Schild coords" +"read from file" :: "read from input file" +"sphere" :: "set up a coordinate sphere" +"ellipsoid" :: "set to a coordinate ellipsoid" +"Kerr/Kerr" :: "set to horizon of Kerr spacetime in Kerr coords" +"Kerr/Kerr-Schild" :: "set to horizon of Kerr spacetime in Kerr-Schild coords" } "read from file" +boolean output_initial_guess \ + "should we write the initial guess back to the h data file?" +{ +} "true" + +# parameters for initial_guess_method = "sphere" +real initial_guess__sphere__x_center[4] "x coordinate of sphere center" +{ +*:* :: "any real number" +} 0.0 +real initial_guess__sphere__y_center[4] "y coordinate of sphere center" +{ +*:* :: "any real number" +} 0.0 +real initial_guess__sphere__z_center[4] "z coordinate of sphere center" +{ +*:* :: "any real number" +} 0.0 +real initial_guess__sphere__radius[4] "radius of sphere" +{ +(0.0:* :: "any real number > 0.0" +} 2.0 + # parameters for initial_guess_method = "ellipsoid" -real initial_guess__ellipsoid__x_center "x coordinate of ellipsoid center" +real initial_guess__ellipsoid__x_center[4] "x coordinate of ellipsoid center" { *:* :: "any real number" } 0.0 -real initial_guess__ellipsoid__y_center "y coordinate of ellipsoid center" +real initial_guess__ellipsoid__y_center[4] "y coordinate of ellipsoid center" { *:* :: "any real number" } 0.0 -real initial_guess__ellipsoid__z_center "z coordinate of ellipsoid center" +real initial_guess__ellipsoid__z_center[4] "z coordinate of ellipsoid center" { *:* :: "any real number" } 0.0 -real initial_guess__ellipsoid__x_radius "x radius of ellipsoid" +real initial_guess__ellipsoid__x_radius[4] "x radius of ellipsoid" { (0.0:* :: "any real number > 0.0" } 2.0 -real initial_guess__ellipsoid__y_radius "y radius of ellipsoid" +real initial_guess__ellipsoid__y_radius[4] "y radius of ellipsoid" { (0.0:* :: "any real number > 0.0" } 2.0 -real initial_guess__ellipsoid__z_radius "z radius of ellipsoid" +real initial_guess__ellipsoid__z_radius[4] "z radius of ellipsoid" { (0.0:* :: "any real number > 0.0" } 2.0 # parameters for initial_guess_method = "Kerr/Kerr" and "Kerr/Kerr-Schild" -real initial_guess__Kerr__x_posn "x coordinate of Kerr BH" +real initial_guess__Kerr__x_posn[4] "x coordinate of Kerr BH" { *:* :: "any real number" } 0.0 -real initial_guess__Kerr__y_posn "y coordinate of Kerr BH" +real initial_guess__Kerr__y_posn[4] "y coordinate of Kerr BH" { *:* :: "any real number" } 0.0 -real initial_guess__Kerr__z_posn "z coordinate of Kerr BH" +real initial_guess__Kerr__z_posn[4] "z coordinate of Kerr BH" { *:* :: "any real number" } 0.0 # n.b. my convention is that a=J/m^2 is dimensionless, # while MTW take a=J/m=m * (my a) -real initial_guess__Kerr__mass "mass of Kerr BH" +real initial_guess__Kerr__mass[4] "mass of Kerr BH" { (0.0:* :: "BH mass = any real number > 0" } 1.0 -real initial_guess__Kerr__spin "dimensionless spin J/m^2 of Kerr BH" +real initial_guess__Kerr__spin[4] "dimensionless spin J/m^2 of Kerr BH" { (-1.0:1.0) :: "BH spin = J/m^2 = any real number with absolute value < 1" } 0.6 diff --git a/schedule.ccl b/schedule.ccl index d648d79..2b2c5eb 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -1,21 +1,37 @@ # Schedule definitions for thorn AHFinderDirect # $Header$ -# -# FIXME: -# we'd like to schedule at ANALYSIS, but that doesn't get run unless -# some trigger variable is being output at this time step -# ==> quick-n-dirty hack for now: just schedule at POSTINITIAL -# - ##schedule test_patch_system at CCTK_POSTINITIAL ##{ ##LANG: C ##OPTIONS: global ##} "test driver to verify that src/util/ and src/jtutil/ code works properly" -schedule AHFinderDirect_driver at CCTK_POSTINITIAL +schedule AHFinderDirect_setup at CCTK_BASEGRID after SpatialCoordinates +{ +lang: C +options: global +} "setup data structures" + +schedule AHFinderDirect_initial_guess at CCTK_INITIAL { lang: C options: global -} "find apparent horizon(s)" +} "set initial guess" + +if (find_AHs_at_postinitial != 0) + { + schedule AHFinderDirect_find_horizons at CCTK_POSTINITIAL + { + lang: C + options: global + } "find apparent horizon(s) in initial data" + } +if (find_AHs_at_poststep != 0) + { + schedule AHFinderDirect_find_horizons at CCTK_POSTSTEP + { + lang: C + options: global + } "find apparent horizon(s) after this time step" + } |