From bd4b8d171051335103d50e29ed0a660bb9631c48 Mon Sep 17 00:00:00 2001 From: Roland Haas Date: Thu, 10 May 2012 16:49:18 -0700 Subject: CarpetIOScalar: correct column labels when both one_file_per_group and all_reductions_in_one_file are active --- Carpet/CarpetIOScalar/src/ioscalar.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Carpet/CarpetIOScalar') diff --git a/Carpet/CarpetIOScalar/src/ioscalar.cc b/Carpet/CarpetIOScalar/src/ioscalar.cc index 9854c9602..6dbb9eaae 100644 --- a/Carpet/CarpetIOScalar/src/ioscalar.cc +++ b/Carpet/CarpetIOScalar/src/ioscalar.cc @@ -412,17 +412,17 @@ namespace CarpetIOScalar { = one_file_per_group ? CCTK_FirstVarIndexI(group) : n; int const numvars = one_file_per_group ? CCTK_NumVarsInGroupI(group) : 1; - for (int n=firstvar; n::const_iterator jreduction = reductions.begin(); - jreduction != reductions.end(); - ++jreduction) - { - file << " " << col << ":" << CCTK_VarName(n) << "(" << jreduction->reduction << ")"; - col += CarpetSimpleMPIDatatypeLength (vartype); - } - } else { + list::const_iterator first_reduction + = all_reductions_in_one_file ? reductions.begin() : ireduction; + list::const_iterator end_reduction + = all_reductions_in_one_file ? reductions.end() : ++list::const_iterator(ireduction); + for (list::const_iterator jreduction = first_reduction; + jreduction != end_reduction; + ++jreduction) + { + for (int n=firstvar; nreduction << ")"; col += CarpetSimpleMPIDatatypeLength (vartype); } } -- cgit v1.2.3