From 006083638b7fcad16e5e2c6eed71f72f2c1a2c9c Mon Sep 17 00:00:00 2001 From: schnetter Date: Tue, 14 Jun 2005 20:26:02 +0000 Subject: Add Frank Herrmann's extra dissipation switches. Two new parameters, Dissipation::extra_dissipation_in_horizons and Dissipation::extra_dissipation_at_outerbound, increase the disspation coefficient inside horizons and near the outer boundary. git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Dissipation/trunk@10 850bcc8b-0e4f-0410-8c26-8d28fbf1eda9 --- interface.ccl | 22 + param.ccl | 48 ++ schedule.ccl | 12 + src/apply_dissipation.F77 | 7 +- src/basegrid.c | 4 + src/dissipation.c | 14 +- src/make.code.defn | 2 +- src/paramcheck.c | 29 + src/setup_epsdis.c | 233 +++++++ test/test_ah.par | 144 +++++ test/test_ah/BH_diagnostics.ah1.gp | 46 ++ test/test_ah/alp.x.asc | 367 +++++++++++ test/test_ah/alp.y.asc | 361 +++++++++++ test/test_ah/alp.z.asc | 277 ++++++++ test/test_ah/alp_maximum.xg | 4 + test/test_ah/alp_minimum.xg | 4 + test/test_ah/alp_norm1.xg | 4 + test/test_ah/alp_norm2.xg | 4 + test/test_ah/betax.x.asc | 367 +++++++++++ test/test_ah/betax.y.asc | 361 +++++++++++ test/test_ah/betax.z.asc | 277 ++++++++ test/test_ah/betax_maximum.xg | 4 + test/test_ah/betax_minimum.xg | 4 + test/test_ah/betax_norm1.xg | 4 + test/test_ah/betax_norm2.xg | 4 + test/test_ah/betay.x.asc | 367 +++++++++++ test/test_ah/betay.y.asc | 361 +++++++++++ test/test_ah/betay.z.asc | 277 ++++++++ test/test_ah/betay_maximum.xg | 4 + test/test_ah/betay_minimum.xg | 4 + test/test_ah/betay_norm1.xg | 4 + test/test_ah/betay_norm2.xg | 4 + test/test_ah/betaz.x.asc | 367 +++++++++++ test/test_ah/betaz.y.asc | 361 +++++++++++ test/test_ah/betaz.z.asc | 277 ++++++++ test/test_ah/betaz_maximum.xg | 4 + test/test_ah/betaz_minimum.xg | 4 + test/test_ah/betaz_norm1.xg | 4 + test/test_ah/betaz_norm2.xg | 4 + test/test_ah/epsdisA.x.asc | 367 +++++++++++ test/test_ah/epsdisA.y.asc | 361 +++++++++++ test/test_ah/epsdisA.z.asc | 277 ++++++++ test/test_ah/epsdisA_maximum.xg | 4 + test/test_ah/epsdisA_minimum.xg | 4 + test/test_ah/epsdisA_norm1.xg | 4 + test/test_ah/epsdisA_norm2.xg | 4 + test/test_ah/gxx.x.asc | 367 +++++++++++ test/test_ah/gxx.y.asc | 361 +++++++++++ test/test_ah/gxx.z.asc | 277 ++++++++ test/test_ah/gxx_maximum.xg | 4 + test/test_ah/gxx_minimum.xg | 4 + test/test_ah/gxx_norm1.xg | 4 + test/test_ah/gxx_norm2.xg | 4 + test/test_ah/gxy.x.asc | 367 +++++++++++ test/test_ah/gxy.y.asc | 361 +++++++++++ test/test_ah/gxy.z.asc | 277 ++++++++ test/test_ah/gxy_maximum.xg | 4 + test/test_ah/gxy_minimum.xg | 4 + test/test_ah/gxy_norm1.xg | 4 + test/test_ah/gxy_norm2.xg | 4 + test/test_ah/gxz.x.asc | 367 +++++++++++ test/test_ah/gxz.y.asc | 361 +++++++++++ test/test_ah/gxz.z.asc | 277 ++++++++ test/test_ah/gxz_maximum.xg | 4 + test/test_ah/gxz_minimum.xg | 4 + test/test_ah/gxz_norm1.xg | 4 + test/test_ah/gxz_norm2.xg | 4 + test/test_ah/gyy.x.asc | 367 +++++++++++ test/test_ah/gyy.y.asc | 361 +++++++++++ test/test_ah/gyy.z.asc | 277 ++++++++ test/test_ah/gyy_maximum.xg | 4 + test/test_ah/gyy_minimum.xg | 4 + test/test_ah/gyy_norm1.xg | 4 + test/test_ah/gyy_norm2.xg | 4 + test/test_ah/gyz.x.asc | 367 +++++++++++ test/test_ah/gyz.y.asc | 361 +++++++++++ test/test_ah/gyz.z.asc | 277 ++++++++ test/test_ah/gyz_maximum.xg | 4 + test/test_ah/gyz_minimum.xg | 4 + test/test_ah/gyz_norm1.xg | 4 + test/test_ah/gyz_norm2.xg | 4 + test/test_ah/gzz.x.asc | 367 +++++++++++ test/test_ah/gzz.y.asc | 361 +++++++++++ test/test_ah/gzz.z.asc | 277 ++++++++ test/test_ah/gzz_maximum.xg | 4 + test/test_ah/gzz_minimum.xg | 4 + test/test_ah/gzz_norm1.xg | 4 + test/test_ah/gzz_norm2.xg | 4 + test/test_ah/h.t0.ah1.gp | 1228 ++++++++++++++++++++++++++++++++++++ test/test_ah/h.t1.ah1.gp | 1228 ++++++++++++++++++++++++++++++++++++ test/test_ah/h.t2.ah1.gp | 1228 ++++++++++++++++++++++++++++++++++++ test/test_ah/h.t3.ah1.gp | 1228 ++++++++++++++++++++++++++++++++++++ test/test_ah/h.t4.ah1.gp | 1228 ++++++++++++++++++++++++++++++++++++ test/test_ah/ham.x.asc | 367 +++++++++++ test/test_ah/ham.y.asc | 361 +++++++++++ test/test_ah/ham.z.asc | 277 ++++++++ test/test_ah/ham_maximum.xg | 4 + test/test_ah/ham_minimum.xg | 4 + test/test_ah/ham_norm1.xg | 4 + test/test_ah/ham_norm2.xg | 4 + test/test_ah/kxx.x.asc | 367 +++++++++++ test/test_ah/kxx.y.asc | 361 +++++++++++ test/test_ah/kxx.z.asc | 277 ++++++++ test/test_ah/kxy.x.asc | 367 +++++++++++ test/test_ah/kxy.y.asc | 361 +++++++++++ test/test_ah/kxy.z.asc | 277 ++++++++ test/test_ah/kxz.x.asc | 367 +++++++++++ test/test_ah/kxz.y.asc | 361 +++++++++++ test/test_ah/kxz.z.asc | 277 ++++++++ test/test_ah/kyy.x.asc | 367 +++++++++++ test/test_ah/kyy.y.asc | 361 +++++++++++ test/test_ah/kyy.z.asc | 277 ++++++++ test/test_ah/kyz.x.asc | 367 +++++++++++ test/test_ah/kyz.y.asc | 361 +++++++++++ test/test_ah/kyz.z.asc | 277 ++++++++ test/test_ah/kzz.x.asc | 367 +++++++++++ test/test_ah/kzz.y.asc | 361 +++++++++++ test/test_ah/kzz.z.asc | 277 ++++++++ test/test_ah/momx.x.asc | 367 +++++++++++ test/test_ah/momx.y.asc | 361 +++++++++++ test/test_ah/momx.z.asc | 277 ++++++++ test/test_ah/momx_maximum.xg | 4 + test/test_ah/momx_minimum.xg | 4 + test/test_ah/momx_norm1.xg | 4 + test/test_ah/momx_norm2.xg | 4 + test/test_ah/momy.x.asc | 367 +++++++++++ test/test_ah/momy.y.asc | 361 +++++++++++ test/test_ah/momy.z.asc | 277 ++++++++ test/test_ah/momy_maximum.xg | 4 + test/test_ah/momy_minimum.xg | 4 + test/test_ah/momy_norm1.xg | 4 + test/test_ah/momy_norm2.xg | 4 + test/test_ah/momz.x.asc | 367 +++++++++++ test/test_ah/momz.y.asc | 361 +++++++++++ test/test_ah/momz.z.asc | 277 ++++++++ test/test_ah/momz_maximum.xg | 4 + test/test_ah/momz_minimum.xg | 4 + test/test_ah/momz_norm1.xg | 4 + test/test_ah/momz_norm2.xg | 4 + test/test_ob.par | 147 +++++ test/test_ob/BH_diagnostics.ah1.gp | 46 ++ test/test_ob/alp.x.asc | 367 +++++++++++ test/test_ob/alp.y.asc | 361 +++++++++++ test/test_ob/alp.z.asc | 277 ++++++++ test/test_ob/alp_maximum.xg | 4 + test/test_ob/alp_minimum.xg | 4 + test/test_ob/alp_norm1.xg | 4 + test/test_ob/alp_norm2.xg | 4 + test/test_ob/betax.x.asc | 367 +++++++++++ test/test_ob/betax.y.asc | 361 +++++++++++ test/test_ob/betax.z.asc | 277 ++++++++ test/test_ob/betax_maximum.xg | 4 + test/test_ob/betax_minimum.xg | 4 + test/test_ob/betax_norm1.xg | 4 + test/test_ob/betax_norm2.xg | 4 + test/test_ob/betay.x.asc | 367 +++++++++++ test/test_ob/betay.y.asc | 361 +++++++++++ test/test_ob/betay.z.asc | 277 ++++++++ test/test_ob/betay_maximum.xg | 4 + test/test_ob/betay_minimum.xg | 4 + test/test_ob/betay_norm1.xg | 4 + test/test_ob/betay_norm2.xg | 4 + test/test_ob/betaz.x.asc | 367 +++++++++++ test/test_ob/betaz.y.asc | 361 +++++++++++ test/test_ob/betaz.z.asc | 277 ++++++++ test/test_ob/betaz_maximum.xg | 4 + test/test_ob/betaz_minimum.xg | 4 + test/test_ob/betaz_norm1.xg | 4 + test/test_ob/betaz_norm2.xg | 4 + test/test_ob/epsdisA.x.asc | 367 +++++++++++ test/test_ob/epsdisA.y.asc | 361 +++++++++++ test/test_ob/epsdisA.z.asc | 277 ++++++++ test/test_ob/epsdisA_maximum.xg | 4 + test/test_ob/epsdisA_minimum.xg | 4 + test/test_ob/epsdisA_norm1.xg | 4 + test/test_ob/epsdisA_norm2.xg | 4 + test/test_ob/gxx.x.asc | 367 +++++++++++ test/test_ob/gxx.y.asc | 361 +++++++++++ test/test_ob/gxx.z.asc | 277 ++++++++ test/test_ob/gxx_maximum.xg | 4 + test/test_ob/gxx_minimum.xg | 4 + test/test_ob/gxx_norm1.xg | 4 + test/test_ob/gxx_norm2.xg | 4 + test/test_ob/gxy.x.asc | 367 +++++++++++ test/test_ob/gxy.y.asc | 361 +++++++++++ test/test_ob/gxy.z.asc | 277 ++++++++ test/test_ob/gxy_maximum.xg | 4 + test/test_ob/gxy_minimum.xg | 4 + test/test_ob/gxy_norm1.xg | 4 + test/test_ob/gxy_norm2.xg | 4 + test/test_ob/gxz.x.asc | 367 +++++++++++ test/test_ob/gxz.y.asc | 361 +++++++++++ test/test_ob/gxz.z.asc | 277 ++++++++ test/test_ob/gxz_maximum.xg | 4 + test/test_ob/gxz_minimum.xg | 4 + test/test_ob/gxz_norm1.xg | 4 + test/test_ob/gxz_norm2.xg | 4 + test/test_ob/gyy.x.asc | 367 +++++++++++ test/test_ob/gyy.y.asc | 361 +++++++++++ test/test_ob/gyy.z.asc | 277 ++++++++ test/test_ob/gyy_maximum.xg | 4 + test/test_ob/gyy_minimum.xg | 4 + test/test_ob/gyy_norm1.xg | 4 + test/test_ob/gyy_norm2.xg | 4 + test/test_ob/gyz.x.asc | 367 +++++++++++ test/test_ob/gyz.y.asc | 361 +++++++++++ test/test_ob/gyz.z.asc | 277 ++++++++ test/test_ob/gyz_maximum.xg | 4 + test/test_ob/gyz_minimum.xg | 4 + test/test_ob/gyz_norm1.xg | 4 + test/test_ob/gyz_norm2.xg | 4 + test/test_ob/gzz.x.asc | 367 +++++++++++ test/test_ob/gzz.y.asc | 361 +++++++++++ test/test_ob/gzz.z.asc | 277 ++++++++ test/test_ob/gzz_maximum.xg | 4 + test/test_ob/gzz_minimum.xg | 4 + test/test_ob/gzz_norm1.xg | 4 + test/test_ob/gzz_norm2.xg | 4 + test/test_ob/h.t0.ah1.gp | 1228 ++++++++++++++++++++++++++++++++++++ test/test_ob/h.t1.ah1.gp | 1228 ++++++++++++++++++++++++++++++++++++ test/test_ob/h.t2.ah1.gp | 1228 ++++++++++++++++++++++++++++++++++++ test/test_ob/h.t3.ah1.gp | 1228 ++++++++++++++++++++++++++++++++++++ test/test_ob/h.t4.ah1.gp | 1228 ++++++++++++++++++++++++++++++++++++ test/test_ob/ham.x.asc | 367 +++++++++++ test/test_ob/ham.y.asc | 361 +++++++++++ test/test_ob/ham.z.asc | 277 ++++++++ test/test_ob/ham_maximum.xg | 4 + test/test_ob/ham_minimum.xg | 4 + test/test_ob/ham_norm1.xg | 4 + test/test_ob/ham_norm2.xg | 4 + test/test_ob/kxx.x.asc | 367 +++++++++++ test/test_ob/kxx.y.asc | 361 +++++++++++ test/test_ob/kxx.z.asc | 277 ++++++++ test/test_ob/kxy.x.asc | 367 +++++++++++ test/test_ob/kxy.y.asc | 361 +++++++++++ test/test_ob/kxy.z.asc | 277 ++++++++ test/test_ob/kxz.x.asc | 367 +++++++++++ test/test_ob/kxz.y.asc | 361 +++++++++++ test/test_ob/kxz.z.asc | 277 ++++++++ test/test_ob/kyy.x.asc | 367 +++++++++++ test/test_ob/kyy.y.asc | 361 +++++++++++ test/test_ob/kyy.z.asc | 277 ++++++++ test/test_ob/kyz.x.asc | 367 +++++++++++ test/test_ob/kyz.y.asc | 361 +++++++++++ test/test_ob/kyz.z.asc | 277 ++++++++ test/test_ob/kzz.x.asc | 367 +++++++++++ test/test_ob/kzz.y.asc | 361 +++++++++++ test/test_ob/kzz.z.asc | 277 ++++++++ test/test_ob/momx.x.asc | 367 +++++++++++ test/test_ob/momx.y.asc | 361 +++++++++++ test/test_ob/momx.z.asc | 277 ++++++++ test/test_ob/momx_maximum.xg | 4 + test/test_ob/momx_minimum.xg | 4 + test/test_ob/momx_norm1.xg | 4 + test/test_ob/momx_norm2.xg | 4 + test/test_ob/momy.x.asc | 367 +++++++++++ test/test_ob/momy.y.asc | 361 +++++++++++ test/test_ob/momy.z.asc | 277 ++++++++ test/test_ob/momy_maximum.xg | 4 + test/test_ob/momy_minimum.xg | 4 + test/test_ob/momy_norm1.xg | 4 + test/test_ob/momy_norm2.xg | 4 + test/test_ob/momz.x.asc | 367 +++++++++++ test/test_ob/momz.y.asc | 361 +++++++++++ test/test_ob/momz.z.asc | 277 ++++++++ test/test_ob/momz_maximum.xg | 4 + test/test_ob/momz_minimum.xg | 4 + test/test_ob/momz_norm1.xg | 4 + test/test_ob/momz_norm2.xg | 4 + 269 files changed, 55714 insertions(+), 10 deletions(-) create mode 100644 src/paramcheck.c create mode 100644 src/setup_epsdis.c create mode 100644 test/test_ah.par create mode 100644 test/test_ah/BH_diagnostics.ah1.gp create mode 100644 test/test_ah/alp.x.asc create mode 100644 test/test_ah/alp.y.asc create mode 100644 test/test_ah/alp.z.asc create mode 100644 test/test_ah/alp_maximum.xg create mode 100644 test/test_ah/alp_minimum.xg create mode 100644 test/test_ah/alp_norm1.xg create mode 100644 test/test_ah/alp_norm2.xg create mode 100644 test/test_ah/betax.x.asc create mode 100644 test/test_ah/betax.y.asc create mode 100644 test/test_ah/betax.z.asc create mode 100644 test/test_ah/betax_maximum.xg create mode 100644 test/test_ah/betax_minimum.xg create mode 100644 test/test_ah/betax_norm1.xg create mode 100644 test/test_ah/betax_norm2.xg create mode 100644 test/test_ah/betay.x.asc create mode 100644 test/test_ah/betay.y.asc create mode 100644 test/test_ah/betay.z.asc create mode 100644 test/test_ah/betay_maximum.xg create mode 100644 test/test_ah/betay_minimum.xg create mode 100644 test/test_ah/betay_norm1.xg create mode 100644 test/test_ah/betay_norm2.xg create mode 100644 test/test_ah/betaz.x.asc create mode 100644 test/test_ah/betaz.y.asc create mode 100644 test/test_ah/betaz.z.asc create mode 100644 test/test_ah/betaz_maximum.xg create mode 100644 test/test_ah/betaz_minimum.xg create mode 100644 test/test_ah/betaz_norm1.xg create mode 100644 test/test_ah/betaz_norm2.xg create mode 100644 test/test_ah/epsdisA.x.asc create mode 100644 test/test_ah/epsdisA.y.asc create mode 100644 test/test_ah/epsdisA.z.asc create mode 100644 test/test_ah/epsdisA_maximum.xg create mode 100644 test/test_ah/epsdisA_minimum.xg create mode 100644 test/test_ah/epsdisA_norm1.xg create mode 100644 test/test_ah/epsdisA_norm2.xg create mode 100644 test/test_ah/gxx.x.asc create mode 100644 test/test_ah/gxx.y.asc create mode 100644 test/test_ah/gxx.z.asc create mode 100644 test/test_ah/gxx_maximum.xg create mode 100644 test/test_ah/gxx_minimum.xg create mode 100644 test/test_ah/gxx_norm1.xg create mode 100644 test/test_ah/gxx_norm2.xg create mode 100644 test/test_ah/gxy.x.asc create mode 100644 test/test_ah/gxy.y.asc create mode 100644 test/test_ah/gxy.z.asc create mode 100644 test/test_ah/gxy_maximum.xg create mode 100644 test/test_ah/gxy_minimum.xg create mode 100644 test/test_ah/gxy_norm1.xg create mode 100644 test/test_ah/gxy_norm2.xg create mode 100644 test/test_ah/gxz.x.asc create mode 100644 test/test_ah/gxz.y.asc create mode 100644 test/test_ah/gxz.z.asc create mode 100644 test/test_ah/gxz_maximum.xg create mode 100644 test/test_ah/gxz_minimum.xg create mode 100644 test/test_ah/gxz_norm1.xg create mode 100644 test/test_ah/gxz_norm2.xg create mode 100644 test/test_ah/gyy.x.asc create mode 100644 test/test_ah/gyy.y.asc create mode 100644 test/test_ah/gyy.z.asc create mode 100644 test/test_ah/gyy_maximum.xg create mode 100644 test/test_ah/gyy_minimum.xg create mode 100644 test/test_ah/gyy_norm1.xg create mode 100644 test/test_ah/gyy_norm2.xg create mode 100644 test/test_ah/gyz.x.asc create mode 100644 test/test_ah/gyz.y.asc create mode 100644 test/test_ah/gyz.z.asc create mode 100644 test/test_ah/gyz_maximum.xg create mode 100644 test/test_ah/gyz_minimum.xg create mode 100644 test/test_ah/gyz_norm1.xg create mode 100644 test/test_ah/gyz_norm2.xg create mode 100644 test/test_ah/gzz.x.asc create mode 100644 test/test_ah/gzz.y.asc create mode 100644 test/test_ah/gzz.z.asc create mode 100644 test/test_ah/gzz_maximum.xg create mode 100644 test/test_ah/gzz_minimum.xg create mode 100644 test/test_ah/gzz_norm1.xg create mode 100644 test/test_ah/gzz_norm2.xg create mode 100644 test/test_ah/h.t0.ah1.gp create mode 100644 test/test_ah/h.t1.ah1.gp create mode 100644 test/test_ah/h.t2.ah1.gp create mode 100644 test/test_ah/h.t3.ah1.gp create mode 100644 test/test_ah/h.t4.ah1.gp create mode 100644 test/test_ah/ham.x.asc create mode 100644 test/test_ah/ham.y.asc create mode 100644 test/test_ah/ham.z.asc create mode 100644 test/test_ah/ham_maximum.xg create mode 100644 test/test_ah/ham_minimum.xg create mode 100644 test/test_ah/ham_norm1.xg create mode 100644 test/test_ah/ham_norm2.xg create mode 100644 test/test_ah/kxx.x.asc create mode 100644 test/test_ah/kxx.y.asc create mode 100644 test/test_ah/kxx.z.asc create mode 100644 test/test_ah/kxy.x.asc create mode 100644 test/test_ah/kxy.y.asc create mode 100644 test/test_ah/kxy.z.asc create mode 100644 test/test_ah/kxz.x.asc create mode 100644 test/test_ah/kxz.y.asc create mode 100644 test/test_ah/kxz.z.asc create mode 100644 test/test_ah/kyy.x.asc create mode 100644 test/test_ah/kyy.y.asc create mode 100644 test/test_ah/kyy.z.asc create mode 100644 test/test_ah/kyz.x.asc create mode 100644 test/test_ah/kyz.y.asc create mode 100644 test/test_ah/kyz.z.asc create mode 100644 test/test_ah/kzz.x.asc create mode 100644 test/test_ah/kzz.y.asc create mode 100644 test/test_ah/kzz.z.asc create mode 100644 test/test_ah/momx.x.asc create mode 100644 test/test_ah/momx.y.asc create mode 100644 test/test_ah/momx.z.asc create mode 100644 test/test_ah/momx_maximum.xg create mode 100644 test/test_ah/momx_minimum.xg create mode 100644 test/test_ah/momx_norm1.xg create mode 100644 test/test_ah/momx_norm2.xg create mode 100644 test/test_ah/momy.x.asc create mode 100644 test/test_ah/momy.y.asc create mode 100644 test/test_ah/momy.z.asc create mode 100644 test/test_ah/momy_maximum.xg create mode 100644 test/test_ah/momy_minimum.xg create mode 100644 test/test_ah/momy_norm1.xg create mode 100644 test/test_ah/momy_norm2.xg create mode 100644 test/test_ah/momz.x.asc create mode 100644 test/test_ah/momz.y.asc create mode 100644 test/test_ah/momz.z.asc create mode 100644 test/test_ah/momz_maximum.xg create mode 100644 test/test_ah/momz_minimum.xg create mode 100644 test/test_ah/momz_norm1.xg create mode 100644 test/test_ah/momz_norm2.xg create mode 100644 test/test_ob.par create mode 100644 test/test_ob/BH_diagnostics.ah1.gp create mode 100644 test/test_ob/alp.x.asc create mode 100644 test/test_ob/alp.y.asc create mode 100644 test/test_ob/alp.z.asc create mode 100644 test/test_ob/alp_maximum.xg create mode 100644 test/test_ob/alp_minimum.xg create mode 100644 test/test_ob/alp_norm1.xg create mode 100644 test/test_ob/alp_norm2.xg create mode 100644 test/test_ob/betax.x.asc create mode 100644 test/test_ob/betax.y.asc create mode 100644 test/test_ob/betax.z.asc create mode 100644 test/test_ob/betax_maximum.xg create mode 100644 test/test_ob/betax_minimum.xg create mode 100644 test/test_ob/betax_norm1.xg create mode 100644 test/test_ob/betax_norm2.xg create mode 100644 test/test_ob/betay.x.asc create mode 100644 test/test_ob/betay.y.asc create mode 100644 test/test_ob/betay.z.asc create mode 100644 test/test_ob/betay_maximum.xg create mode 100644 test/test_ob/betay_minimum.xg create mode 100644 test/test_ob/betay_norm1.xg create mode 100644 test/test_ob/betay_norm2.xg create mode 100644 test/test_ob/betaz.x.asc create mode 100644 test/test_ob/betaz.y.asc create mode 100644 test/test_ob/betaz.z.asc create mode 100644 test/test_ob/betaz_maximum.xg create mode 100644 test/test_ob/betaz_minimum.xg create mode 100644 test/test_ob/betaz_norm1.xg create mode 100644 test/test_ob/betaz_norm2.xg create mode 100644 test/test_ob/epsdisA.x.asc create mode 100644 test/test_ob/epsdisA.y.asc create mode 100644 test/test_ob/epsdisA.z.asc create mode 100644 test/test_ob/epsdisA_maximum.xg create mode 100644 test/test_ob/epsdisA_minimum.xg create mode 100644 test/test_ob/epsdisA_norm1.xg create mode 100644 test/test_ob/epsdisA_norm2.xg create mode 100644 test/test_ob/gxx.x.asc create mode 100644 test/test_ob/gxx.y.asc create mode 100644 test/test_ob/gxx.z.asc create mode 100644 test/test_ob/gxx_maximum.xg create mode 100644 test/test_ob/gxx_minimum.xg create mode 100644 test/test_ob/gxx_norm1.xg create mode 100644 test/test_ob/gxx_norm2.xg create mode 100644 test/test_ob/gxy.x.asc create mode 100644 test/test_ob/gxy.y.asc create mode 100644 test/test_ob/gxy.z.asc create mode 100644 test/test_ob/gxy_maximum.xg create mode 100644 test/test_ob/gxy_minimum.xg create mode 100644 test/test_ob/gxy_norm1.xg create mode 100644 test/test_ob/gxy_norm2.xg create mode 100644 test/test_ob/gxz.x.asc create mode 100644 test/test_ob/gxz.y.asc create mode 100644 test/test_ob/gxz.z.asc create mode 100644 test/test_ob/gxz_maximum.xg create mode 100644 test/test_ob/gxz_minimum.xg create mode 100644 test/test_ob/gxz_norm1.xg create mode 100644 test/test_ob/gxz_norm2.xg create mode 100644 test/test_ob/gyy.x.asc create mode 100644 test/test_ob/gyy.y.asc create mode 100644 test/test_ob/gyy.z.asc create mode 100644 test/test_ob/gyy_maximum.xg create mode 100644 test/test_ob/gyy_minimum.xg create mode 100644 test/test_ob/gyy_norm1.xg create mode 100644 test/test_ob/gyy_norm2.xg create mode 100644 test/test_ob/gyz.x.asc create mode 100644 test/test_ob/gyz.y.asc create mode 100644 test/test_ob/gyz.z.asc create mode 100644 test/test_ob/gyz_maximum.xg create mode 100644 test/test_ob/gyz_minimum.xg create mode 100644 test/test_ob/gyz_norm1.xg create mode 100644 test/test_ob/gyz_norm2.xg create mode 100644 test/test_ob/gzz.x.asc create mode 100644 test/test_ob/gzz.y.asc create mode 100644 test/test_ob/gzz.z.asc create mode 100644 test/test_ob/gzz_maximum.xg create mode 100644 test/test_ob/gzz_minimum.xg create mode 100644 test/test_ob/gzz_norm1.xg create mode 100644 test/test_ob/gzz_norm2.xg create mode 100644 test/test_ob/h.t0.ah1.gp create mode 100644 test/test_ob/h.t1.ah1.gp create mode 100644 test/test_ob/h.t2.ah1.gp create mode 100644 test/test_ob/h.t3.ah1.gp create mode 100644 test/test_ob/h.t4.ah1.gp create mode 100644 test/test_ob/ham.x.asc create mode 100644 test/test_ob/ham.y.asc create mode 100644 test/test_ob/ham.z.asc create mode 100644 test/test_ob/ham_maximum.xg create mode 100644 test/test_ob/ham_minimum.xg create mode 100644 test/test_ob/ham_norm1.xg create mode 100644 test/test_ob/ham_norm2.xg create mode 100644 test/test_ob/kxx.x.asc create mode 100644 test/test_ob/kxx.y.asc create mode 100644 test/test_ob/kxx.z.asc create mode 100644 test/test_ob/kxy.x.asc create mode 100644 test/test_ob/kxy.y.asc create mode 100644 test/test_ob/kxy.z.asc create mode 100644 test/test_ob/kxz.x.asc create mode 100644 test/test_ob/kxz.y.asc create mode 100644 test/test_ob/kxz.z.asc create mode 100644 test/test_ob/kyy.x.asc create mode 100644 test/test_ob/kyy.y.asc create mode 100644 test/test_ob/kyy.z.asc create mode 100644 test/test_ob/kyz.x.asc create mode 100644 test/test_ob/kyz.y.asc create mode 100644 test/test_ob/kyz.z.asc create mode 100644 test/test_ob/kzz.x.asc create mode 100644 test/test_ob/kzz.y.asc create mode 100644 test/test_ob/kzz.z.asc create mode 100644 test/test_ob/momx.x.asc create mode 100644 test/test_ob/momx.y.asc create mode 100644 test/test_ob/momx.z.asc create mode 100644 test/test_ob/momx_maximum.xg create mode 100644 test/test_ob/momx_minimum.xg create mode 100644 test/test_ob/momx_norm1.xg create mode 100644 test/test_ob/momx_norm2.xg create mode 100644 test/test_ob/momy.x.asc create mode 100644 test/test_ob/momy.y.asc create mode 100644 test/test_ob/momy.z.asc create mode 100644 test/test_ob/momy_maximum.xg create mode 100644 test/test_ob/momy_minimum.xg create mode 100644 test/test_ob/momy_norm1.xg create mode 100644 test/test_ob/momy_norm2.xg create mode 100644 test/test_ob/momz.x.asc create mode 100644 test/test_ob/momz.y.asc create mode 100644 test/test_ob/momz.z.asc create mode 100644 test/test_ob/momz_maximum.xg create mode 100644 test/test_ob/momz_minimum.xg create mode 100644 test/test_ob/momz_norm1.xg create mode 100644 test/test_ob/momz_norm2.xg diff --git a/interface.ccl b/interface.ccl index 6e26e97..1ff5f1f 100644 --- a/interface.ccl +++ b/interface.ccl @@ -3,5 +3,27 @@ IMPLEMENTS: Dissipation +INHERITS: grid SphericalSurface + CCTK_INT FUNCTION MoLQueryEvolvedRHS (CCTK_INT IN EvolvedIndex) REQUIRES FUNCTION MoLQueryEvolvedRHS + +CCTK_INT FUNCTION \ + SymmetryTableHandleForGrid (CCTK_POINTER_TO_CONST IN cctkGH) +USES FUNCTION SymmetryTableHandleForGrid + +CCTK_INT FUNCTION HorizonRadiusInDirection \ + (CCTK_INT IN horizon_number, \ + CCTK_INT IN N_points, \ + CCTK_REAL IN ARRAY x, CCTK_REAL IN ARRAY y, CCTK_REAL IN ARRAY z, \ + CCTK_REAL OUT ARRAY radius) +USES FUNCTION HorizonRadiusInDirection + + + +PRIVATE: + +REAL epsdisA_group TYPE=gf +{ + epsdisA +} "dissipation array for spatially different dissipation" diff --git a/param.ccl b/param.ccl index ca4cbcb..3b4725f 100644 --- a/param.ccl +++ b/param.ccl @@ -20,3 +20,51 @@ STRING vars "List of evolved grid functions that should have dissipation added" { .* :: "must be a valid list of grid functions" } "" + + + +# Extra dissipation in horizons + +BOOLEAN extra_dissipation_in_horizons "extra dissipation in horizons" STEERABLE=always +{ +} "no" + +INT update_ah_every "how often to update the AH information for dissipation" STEERABLE=always +{ + 0:* :: "positive iteration number" +} 1 + +REAL ah_slope "Slope (epsdis / distance) inside AH" STEERABLE=always +{ + *:* :: "0 for no dissipation. Unstable when total epsdis<0 or total epsdis>1/3" +} 0.2 + +INT surface_number[100] "horizon number for extra dissipation in horizons -- SphericalSurface number" STEERABLE=always +{ + -1 :: "do not use a spherical surface" + 0:* :: "surface number (from SphericalSurface); starts from 0" +} -1 + +INT horizon_number[100] "horizon number for extra dissipation in horizons -- AHFinderDirect number" STEERABLE=always +{ + -1 :: "do not use a horizon" + 1:* :: "horizon number (from AHFinderDirect); starts from 1" +} -1 + + + +# Extra dissipation at outer boundary + +BOOLEAN extra_dissipation_at_outerbound "increase dissipation at outer boundary" STEERABLE=always +{ +} "no" + +INT outer_bound_npoints "number of points in which dissipation should be increased" STEERABLE=always +{ + 0:* :: "positive number" +} 3 + +REAL ob_slope "slope (epsdis / distance) at outer boundary" STEERABLE=always +{ + 0:* :: "increase dissipation" +} 5 diff --git a/schedule.ccl b/schedule.ccl index e52b474..649bcf5 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -1,11 +1,23 @@ # Schedule definitions for thorn Dissipation # $Header$ +STORAGE: epsdisA_group + +SCHEDULE dissipation_paramcheck AT paramcheck +{ + LANG: C +} "Check dissipation parameters for consistency" + SCHEDULE dissipation_basegrid AT basegrid { LANG: C } "Ensure that there are enough ghost zones" +SCHEDULE setup_epsdis AT prestep +{ + LANG: C +} "Setup spatially varying dissipation" + SCHEDULE dissipation_add IN MoL_PostRHS { LANG: C diff --git a/src/apply_dissipation.F77 b/src/apply_dissipation.F77 index 74cf168..a246774 100644 --- a/src/apply_dissipation.F77 +++ b/src/apply_dissipation.F77 @@ -9,7 +9,7 @@ c $Header$ CCTK_REAL var(ni,nj,nk), rhs(ni,nj,nk) CCTK_REAL dx(3), dt CCTK_INT order - CCTK_REAL epsdis + CCTK_REAL epsdis(ni,nj,nk) integer i, j, k @@ -18,8 +18,7 @@ c $Header$ do k = 2, nk-1 do j = 2, nj-1 do i = 2, ni-1 - - rhs(i,j,k) = rhs(i,j,k) + epsdis + rhs(i,j,k) = rhs(i,j,k) + epsdis(i,j,k) $ * (+ (var(i-1,j,k) - 2*var(i,j,k) + var(i+1,j,k)) / dx(1) $ + (var(i,j-1,k) - 2*var(i,j,k) + var(i,j+1,k)) / dx(2) $ + (var(i,j,k-1) - 2*var(i,j,k) + var(i,j,k+1)) / dx(3)) @@ -34,7 +33,7 @@ c $Header$ do j = 3, nj-2 do i = 3, ni-2 - rhs(i,j,k) = rhs(i,j,k) - epsdis / 16 + rhs(i,j,k) = rhs(i,j,k) - epsdis(i,j,k) / 16 $ * (+ (var(i-2,j,k) - 4*var(i-1,j,k) + 6*var(i,j,k) - 4*var(i+1,j,k) + var(i+2,j,k)) / dx(1) $ + (var(i,j-2,k) - 4*var(i,j-1,k) + 6*var(i,j,k) - 4*var(i,j+1,k) + var(i,j+2,k)) / dx(2) $ + (var(i,j,k-2) - 4*var(i,j,k-1) + 6*var(i,j,k) - 4*var(i,j,k+1) + var(i,j,k+2)) / dx(3)) diff --git a/src/basegrid.c b/src/basegrid.c index ad01c26..ad54931 100644 --- a/src/basegrid.c +++ b/src/basegrid.c @@ -19,4 +19,8 @@ void dissipation_basegrid (CCTK_ARGUMENTS) CCTK_WARN (0, "This thorn requires at least (order+1)/2 ghost zones"); } } + + for (d=0;d #include +#include #include "cctk.h" #include "cctk_Arguments.h" @@ -45,6 +46,9 @@ apply (int const varindex, char const * const optstring, void * const arg) int n; int d; int ierr; + int ni,nj,nk; + int i; + CCTK_REAL minrad,maxrad; assert (varindex >= 0); @@ -86,25 +90,25 @@ apply (int const varindex, char const * const optstring, void * const arg) assert (vargroup >= 0); rhsgroup = CCTK_GroupIndexFromVarI (rhsindex); assert (rhsgroup >= 0); - + ierr = CCTK_GroupData (vargroup, &vardata); assert (!ierr); ierr = CCTK_GroupData (rhsgroup, &rhsdata); assert (!ierr); - + assert (vardata.grouptype == CCTK_GF); assert (vardata.vartype == CCTK_VARIABLE_REAL); assert (vardata.dim == cctk_dim); assert (rhsdata.grouptype == CCTK_GF); assert (rhsdata.vartype == CCTK_VARIABLE_REAL); assert (rhsdata.dim == cctk_dim); - + varptr = CCTK_VarDataPtrI (cctkGH, 0, varindex); assert (varptr); rhsptr = CCTK_VarDataPtrI (cctkGH, 0, rhsindex); assert (rhsptr); - + CCTK_FNAME(apply_dissipation) (varptr, rhsptr, &cctk_lsh[0], &cctk_lsh[1], &cctk_lsh[2], - dx, &dt, &order, &epsdis); + dx, &dt, &order, epsdisA); } diff --git a/src/make.code.defn b/src/make.code.defn index b1abd5b..a0c8c1f 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -2,7 +2,7 @@ # $Header$ # Source files in this directory -SRCS = apply_dissipation.F77 basegrid.c dissipation.c +SRCS = apply_dissipation.F77 basegrid.c dissipation.c paramcheck.c setup_epsdis.c # Subdirectories containing source files SUBDIRS = diff --git a/src/paramcheck.c b/src/paramcheck.c new file mode 100644 index 0000000..d3629fe --- /dev/null +++ b/src/paramcheck.c @@ -0,0 +1,29 @@ +/* $Header$ */ + +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" + +void +dissipation_paramcheck (CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + int i; + int want_horizon; + + if (extra_dissipation_in_horizons) + { + want_horizon = 0; + for (i=0; i<100; ++i) + { + want_horizon = want_horizon | (horizon_number[i] >= 0); + } + + if (want_horizon && ! CCTK_IsFunctionAliased ("HorizonRadiusInDirection")) + { + CCTK_PARAMWARN ("The aliased function \"HorizonRadiusInDirection\" must be defined when the parameter \"extra_dissipation_in_horizons\" is set and one of the sources is AHFinderDirect"); + } + } +} diff --git a/src/setup_epsdis.c b/src/setup_epsdis.c new file mode 100644 index 0000000..9a3b2cf --- /dev/null +++ b/src/setup_epsdis.c @@ -0,0 +1,233 @@ +/* $Header$ */ + +#include +#include +#include +#include + +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "cctk_Functions.h" + +#include "util_ErrorCodes.h" +#include "util_Table.h" + +#define MAXDIM 3 + +void +setup_epsdis (CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + int ni,nj,nk; + int i,j,k,s; + int index,indexP; + int ierr; + int npts; + int *inds; + CCTK_REAL *xa,*ya,*za,*rads; + CCTK_REAL maxrad; + CCTK_REAL xmin,xmax, ymin,ymax, zmin,zmax; + CCTK_REAL odx,ody,odz; + CCTK_REAL radp; + const CCTK_INT MAXSURFNUM=100; /* XXX hard limit */ + CCTK_INT doBC[2*MAXDIM],symbnd[2*MAXDIM]; + CCTK_INT symtable; + + if (verbose) { + CCTK_VInfo(CCTK_THORNSTRING,"Setting up spatially varying dissipation at T=%g", + (double)cctk_time); + } + + ni=cctk_lsh[0]; + nj=cctk_lsh[1]; + nk=cctk_lsh[2]; + + for (i=0;ini-outer_bound_npoints;i--) { + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + indexP= CCTK_GFINDEX3D(cctkGH,ni-outer_bound_npoints,j,k); + epsdisA[index]=epsdis+epsdis*ob_slope*abs(x[index]-x[indexP]); + } + } + } + } + + if(doBC[2]) { + for (k=0;knj-outer_bound_npoints;j--) { + for (i=0;ink-outer_bound_npoints;k--) { + for (j=0;j=xmin + &&y[i]<=ymax&&y[i]>=ymin + &&z[i]<=zmax&&z[i]>=zmin) + { + npts++; + } + } + + xa=(CCTK_REAL *) malloc(npts*sizeof(CCTK_REAL)); + ya=(CCTK_REAL *) malloc(npts*sizeof(CCTK_REAL)); + za=(CCTK_REAL *) malloc(npts*sizeof(CCTK_REAL)); + rads=(CCTK_REAL *) malloc(npts*sizeof(CCTK_REAL)); + inds=(CCTK_INT *) malloc(npts*sizeof(CCTK_INT)); + + for (i=0;i=xmin + &&y[i]<=ymax&&y[i]>=ymin + &&z[i]<=zmax&&z[i]>=zmin) + { + xa[j]=x[i]; + ya[j]=y[i]; + za[j]=z[i]; + inds[j]=i; + j++; + } + } + + ierr=HorizonRadiusInDirection(horizon_number[s], + npts, + xa, ya, za, rads); + assert(!ierr); + + for (i=0;i