aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhaas <rhaas@b6729ddc-ac74-4bd1-908c-9dc7244c52a1>2012-11-29 06:49:19 +0000
committerrhaas <rhaas@b6729ddc-ac74-4bd1-908c-9dc7244c52a1>2012-11-29 06:49:19 +0000
commite5e061ea89fc7c5b195cbd6cef07b62daa737f02 (patch)
tree667efa25e150b1afa1a736fcd17bd4397ad0b964
parent0c0a5ee961dec5310670054a12c29a7d2bec493f (diff)
Hydro_Analysis: fiddle with when to warn about multiple identical maxima
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/Hydro_Analysis/trunk@126 b6729ddc-ac74-4bd1-908c-9dc7244c52a1
-rw-r--r--src/Hydro_Analysis.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Hydro_Analysis.c b/src/Hydro_Analysis.c
index bb99dac..493bec8 100644
--- a/src/Hydro_Analysis.c
+++ b/src/Hydro_Analysis.c
@@ -90,6 +90,8 @@ void Hydro_Analysis_LocationSearch(CCTK_ARGUMENTS)
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
+ static int have_warned_about_multiple_maxima = 0;
+
int set_maximum_location, warned_about_multiple_local_maxima = 0;
/* Initialized MPI-local quantities */
@@ -118,7 +120,8 @@ void Hydro_Analysis_LocationSearch(CCTK_ARGUMENTS)
// have to already warn here when we still have the actual coordinates around
if (verbosity_level >= 1 && round(local_rho_max_loc[3]) >= 1.)
{
- CCTK_WARN(1, "Found more than one identical maximum in single patch.");
+ if(!have_warned_about_multiple_maxima && !warned_about_multiple_local_maxima)
+ CCTK_WARN(1, "Found more than one identical maximum in single patch.");
if (verbosity_level >= 2)
{
if (round(local_rho_max_loc[3]) == 1.) { // once we detect the second maximum, output the first as well
@@ -131,8 +134,8 @@ void Hydro_Analysis_LocationSearch(CCTK_ARGUMENTS)
"my candidate: (%g,%g,%g) with value %g.",
x[i3D], y[i3D], z[i3D],
*Hydro_Analysis_rho_max);
- warned_about_multiple_local_maxima = 1;
}
+ warned_about_multiple_local_maxima = 1;
}
local_rho_max_loc[0] += x[i3D];
local_rho_max_loc[1] += y[i3D];
@@ -162,8 +165,6 @@ void Hydro_Analysis_LocationSearch(CCTK_ARGUMENTS)
} else {
if (Hydro_Analysis_average_multiple_maxima_locations)
{
- static int have_warned_about_multiple_maxima = 0;
-
level_rho_max_loc[0] /= level_rho_max_loc[3];
level_rho_max_loc[1] /= level_rho_max_loc[3];
level_rho_max_loc[2] /= level_rho_max_loc[3];