Skip to content

Commit

Permalink
Merge pull request #5267 from bangerth/range-for
Browse files Browse the repository at this point in the history
Use a range-based for loop.
  • Loading branch information
gassmoeller committed Jul 11, 2023
2 parents c518b89 + 3dcd88d commit cf0797f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions source/postprocess/composition_velocity_statistics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,14 @@ namespace aspect

// also make sure that the other columns filled by this object
// all show up with sufficient accuracy and in scientific notation
const std::string columns[] = {"RMS velocity (" + unit + ") for composition " + this->introspection().name_for_compositional_index(c)};
const std::string columns[] = {"RMS velocity (" + unit + ") for composition " +
this->introspection().name_for_compositional_index(c)
};

for (unsigned int i = 0; i < sizeof(columns) / sizeof(columns[0]); ++i)
for (const auto &column : columns)
{
statistics.set_precision(columns[i], 8);
statistics.set_scientific(columns[i], true);
statistics.set_precision(column, 8);
statistics.set_scientific(column, true);
}
}

Expand Down

0 comments on commit cf0797f

Please sign in to comment.