Skip to content

Commit

Permalink
clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
aprilnovak committed Feb 19, 2024
1 parent 2b2983d commit f8fa841
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
20 changes: 12 additions & 8 deletions src/base/OpenMCCellAverageProblem.C
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,13 @@ OpenMCCellAverageProblem::validParams()

MooseEnum scores_heat(
"heating heating_local kappa_fission fission_q_prompt fission_q_recoverable");
params.addParam<MooseEnum>("source_rate_normalization",
scores_heat,
"Score to use for computing the "
"particle source rate (source/sec) for a certain tallies in "
"eigenvalue mode. In other words, the "
"source/sec is computed as (power divided by the global value of this tally)");
params.addParam<MooseEnum>(
"source_rate_normalization",
scores_heat,
"Score to use for computing the "
"particle source rate (source/sec) for a certain tallies in "
"eigenvalue mode. In other words, the "
"source/sec is computed as (power divided by the global value of this tally)");

params.addParam<std::vector<std::string>>(
"tally_name", "Auxiliary variable name(s) to use for OpenMC tallies. "
Expand Down Expand Up @@ -427,8 +428,11 @@ OpenMCCellAverageProblem::OpenMCCellAverageProblem(const InputParameters & param
_source_rate_index = _tally_score.size() - 1;

if (isParamValid("tally_name"))
mooseError("When specifying 'tally_name', the score indicated in 'source_rate_normalization' must be\n"
"listed in 'tally_score' so that we know what you want to name that score (", norm, ")");
mooseError("When specifying 'tally_name', the score indicated in "
"'source_rate_normalization' must be\n"
"listed in 'tally_score' so that we know what you want to name that score (",
norm,
")");
}
}
else
Expand Down
6 changes: 3 additions & 3 deletions src/base/OpenMCProblemBase.C
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,10 @@ OpenMCProblemBase::enumToTallyScore(const std::string & score) const
// the MultiMooseEnum is all caps, but the MooseEnum is already the correct case,
// so we need to treat these as separate
std::string s = score;
if (std::all_of(s.begin(), s.end(), [](unsigned char c){ return !std::isalpha(c) || std::isupper(c); }))
if (std::all_of(
s.begin(), s.end(), [](unsigned char c) { return !std::isalpha(c) || std::isupper(c); }))
{
std::transform(s.begin(), s.end(), s.begin(),
[](unsigned char c){ return std::tolower(c); });
std::transform(s.begin(), s.end(), s.begin(), [](unsigned char c) { return std::tolower(c); });

// we need to revert back to some letters being uppercase for certain scores
if (s == "h3_production")
Expand Down

0 comments on commit f8fa841

Please sign in to comment.