From f5b40de16a27dec6e3a50f85ec4ddebf9ca336bd Mon Sep 17 00:00:00 2001 From: knarf Date: Fri, 28 Apr 2006 13:59:26 +0000 Subject: introduce parameter to turn off the info during evolution (default is off) git-svn-id: http://svn.aei.mpg.de/numrel/AEIThorns/ADMMass/trunk@17 54511f98-0e4f-0410-826e-eb8b393f5a1e --- param.ccl | 4 ++++ src/surface_integral.c | 2 ++ src/volume_integral.c | 21 ++++++++++++--------- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/param.ccl b/param.ccl index 57ff18c..9b39caa 100644 --- a/param.ccl +++ b/param.ccl @@ -72,3 +72,7 @@ BOOLEAN ADMMass_use_all_volume_as_volume_radius "Use ADMMass_distance_from_grid_ BOOLEAN ADMMass_Excise_Horizons "Should we exclude the region inside the AH to the volume integral" STEERABLE=ALWAYS { } "no" + +BOOLEAN ADMMass_Debug "Enable some info at runtime" STEERABLE=ALWAYS +{ +} "no" diff --git a/src/surface_integral.c b/src/surface_integral.c index 6dbbd37..28a407c 100644 --- a/src/surface_integral.c +++ b/src/surface_integral.c @@ -308,6 +308,7 @@ void ADMMass_Surface_Global(CCTK_ARGUMENTS) ADMMass_SurfaceMass[*ADMMass_LoopCounter] /= 16.0*PI; + if (ADMMass_Debug) CCTK_VInfo(CCTK_THORNSTRING, "detector %d: ADM mass %g, surface (cube): xmin %g, xmax %g, ymin %g, ymax %g, zmin %g, zmax %g", *ADMMass_LoopCounter, @@ -365,6 +366,7 @@ void ADMMass_Surface_Lapse_Global(CCTK_ARGUMENTS) ADMMass_SurfaceMass_Lapse[*ADMMass_LoopCounter] /= 16.0*PI; + if (ADMMass_Debug) CCTK_VInfo(CCTK_THORNSTRING, "detector %d: ADM mass with lapse %g, surface (cube): xmin %g, xmax %g, ymin %g, ymax %g, zmin %g, zmax %g", *ADMMass_LoopCounter, diff --git a/src/volume_integral.c b/src/volume_integral.c index ee25678..0526b15 100644 --- a/src/volume_integral.c +++ b/src/volume_integral.c @@ -291,7 +291,8 @@ void ADMMass_Volume_Global(CCTK_ARGUMENTS) *grid_spacing_product / (16.0*PI); if (ADMMass_use_surface_distance_as_volume_radius) - { + { + if (ADMMass_Debug) CCTK_VInfo(CCTK_THORNSTRING, "detector %d: ADM mass %g, volume (cube): xmin %g, xmax %g, ymin %g, ymax %g, zmin %g, zmax %g", *ADMMass_LoopCounter, @@ -299,17 +300,19 @@ void ADMMass_Volume_Global(CCTK_ARGUMENTS) *ADMMass_box_x_min,*ADMMass_box_x_max, *ADMMass_box_y_min,*ADMMass_box_y_max, *ADMMass_box_z_min,*ADMMass_box_z_max); - } + } else if (ADMMass_use_all_volume_as_volume_radius) - { - CCTK_VInfo(CCTK_THORNSTRING," detector %d: ADM mass %g, volume: the whole grid", - *ADMMass_LoopCounter, ADMMass_VolumeMass[*ADMMass_LoopCounter]); - } + { + if (ADMMass_Debug) + CCTK_VInfo(CCTK_THORNSTRING," detector %d: ADM mass %g, volume: the whole grid", + *ADMMass_LoopCounter, ADMMass_VolumeMass[*ADMMass_LoopCounter]); + } else - { + { + if (ADMMass_Debug) CCTK_VInfo(CCTK_THORNSTRING," detector %d: ADM mass %g, volume (sphere of radius) %g", *ADMMass_LoopCounter, ADMMass_VolumeMass[*ADMMass_LoopCounter], ADMMass_volume_radius[*ADMMass_LoopCounter]); - } - + } } + -- cgit v1.2.3