aboutsummaryrefslogtreecommitdiff
path: root/param.ccl
blob: 121c91082a9c2e675fd4e09fea6503085ccb4994 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# Parameter definitions for thorn AHFinderDirect
# $Header$

################################################################################

#
# overall parameters for the apparent horizon finding algorithm itself
#

keyword method "top-level method used to find the apparent horizon"
{
"horizon function"  :: "evaluate the LHS function H(h)"
"Jacobian test"	    :: \
  "compute/print the J[H(h)] Jacobian matrix by all possible methods"
"Newton solve"	    :: "find the horizon via Newton's method"
} "horizon function"

################################################################################

#
# parameters for the Jacobian matrix $J[H(h)]$
#

keyword Jacobian_method "how do we compute the Jacobian matrix?"
{
"numerical perturbation"    :: \
  "*very* slow, but useful for debugging"
"symbolic differentiation with finite diff d/dr" :: \
  "fast, tricky programming, uses only gij, dx gij, Kij"
"symbolic differentiation"  :: \
  "fast, tricky programming, uses gij, dx gij, dxx gij, Kij, dx Kij"
} "symbolic differentiation with finite diff d/dr"

keyword Jacobian_storage_method "how do we store the Jacobian matrix?"
{
"dense matrix"	:: "dense matrix (inefficient, but good for debugging)"
} "dense matrix"

#
# this is used for 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

################################################################################

#
# parameters for the Newton's-method solution of $H(h) = 0$
#

int max_Newton_iterations "maximum number of Newton iterations before giving up"
{
(0:* :: "any positive integer"
} 10

# if this is used, the file names are the usual ones with ".it%d" appended
boolean output_h_and_H_at_each_Newton_iteration \
  "should we output h and H at each Newton iteration (for debugging)?"
{
} "false"

#
# we declare convergence if *either* of the following two criteria are met
#
real H_norm_for_convergence "declare convergence if ||H||_inf <= this"
{
(0.0:* :: "any positive real number"
} 1.0e-10

real Delta_h_norm_for_convergence \
  "declare convergence after any Newton step with ||Delta_h||_inf <= this"
{
(0.0:* :: "any positive real number"
} 1.0e-10

boolean final_H_update_if_exit_x_H_small \
  "should we do a final H(h) update after a h += Delta_h update which is\
   so small it meets the Delta_h_norm_for_convergence convergence criterion?"
{
} "false"

################################################################################

#
# input/output file name parameters
#

string h_file_name "file name from/to which to read/write horizon shape h"
{
.* :: "any string"
} "h.dat"

string H_of_h_file_name "file name to which to write final H(h) function"
{
.* :: "any string"
} "H.dat"

string Jacobian_file_name "name of the Jacobian output file"
{
.+ :: "any valid file name"
} "Jacobian.dat"

################################################################################

#
# parameters to define the patch system
#
private:

real origin_x "global x coordinate of patch system origin"
{
*:* :: "any real number"
} 0.0
real origin_y "global y coordinate of patch system origin"
{
*:* :: "any real number"
} 0.0
real origin_z "global z coordinate of patch system origin"
{
*:* :: "any real number"
} 0.0

keyword patch_system_type "what type of patch system should we use?"
{
"full sphere"	:: "full sphere, no symmetries"
"+z hemisphere"	:: "mirror symmetry across z=0 plane"
"+xy quadrant"	:: "90 degree periodic rotation symmetry about z axis"
"+xz quadrant"	:: "mirror symmetry across z=0 plane *and* \
		    180 degree periodic rotation symmetry about z axis"
"+xyz octant"	:: "mirror symmetry across z=0 plane *and* \
		    90 degree periodic rotation symmetry about z axis"
} "full sphere"

int N_ghost_points "number of ghost zones on each side of a patch"
{
0:* :: "any integer >= 0"
} 2

int N_overlap_points \
  "number of grid points that nominally-just-touching patches should overlap"
{
1:*:2 :: "any integer >= 0; current implementation requires that it be odd"
} 1

real delta_drho_dsigma "angular grid spacing of patches, in degrees"
{
(0.0:* :: "any real number > 0.0"
} 5.0

################################################################################

#
# 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?"
{
"interpolate from Cactus grid" :: "interpolate gij and Kij from Cactus grid"
"Schwarzschild/EF"             :: \
  "hard-wire to Schwarzschild spacetime / Eddington-Finkelstein slice"
} "interpolate from Cactus grid"

########################################

#
# parameters for geometry_method = "interpolate from Cactus grid"
#

string geometry_interpolator_name \
  "name under which the geometry interpolation operator is registered in Cactus"
{
.* :: "any string"
} "generalized polynomial interpolation"

string geometry_interpolator_pars \
  "parameters for the geometry interpolator"
{
.* :: "any string acceptable to Util_TableSetFromString()"
} "order=4"

########################################

#
# 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-12

# 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

################################################################################

#
# parameters for the interpatch interpolator
#
string interpatch_interpolator_name \
  "name under which the interpatch interpolation operator is registered in Cactus"
{
.* :: "any string"
} "generalized polynomial interpolation"

string interpatch_interpolator_pars \
  "parameters for the interpatch interpolator"
{
.* :: "any string acceptable to Util_TableSetFromString()"
} "order=4"

################################################################################

#
# 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"

# parameters for initial_guess_method = "ellipsoid"
real initial_guess__ellipsoid__x_center "x coordinate of ellipsoid center"
{
*:* :: "any real number"
} 0.0
real initial_guess__ellipsoid__y_center "y coordinate of ellipsoid center"
{
*:* :: "any real number"
} 0.0
real initial_guess__ellipsoid__z_center "z coordinate of ellipsoid center"
{
*:* :: "any real number"
} 0.0
real initial_guess__ellipsoid__x_radius "x radius of ellipsoid"
{
(0.0:* :: "any real number > 0.0"
} 2.0
real initial_guess__ellipsoid__y_radius "y radius of ellipsoid"
{
(0.0:* :: "any real number > 0.0"
} 2.0
real initial_guess__ellipsoid__z_radius "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"
{
*:* :: "any real number"
} 0.0
real initial_guess__Kerr__y_posn "y coordinate of Kerr BH"
{
*:* :: "any real number"
} 0.0
real initial_guess__Kerr__z_posn "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"
{
(0.0:*		:: "BH mass = any real number > 0"
} 1.0
real initial_guess__Kerr__spin "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

################################################################################

#
# parameters for the test driver  src/util/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/util/make.code.defn  to add  test_patch_system.cc
# - edit the list of "subdirectories containing source files" in
#    src/make.code.defn  to disable the higher-level directories
#    elliptic and  gr
#
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"

################################################################################