[Commits] [svn:einsteintoolkit] Hydro_Analysis/trunk/src/ (Rev. 126)
rhaas at tapir.caltech.edu
rhaas at tapir.caltech.edu
Thu Nov 29 00:49:19 CST 2012
User: rhaas
Date: 2012/11/29 12:49 AM
Modified:
/trunk/src/
Hydro_Analysis.c
Log:
Hydro_Analysis: fiddle with when to warn about multiple identical maxima
File Changes:
Directory: /trunk/src/
======================
File [modified]: Hydro_Analysis.c
Delta lines: +5 -4
===================================================================
--- trunk/src/Hydro_Analysis.c 2012-11-29 06:44:54 UTC (rev 125)
+++ trunk/src/Hydro_Analysis.c 2012-11-29 06:49:19 UTC (rev 126)
@@ -90,6 +90,8 @@
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 @@
// 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 @@
"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 @@
} 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];
More information about the Commits
mailing list