diff options
-rw-r--r-- | interface.ccl | 9 | ||||
-rw-r--r-- | param.ccl | 30 | ||||
-rw-r--r-- | schedule.ccl | 23 | ||||
-rw-r--r-- | src/gr/driver.cc | 4 | ||||
-rw-r--r-- | src/gr/horizon_function.cc | 3 |
5 files changed, 46 insertions, 23 deletions
diff --git a/interface.ccl b/interface.ccl index 2213765..3cb9303 100644 --- a/interface.ccl +++ b/interface.ccl @@ -2,10 +2,5 @@ # $Header$ implements: AHFinder - -# this thorn doesn't define or use any Cactus grid variables -# but bad things happen if we don't have anything -##int dummy type=gf -##{ -##dummy -##} "dummy gridfn" +inherits: grid +inherits: einstein @@ -70,17 +70,27 @@ string interpatch_interpolator_pars \ ################################################################################ # -# parameters for the test driver +# parameters for the interpolator used to interpolate the "geometry" +# $g_{ij}$ and $K_{ij}$ to the apparent horizon surface position # -keyword which_test "which test should we do?" +string geometry_interpolator_name \ + "name under which the geometry interpolation operator is registered" { -"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" -"derivatives" :: "set up test fn(rho,sigma), take derivs, print errors" -} "gridfn" +.* :: "any string" +} "generalized polynomial interpolation" + +string geometry_interpolator_pars \ + "parameters for the geometry interpolation" +{ +.* :: "any string acceptable to Util_TableSetFromString()" +} "" + +################################################################################ -int which_derivs "bit flags to specify which derivatives to test" +# +# overall parameters for the apparent horizon finder +# +keyword method "top-level method used to find the apparent horizon" { -0:63 :: "any set of bit flags" -} 63 +"horizon" :: "don't find the apparent horizon, just evaluate H(h)" +} "horizon" diff --git a/schedule.ccl b/schedule.ccl index 360766b..afe9ce2 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -1,10 +1,21 @@ # Schedule definitions for thorn AHFinderDirect # $Header$ -# don't want to schedule at ANALYSIS yet, -# since that doesn't run unless there's a trigger variable being output -schedule test_patch_system at CCTK_POSTINITIAL +# +# 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 AHFinderDirect_driver at CCTK_POSTINITIAL { -LANG: C -OPTIONS: global -} "test driver to verify that src/util/ and src/jtutil/ code works properly" +lang: C +options: global +} "find apparent horizon(s)" + +##schedule test_patch_system at CCTK_POSTINITIAL +##{ +##LANG: C +##OPTIONS: global +##} "test driver to verify that src/util/ and src/jtutil/ code works properly" diff --git a/src/gr/driver.cc b/src/gr/driver.cc index 58eeaf6..f63bcd4 100644 --- a/src/gr/driver.cc +++ b/src/gr/driver.cc @@ -152,7 +152,11 @@ patch_system ps(origin_x, origin_y, origin_z, if (STRING_EQUAL(method, "horizon")) then { ps.read_ghosted_gridfn(ghosted_gfns::gfn__h, "h.dat", false); + const int timer_handle = CCTK_TimerCreateI(); + CCTK_TimerStartI(timer_handle); horizon_function(ps, cgi, gii); + CCTK_TimerStopI(timer_handle); + CCTK_TimerPrintDataI(timer_handle, -1); ps.print_gridfn(nominal_gfns::gfn__H, "H.dat"); } else CCTK_VWarn(-1, __LINE__, __FILE__, CCTK_THORNSTRING, diff --git a/src/gr/horizon_function.cc b/src/gr/horizon_function.cc index 04bb186..42e8f1d 100644 --- a/src/gr/horizon_function.cc +++ b/src/gr/horizon_function.cc @@ -95,6 +95,9 @@ void horizon_function(patch_system& ps, { CCTK_VInfo(CCTK_THORNSTRING, " horizon function"); +// fill in values of ghosted gridfns in ghost zones +ps.synchronize_ghost_zones(ghosted_gfns::gfn__h, ghosted_gfns::gfn__h); + // compute xyz positions of grid points and xyz derivative coeffs xyz_posns_and_deriv_coeffs(ps); |