# Parameter definitions for thorn AHFinderDirect # $Header$ ################################################################################ # # ***** interface to the rest of Cactus ***** # # we may need to look at some grid:: parameters to choose our patch system type # note our access is read-only shares: grid USES KEYWORD domain USES KEYWORD bitant_plane USES KEYWORD quadrant_direction USES KEYWORD rotation_axis # we need to look at ADMBase::metric_type and StaticConformal::conformal_state # to check physical/conformal metric # note our access is read-only shares: ADMBase USES KEYWORD metric_type # all remaining parameters are private to this thorn private: ################################################################################ # # ***** overall parameters ***** # 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 "what should this thorn do for each apparent horizon?" { # these options are mostly for testing/debugging # ... in a multiprocessor Cactus run, the horizons are done sequentually # on processor #0; the other processors do dummy computations "evaluate expansions" :: "evaluate the LHS function Theta(h)" # ... in a multiprocessor Cactus run, the Jacobian is computed on # processor #0; the other processors do dummy computations "test expansion Jacobians" :: \ "compute/print horizon 1's J[Theta(h)] Jacobian matrix (possibly in \ multiple ways, depending on the test_all_Jacobian_methods parameter)" # this is for normal apparent horizon finding # ... in a multiprocessor Cactus run, the horizons are done in parallel # across processors; see src/driver/README.parallel for details "find horizons" :: "find the apparent horizon" } "find horizons" # # We support searching for up to N_horizons distinct apparent horizons # (some of which may be nested inside others) in a slice. # IMPORTANT: The horizons are numbered 1 to N_horizons. # Since Cactus arrays are 0-origin, we make the arrays be of size # N_horizons+1, and don't use the [0] array elements. # # To change the N_horizons limit, just change the upper limit for # N_horizons itself, change all the [N_horizons+1] array sizes in this # paramter file, and recompile your configuration. No changes are # needed to 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 how verbose this thorn is in printing # informational (non-error) messages describing what it's doing. # keyword verbose_level \ "controls which (how many) messages to print describing AH finding" { # 1 line each time step giving number of horizons found and their masses # ... this doesn't work yet :( "physics highlights" :: "just a few physics messages" # 1 line for each horizon giving position/mass/area, + a summary line or two "physics details" :: "more detailed physics messages" # 1 line giving Theta(h) norms at each Newton iteration "algorithm highlights" :: \ "physics details + a few messages about the AH-finding algorithm" # lots of details tracing what the code is doing "algorithm details" :: \ "physics details + lots of messages about the AH-finding algorithm" # even more details tracing what the code is doing :) "algorithm debug" :: \ "physics details + lots and lots of messages about the AH-finding algorithm" } "algorithm highlights" # n.b. printing timing stats is independent of verbose_level boolean print_timing_stats \ "should we print timing stats for the whole apparent-horizon-finding process?" { } "false" ################################################################################ # # ***** parameters for the initial guess for each apparent horizon shape ***** # # # (Note that if at any time we fail to find the (an) apparent horizon, # then we reset our trial horizon surface to this initial guess before # next attempting to find this horizon.) # keyword initial_guess_method[5] \ "method used to set up initial guess for apparent horizon shape" { "read from named file" :: "read from explicitly-named input file" "read from h file" :: \ "read from input file named the same as the (later) h output file" "Kerr/Kerr" :: \ "set to the (analytical) horizon of Kerr spacetime in Kerr coordinates \ (n.b. Schwarzschild/EF is the special case spin=0 of this)" "Kerr/Kerr-Schild" :: \ "set to the (analytical) horizon of Kerr spacetime in Kerr-Schild coordinates" "coordinate sphere" :: "set to a coordinate sphere" "coordinate ellipsoid" :: "set to a coordinate ellipsoid" } "coordinate sphere" # parameters for initial_guess_method = "read from named file" string initial_guess__read_from_named_file__file_name[5] \ "file name to read initial guess from" { .+ :: "file name to read initial guess from" } "h.gp" # parameters for initial_guess_method = "Kerr/Kerr" real initial_guess__Kerr_Kerr__x_posn[5] "x coordinate of Kerr BH" { *:* :: "any real number" } 0.0 real initial_guess__Kerr_Kerr__y_posn[5] "y coordinate of Kerr BH" { *:* :: "any real number" } 0.0 real initial_guess__Kerr_Kerr__z_posn[5] "z coordinate of Kerr BH" { *:* :: "any real number" } 0.0 real initial_guess__Kerr_Kerr__mass[5] "mass of Kerr BH" { (0.0:* :: "BH mass = any real number > 0" } 1.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_Kerr__spin[5] "dimensionless spin a=J/m^2 of Kerr BH" { (-1.0:1.0) :: \ "dimensionless BH spin = J/m^2 = any real number with absolute value < 1" } 0.6 # parameters for initial_guess_method = "Kerr/Kerr-Schild" real initial_guess__Kerr_KerrSchild__x_posn[5] "x coordinate of Kerr BH" { *:* :: "any real number" } 0.0 real initial_guess__Kerr_KerrSchild__y_posn[5] "y coordinate of Kerr BH" { *:* :: "any real number" } 0.0 real initial_guess__Kerr_KerrSchild__z_posn[5] "z coordinate of Kerr BH" { *:* :: "any real number" } 0.0 real initial_guess__Kerr_KerrSchild__mass[5] "mass of Kerr BH" { (0.0:* :: "BH mass = any real number > 0" } 1.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_KerrSchild__spin[5] "dimensionless spin a=J/m^2 of Kerr BH" { (-1.0:1.0) :: \ "dimensionless BH spin = J/m^2 = any real number with absolute value < 1" } 0.6 # parameters for initial_guess_method = "sphere" real initial_guess__coord_sphere__x_center[5] "x coordinate of sphere center" { *:* :: "any real number" } 0.0 real initial_guess__coord_sphere__y_center[5] "y coordinate of sphere center" { *:* :: "any real number" } 0.0 real initial_guess__coord_sphere__z_center[5] "z coordinate of sphere center" { *:* :: "any real number" } 0.0 real initial_guess__coord_sphere__radius[5] "radius of sphere" { (0.0:* :: "any real number > 0.0" } 2.0 # parameters for initial_guess_method = "ellipsoid" real initial_guess__coord_ellipsoid__x_center[5] \ "x coordinate of ellipsoid center" { *:* :: "any real number" } 0.0 real initial_guess__coord_ellipsoid__y_center[5] \ "y coordinate of ellipsoid center" { *:* :: "any real number" } 0.0 real initial_guess__coord_ellipsoid__z_center[5] \ "z coordinate of ellipsoid center" { *:* :: "any real number" } 0.0 real initial_guess__coord_ellipsoid__x_radius[5] "x radius of ellipsoid" { (0.0:* :: "any real number > 0.0" } 2.0 real initial_guess__coord_ellipsoid__y_radius[5] "y radius of ellipsoid" { (0.0:* :: "any real number > 0.0" } 2.0 real initial_guess__coord_ellipsoid__z_radius[5] "z radius of ellipsoid" { (0.0:* :: "any real number > 0.0" } 2.0 ################################################################################ # # ***** I/O parameters ***** # ######################################## # # parameters for horizon-shape and other similar data files # # the next two parameters control how often we write full-sized output # files (format controlled by horizon_file_format ); we still *find* # apparent horizons at each time step, and compute/print small-sized # diagnostics, but this parameter may be used to reduce the number # and size of output files int how_often_to_output_h \ "how often (in Cactus time steps) should we output h (0 to disable)?" { 0 :: "don't output h at all" 1:* :: "any integer >= 1" } 1 # setting this > 0 is probably only of interest if the Newton iteration # fails to converge, or if you're debugging AHFinderDirect internals int how_often_to_output_Theta \ "how often (in Cactus time steps) should we output the Theta(h) functions?" { 0 :: "don't output Theta(h) at all" 1:* :: "any integer >= 1" } 0 keyword horizon_file_format \ "what file format should we use for h and Theta(h) data files?" { "ASCII (gnuplot)" :: "simple ASCII format, directly readable by gnuplot" "HDF5" :: "HDF5 surface format (alas not implemented yet)" } "ASCII (gnuplot)" # n.b. this refers to the patch system (angular) interpatch ghost zones, # *not* the Cactus interprocessor ghost zones boolean output_ghost_zones_for_h \ "should we include the patch system (angular) interpatch ghost zones \ in h data files?" { } "false" # n.b. making this "gnuplot" probably isn't a good idea, # since it could create confusion with gnuplot command files string ASCII_gnuplot_file_name_extension \ "extension for ASCII (gnuplot) data files" { .+ :: "any nonempty string" } "gp" string HDF5_file_name_extension "extension for HDF5 data files" { .+ :: "any nonempty string" } "hdf5" # # These file names are actually just "base" file names, with the full # file names being given by a printf() format "%s.t%d.ah%d[.it%d].%s", # where # - the first %s is the base file name, # - the first %d is the global Cactus time iteration number cctk_iteration, # - the second %d is the apparent horizon number, ande # - the optional third %d is the horizon finder iteration number # - the second %s is the file name extension as set by the # {ASCII,HDF5}_data_file_name_extension # string h_base_file_name \ "base file name for horizon shape h input/output file(s)" { .+ :: "any nonempty string" } "h" string Theta_base_file_name "base file name for Theta(h) output file(s)" { .+ :: "any nonempty string" } "Theta" string Delta_h_base_file_name \ "base file name for horizon-shape-update Delta_h output file(s)" { .+ :: "any nonempty string" } "Delta_h" ######################################## # # parameters for BH diagnostics # # # The file format is currently hard-wired to a simple ASCII format: # - there is one file per AH # - after some header comments (starting with '#'), # there is one line per successful-AH-finding # (there is *no* line if we fail to find an AH) # - each line contains various tab-separated fields, as described by # the header comment # boolean output_BH_diagnostics \ "should we output BH diagnostics to a data file for each AH found?" { } "true" # # These file names are actually just "base" file names, with the full # file names being given by a printf() format "%s.ah%d.%s", # where # - the first %s is the base file name, # - the %d is the global Cactus time iteration number cctk_iteration, # - the second %s is the file name extension as set by the # BH_diagnostics_file_name_extension parameter # string BH_diagnostics_base_file_name \ "base file name for BH diagnostics output file(s)" { .+ :: "any nonempty string" } "BH_diagnostics" string BH_diagnostics_file_name_extension \ "extension for BH diagnostics data files" { .+ :: "any nonempty string" } "gp" ######################################## # # parameters mainly for debugging # # this is mainly useful for debugging purposes boolean output_initial_guess \ "should we output the initial guess back to the h data file?" { } "false" # for debugging convergence failures, we can optionally output # h, Theta, and delta_h at each Newton iteration # (the file names are the usual ones with ".it%d" appended) boolean debugging_output_at_each_Newton_iteration \ "should we output {h, Theta, delta_h} at each Newton iteration?" { } "false" string Jacobian_base_file_name "base file name for Jacobian output file(s)" { .+ :: "any valid file name" } "Jacobian.dat" ################################################################################ # # ***** parameters for setting a mask grid function *** # ***** based on each apparent horizon shape ***** # boolean set_horizon_mask \ "should we set a mask grid function (or functions) for each horizon?" { } "false" # # If we set a mask, we do so based on a "mask volume" for each horizon, # defined by # r(rho,sigma) = mask_radius_multiplier*h(rho,sigma) # + dx*mask_radius_offset # where # r(rho,sigma) = gives the adjusted-horizon radius # as a function of angular coordinates about # the local coordinate origin # h(rho,sigma) = gives the radius of the apparent horizon # as a function of angular coordinates about # the local coordinate origin # dx = geometric mean of the Cactus x, y, and z grid spacings # real mask_radius_multiplier[5] \ "radius multiplier to define the mask volume for this horizon" { (0:*) :: \ "any positive real number; typically this will be slightly less than 1.0" } 0.8 real mask_radius_offset[5] \ "radius offset (in Cactus grid spacings) to define the mask volume \ for this horizon" { *:* :: "any real number; typically this will be negative" } -5.0 # # This thorn supports two types of mask grid functions: # * the "old" style is that defined by CactusEinstein/AHFinder: # the mask is a CCTK_REAL grid function, which is set to specified # (CCTK_REAL) values inside/outside the (adjusted) horizon # * the "new" style is that defined by CactusEinstein/SpaceMask: # the mask is a CCTK_INT grid function, with a specified bit field # set to specified values inside/outside the (adjusted) horizon # [N.b. AHFinderDirect doesn't set up the bit fields -- # you must arrange for some other thorn to do this. At # present AHFinderDirect converts the names specified here # to integer bit masks only once, in its setup routine; # this may change to do this conversion each time AHFinderDirect # does horizon finding.] # You can choose to set either (or even both!) of these. # boolean set_old_style_mask \ "if we're setting a mask, should we set an old-style (CCTK_REAL) mask gridfn?" { } "true" boolean set_new_style_mask \ "if we're setting a mask, should we set an new-style (CCTK_INT) mask gridfn?" { } "false" # # mask info for mask_type = "old-style (CCTK_REAL)" # defaults match CactusEinstein/AHFinder # string old_style_mask_gridfn_name "name of the old-style mask grid function" { .+ :: "any valid Cactus grid function name" } "SpaceMask::emask" real old_style_mask_inside_value \ "set the old-style mask to this value *inside* the mask volume" { *:* :: "any real number" } 0.0 real old_style_mask_outside_value \ "set the old-style mask to this value *outside* the mask volume" { *:* :: "any real number" } 1.0 # # mask info for mask_type = "new-style (CCTK_INT)" # string new_style_mask_gridfn_name "name of the new-style mask grid function" { .+ :: "any valid Cactus grid function name" } "SpaceMask::space_mask" string new_style_mask_bitfield_name \ "name of the new-style mask bit field ('type') as registered with SpaceMask" { .+ :: "any valid bit field ('type') name registered with the SpaceMask thorn" } "mask" string new_style_mask_inside_state_name \ "set the specified bit field of the new-style mask to this named state \ at grid points *inside* the mask volume" { .+ :: "any state name registered with the SpaceMask thorn" } "excised" string new_style_mask_outside_state_name \ "set the specified bit field of the new-style mask to this named state \ at grid points *outside* the mask volume" { .+ :: "any state name registered with the SpaceMask thorn" } "normal" ################################################################################ # # ***** parameters controlling how we handle errors/warnings ***** # # # We currently "handle" the following errors/warnings by CCTK_VWarn(); # these parameters give the warning levels (in the sense of the -W flag # to Cactus, and the first argument to CCTK_VWarn()) for various conditions: # # point outside (or too close to boundary of) Cactus grid, # i.e. geometry interpolator returns CCTK_ERROR_INTERP_POINT_OUTSIDE # ... warning level if error occurs on first Newton iteration, # i.e. when evaluating expansion/Jacobian for initial guess # ... this may mean that driver::ghost_size is too small, especially # if any horizon crosses a symmetry boundary # ==> visible message by default int warn_level__point_outside__initial \ "warning level for point outside (or too close to boundary of) Cactus grid \ (error occurs on first Newton iteration)" { -1:* :: "any valid Cactus warning level" } 1 # ... warning level if error occurs on a subsequent Newton iteration # ... this probably "just" means there's no horizon in the grid # ==> no visible message by default int warn_level__point_outside__subsequent \ "warning level for point outside (or too close to boundary of) Cactus grid \ (error occurs on subsequent Newton iteration)" { -1:* :: "any valid Cactus warning level" } 2 # the Cactus configure process didn't find a finite() function, # so we're skipping the "check that the geometry is finite" tests # even though the user set check_that_geometry_is_finite = "true" int warn_level__skipping_finite_check \ "warning level if the user sets check_that_geometry_is_finite \ but the Cactus configure process doesn't find a finite() function \ so we have to skip the finite-geometry check" { -1:* :: "any valid Cactus warning level" } 3 # infinity and/or NaN in interpolated {g_ij, partial_k g_ij, K_ij} int warn_level__nonfinite_geometry \ "warning level if we find infinity and/or NaN in the interpolated geometry \ values {g_ij, partial_k g_ij, K_ij}" { -1:* :: "any valid Cactus warning level" } 1 # interpolated g_{ij} isn't positive definite # (usually this means we're too close to a singularity) # ... warning level if error occurs on first Newton iteration, # i.e. when evaluating expansion/Jacobian for initial guess int warn_level__gij_not_positive_definite__initial \ "warning level if the interpolated g_{ij} isn't positive definite \ (usually this means we're too close to a singularity) \ (error occurs on first Newton iteration)" { -1:* :: "any valid Cactus warning level" } 2 # ... warning level if error occurs on a subsequent Newton iteration int warn_level__gij_not_positive_definite__subsequent \ "warning level if the interpolated g_{ij} isn't positive definite \ (usually this means we're too close to a singularity) \ (error occurs on subsequent Newton iteration)" { -1:* :: "any valid Cactus warning level" } 2 ################################################################################ # # ***** parameters for the Newton's-method solution of Theta(h) = 0 ***** # # # The first time we (try to) find a given horizon, our initial guess # is likely to be rather inaccurate, so we may need a larger number of # iterations. But if we've found this horizon before, then we have its # previous position as an initial guess, so (assuming that we've been # scheduled at each time step) we shouldn't need as many iterations. # int max_Newton_iterations__initial \ "maximum number of Newton iterations before giving up \ when initially finding a given horizon" { (0:* :: "any positive integer" } 20 int max_Newton_iterations__subsequent \ "maximum number of Newton iterations before giving up \ when re-finding a given horizon after finding it before" { (0:* :: "any positive integer" } 10 # # To avoid the Newton iteration diverging if there is no horizon present # or if the initial guess is bad, 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_allowable_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 # # convergence tolerance for the Newton iteration # real Theta_norm_for_convergence \ "we declare the horizon to be found if ||Theta||_infinity <= this" { (0.0:* :: "any positive real number" } 1.0e-8 ################################################################################ # # ***** parameters to define the patch system(s) ***** # # # For each apparent horizon, you need to set these parameters to the # Cactus xyz coordinates of a "local origin point" inside the horizon, # which will serve as the origin for the apparent horizon finder's # local angular coordinate system. # # The apparent horizon surface (and in fact all the trial surfaces the # apparent horizon finder generates while iteratively solving the apparent # horizon equation) is restricted to being a Strahlkoerper ("star-shaped # region") about the origin point. That is, each surface must be of # the form r = h(angle) with h a single-valued function. # # If the origin point is too far from the actual horizon centroid, i.e. # if it's too close to the horizon surface itself, then the apparent # horizon finder's Newton iteration won't converge as quickly or robustly. # However, in practice the tolerances on this are quite loose -- 1/4 # of the horizon radius is no problem, and even 1/2 the horizon radius # only slows the convergence by an extra iteration or two. # real origin_x[5] "global x coordinate of patch system origin" { *:* :: "any real number" } 0.0 real origin_y[5] "global y coordinate of patch system origin" { *:* :: "any real number" } 0.0 real origin_z[5] "global z coordinate of patch system origin" { *:* :: "any real number" } 0.0 # # The "(rotating)" patch system types are ok for evaluating Theta(h), # but don't work yet for apparent horizon finding # (the Jacobian computation doesn't yet grok the nonlocal rotation BCs). # keyword patch_system_type[5] "what type of patch system should we use?" { # choose this for normal use "match Cactus grid symmetry" :: \ "choose automagically based on grid symmetries and the patch system's origin" "full sphere" :: "full sphere, no symmetries" "+z hemisphere" :: "mirror symmetry across z=0 plane" "+xy quadrant (rotating)" :: "90 degree periodic rotation symmetry about z axis" "+xy quadrant (mirrored)" :: "mirror symmetry across x=0 and y=0 planes" "+xz quadrant (rotating)" :: \ "180 degree periodic rotation symmetry about z axis \ and mirror symmetry across z=0 plane" "+xyz octant (rotating)" :: \ "90 degree periodic rotation symmetry about z axis \ and mirror symmetry across z=0 plane" "+xyz octant (mirrored)" :: "mirror symmetry across x=0 and y=0 and z=0 planes" } "match Cactus grid symmetry" # # This parameter sets the angular resolution of each patch systems: # the angular grid spacing in degrees is 90.0/N_zones_per_right_angle. # # In practice the error in the horizon position is usually dominated # by the errors from interpolating the Cactus gij and Kij to the horizon # position, not by the angular finite differencing or interpatch interpolation # errors. Thus this parameter can be made fairly small (low resolution) # for better performance, without seriously affecting the accuracy # with which we can locate the horizon. # # *** IMPORTANT # *** For any patch system type other than "full sphere", there are # *** patches with 45 degree widths, so this parameter must be even. # # Normally we use Simpson's rule (in a variant which doesn't require the # number of zones to be even) for angular integrations over the patch # system. However, if the number of angular zones in a patch is very # small and odd (i.e. 3 or 5), then we have to use the trapezoid rule # instead, so the integrations are less accurate. This occurs for # N_zones_per_right_angle = 3 or 5 for a full sphere patch system, # or N_zones_per_right_angle = 6 or 10 for any other patch system type. # # For large values of this parameter, this thorn takes CPU time which # scales roughly as the ... # ... 6th power of this parameter # if Jacobian_store_solve_method = "dense matrix/LAPACK" # ... 3rd power of this parameter # if Jacobian_store_solve_method = "row-oriented sparse matrix/ILUCG" # int N_zones_per_right_angle[5] "sets angular resolution of patch systems" { 1:* :: "any integer >= 1; must be even for patch systems other than full-sphere" } 18 # # This parameter sets the width of the interpatch ghost zones in the # patch system. Note that this thorn uses the terminology "ghost zone" # for any of what Cactus in general now calls a "boundary zone" or a # "symmetry zone" or a "patch zone". # # This parameter must be at least # ... 2 if FINITE_DIFF_ORDER is set to 4 in "src/include/config.hh" # ... 1 if FINITE_DIFF_ORDER is set to 2 in "src/include/config.hh" # The code checks for this being too small, and reports a fatal error if so. # int ghost_zone_width "number of ghost zones on each side of a patch" { 0:* :: "any integer >= 0" } 2 # # Our code that computes surface integrals over patches (used for # computing BH diagnostics like centroids, areas, masses, etc) silently # assumes that this parameter is == 1, so you should probably leave # it at that setting. # int patch_overlap_width \ "number of grid points that nominally-just-touching patches should overlap" { 1:*:2 :: "any integer >= 0; current implementation requires that it be odd" } 1 ################################################################################ # # ***** parameters for the Jacobian matrix ***** # keyword Jacobian_compute_method "how do we compute the Jacobian matrix?" { # for debugging only" "numerical perturbation" :: "n.b. this is *very* slow" # use this for normal apparent horizon finding "symbolic differentiation with finite diff d/dr" :: \ "fast, tricky programming, uses only gij, dx gij, Kij" # alas, this isn't implemented yet :( "symbolic differentiation" :: \ "fast, tricky programming, uses gij, dx gij, dxx gij, Kij, dx Kij" } "symbolic differentiation with finite diff d/dr" # # This parameter lists all known methods for storing the Jacobian and # solving linear systems with the Jacobian as the LHS matrix. See # "src/include/config.hh" for which of these are actually compiled in at # the moment. N.b. each compiled-in method requires linking with the # corresponding linear-solver library; see "src/make.configuration.defn" # for details on these libraries. # keyword Jacobian_store_solve_method \ "how do we store/linear-solve the Jacobian matrix?" { # good for debugging, but very slow for large N_zones_per_right_angle "dense matrix/LAPACK" :: \ "store as (Fortran) dense matrix, solve with LAPACK routines" # use this for normal runs "row-oriented sparse matrix/ILUCG" :: \ "store as sparse matrix (row-oriented storage format), \ solve with ILUCG (incomplete LU decomposition - conjugate gradient) method" } "row-oriented sparse matrix/ILUCG" # # This parameter controls two different sorts of one-sided finite # differencing: # - numerical-perturbation Jacobian computations # - the finite differencing part of the "symbolic differentiation # with finite diff d/dr" Jacobian computation # # Notes on this parameter: # - don't set it too small or roundoff errors will become large # - don't set it too large or finite differencing errors will become large # In practice the default value should be fine # real Jacobian_perturbation_amplitude \ "perturbation amplitude for 1-sided finite differencing for Jacobians" { (0.0:* :: "any real number > 0" } 1.0e-6 # if AHFinderDirect::method = "test Jacobian", should we test all # known methods for computing the Jacobian, or just the numerical perturbation # method (the latter may be useful of some other methods are broken) boolean test_all_Jacobian_compute_methods \ "should we test all Jacobian computation methods, or just NP?" { } "true" ################################################################################ # # ***** parameters for how we compute the slice's geometry ***** # ***** (gij, Kij, partial_k gij) ***** # keyword geometry_method "how do we compute the slice's geometry?" { # this is for normal use "globally interpolate from Cactus grid" :: \ "interpolate gij and Kij from global Cactus grid \ using CCTK_InterpGridArrays() global interpolator API" # for testing/debugging "locally interpolate from Cactus grid" :: \ "interpolate gij and Kij from local Cactus grid on this processor \ using CCTK_InterpLocalUniform() localinterpolator API" # for testing/debugging "Schwarzschild/EF" :: \ "hard-wire to Schwarzschild spacetime / Eddington-Finkelstein slice" } "globally interpolate from Cactus grid" ######################################## # # parameters for geometry_method = "interpolate from Cactus grid" # # This 3D interpolator is used to interpolate gij and Kij from the # Cactus grid to the position of each trial horizon surface, giving # gij, Kij, and partial_x gij as outputs. This interpolator must have # the following properties: # - It must support taking at least 1st derivatives as part of the # interpolation. # - It should give at least $C^1$ interpolants for smooth data, otherwise # the Theta(h) function will have "spikes" and the Newton iteration may # fail to converge all the way down to tight error tolerances. $C^2$ # would be even better, but in practice a ($C^1$) Hermite interpolant # works well. # In practice the default values for these parameters should work fine # (so long as you compile with CactusBase/LocalInterp and activate that # thorn). # string coordinate_system_name \ "name under which the coordinate system is registered in Cactus" { .+ :: "any string (in practice it should be nonempty)" } "cart3d" string geometry_interpolator_name \ "name under which the geometry interpolation operator is registered in Cactus" { .+ :: "any string" } "Hermite polynomial interpolation" string geometry_interpolator_pars \ "parameters for the geometry interpolator" { .* :: "any string acceptable to Util_TableSetFromString() and to the interpolator" } "order=3 \ boundary_off_centering_tolerance={1.0e-10 1.0e-10 1.0e-10 1.0e-10 1.0e-10 1.0e-10} \ boundary_extrapolation_tolerance={0.0 0.0 0.0 0.0 0.0 0.0}" ######################################## # # parameters for geometry_method = "Schwarzschild/EF" # real geometry__Schwarzschild_EF__mass "mass of Schwarzschild BH" { (0.0:* :: "BH mass = any real number > 0" } 1.0 real geometry__Schwarzschild_EF__x_posn "x coordinate of Schwarzschild BH" { *:* :: "any real number" } 0.0 real geometry__Schwarzschild_EF__y_posn "y coordinate of Schwarzschild BH" { *:* :: "any real number" } 0.0 real geometry__Schwarzschild_EF__z_posn "z coordinate of Schwarzschild BH" { *:* :: "any real number" } 0.0 # some of the formulas have 0/0 limits on the z axis; this parameter controls # where we switch from the generic formulas to the L'Hopital's-rule z axis # limits # - don't set this parameter too small or roundoff errors will be excessive # - don't set this parameter too large or finite differencing errors will # be excessive # in practice the default value should be fine # n.b. this is used for centered finite differencing, unlike the Jacobian real geometry__Schwarzschild_EF__epsilon \ "threshold for sin^2 theta = (x^2+y^2)/r^2 below which we use z axis limits" { (0.0:* :: "this should be somewhat above the floating-point roundoff level" } 1.0e-9 # we compute partial_k g_ij by numerical finite differencing of the exact # analytical g_ij values; this parameter sets the "grid spacing" for this # - don't set this parameter too small or roundoff errors will be excessive # - don't set this parameter too large or finite differencing errors will # be excessive # in practice the default value should be fine # ... 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" { (0.0:* :: "any real number > 0" } 1.0e-6 ######################################## # # These tests control whether we check that various angular gridfns # are finite (neither NaN nor infinity) at various points in evaluating # the Theta(h) function. These are pretty cheap tests, and they're quite # useful in catching assorted wierdness, so it's probably worth leaving # them enabled unless you're trying to squeeze every last nanosecond... # boolean check_that_h_is_finite \ "should we check that horizon shape function h is finite?" { } "true" boolean check_that_geometry_is_finite \ "should we check the interpolated geometry variables are finite?" { } "true" ################################################################################ # # ***** parameters for the interpatch interpolation ***** # # # This 1D local interpolator is used to interpolate the h function between # angular patches. Because any given patch boundary only interpolates # from a single neighboring patch (this is to simplify the bookkeeping), # near the patch corners this interpolator will have to be used off-centered. # Thus it's desirable to use an interpolator which retains reasonable # accuracy right up to the edge of the data range. In practice a Lagrange # polynomial interpolant works well. # string interpatch_interpolator_name \ "name under which the interpatch interpolation operator is registered in Cactus" { .+ :: "any string (in practice it should be nonempty)" } "Lagrange polynomial interpolation" string interpatch_interpolator_pars \ "parameters for the interpatch interpolator" { .* :: "any string acceptable to Util_TableSetFromString() and to the interpolator" } "order=5" ################################################################################ # # ***** parameters for the surface interpolation ***** # # # This 2D local interpolator is used to interpolate the horizon radius # arbitrary angular coordinate, to find out whether a given xyz point is # inside or outside the horizon. # # At present this interpolator is used only if set_horizon_mask is true. # Otherwise, these parameters may both be set to empty strings. # string surface_interpolator_name \ "name under which the surface interpolation operator is registered in Cactus" { "" :: "the empty string if this interpolator isn't going to be used" .+ :: "any string (in practice it should be nonempty)" } "Lagrange polynomial interpolation" string surface_interpolator_pars \ "parameters for the surface interpolator" { .* :: "any string acceptable to Util_TableSetFromString() and to the interpolator" } "order=3 \ boundary_off_centering_tolerance={1.0e-10 1.0e-10 1.0e-10 1.0e-10} \ boundary_extrapolation_tolerance={0.0 0.0 0.0 0.0}" ################################################################################ # # ***** parameters for computing line/surface integrals over the horizon ***** # # # In the descriptions, N is the number of grid zones in a patch # in either the rho or the sigma direction, i.e. it's 45 or 90 degrees # divided by delta_drho_dsigma. # keyword integral_method "how do we compute integrals over the horizon?" { "trapezoid" :: "alternate name for trapezoid rule" "trapezoid rule" :: "trapezoid rule (2nd order for smooth functions)" "Simpson" :: "alternate name for Simpson's rule" "Simpson's rule" :: \ "Simpson's rule (4th order for smooth fns, requires N to be even)" "Simpson (variant)" :: "alternate name for Simpson's rule variant" "Simpson's rule (variant)":: \ "Simpson's rule variant (4th order for smooth fns, requires N >= 7)" # choose this for normal use (assuming FINITE_DIFF_ORDER is set to 4 # in "src/include/config.hh") "automatic choice" :: \ "choose Simpson's rule or variant if applicable, otherwise trapezoid rule" } "automatic choice" ################################################################################ ### ### ***** parameters for the test driver "src/patch/test_patch_system.cc" ***** ### ### By default this test driver isn't compiled into the cactus executable, ### and these parameters are ignored. To compile this test driver into ### the cactus executable (and have these parameters used), ### - edit the list of "source files in this directory" in ### "src/patch/make.code.defn" to add test_patch_system.cc ### - comment out the list of "subdirectories containing source files" in ### "src/make.code.defn", and uncomment the alternate list which is ### normally commented out there (this omits the higher-level directories ### src/elliptic/, src/gr/, and src/driver/) ### ##keyword which_test "which test should we do?" ##{ ##"gridfn" :: "set up test fn(x,y,z), print it" ##"read gridfn" :: "read in ghosted test fn(x,y,z), print it" ##"synchronize" :: "set up test fn(x,y,z), synchronize it, print errors" ##"ghost zone Jacobian":: \ ## "set up test fn(x,y,z), compute Jacobian of gz.synchronize(), compare with NP" ##"derivatives" :: "set up test fn(rho,sigma), take derivs, print errors" ##} "gridfn" ## ##int which_derivs "bit flags to specify which derivatives to test" ##{ ##0:63 :: "any set of bit flags" ##} 63 ## ### true ==> gives a more thorough test of the Jacobian, ### but makes the test run much slower ### false ==> gives a slightly less thorough test, but runs faster ##boolean NP_Jacobian__perturb_all_y_patch_points \ ## "should we perturb at *all* points in the y patch, or just those with the \ ## iperp which is (supposedly) involved in the interpatch interpolation?" ##{ ##} "true" ## ##################################################################################