Skip to content

Commit

Permalink
Committing clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 5, 2024
1 parent e5f7890 commit 7d7a292
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
#include "Ioss_Region.h"
#include "Ioss_SmartAssert.h"

#include <fmt/color.h>
#include <fmt/format.h>
#include <fmt/ostream.h>
#include <fmt/ranges.h>
#include <fmt/color.h>

#if !defined(NO_ZOLTAN_SUPPORT)
#include <zoltan.h> // for Zoltan_Initialize
Expand Down
6 changes: 3 additions & 3 deletions packages/seacas/libraries/ioss/src/cgns/Iocgns_Utils.C
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,9 @@ namespace {
size_t max_name = std::string("Block Name").length();
size_t max_face = std::string("Face Count").length();
for (auto &eb : ebs) {
const std::string &name = eb->name();
max_name = std::max(name.length(), max_name)
size_t face_width = Ioss::Utils::number_width(boundary_faces[name].size());
const std::string &name = eb->name();
max_name = std::max(name.length(), max_name) size_t face_width =
Ioss::Utils::number_width(boundary_faces[name].size());
max_face = std::max(face_width, max_face);
}
max_name += 4; // Padding
Expand Down
11 changes: 4 additions & 7 deletions packages/seacas/libraries/ioss/src/main/cgns_decomp.C
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,7 @@ namespace {
auto search = comms.find(std::make_pair(value, key));
if (search == comms.end()) {
valid = false;
fmt::print(stderr,
fg(fmt::color::red),
fmt::print(stderr, fg(fmt::color::red),
"ERROR: Could not find matching ZGC for {}, proc {} -> {}, proc {}\n", key.first,
key.second, value.first, value.second);
}
Expand Down Expand Up @@ -436,9 +435,8 @@ namespace {
for (const auto &proc : comms) {
if (proc.second < 0) {
// From decomposition
fmt::print(
fg(fmt::color::yellow),
"[{:{}}->{:{}}] ", proc.first, pw, -proc.second, pw);
fmt::print(fg(fmt::color::yellow), "[{:{}}->{:{}}] ", proc.first, pw, -proc.second,
pw);
}
else {
// Zone to Zone
Expand Down Expand Up @@ -680,8 +678,7 @@ int main(int argc, char *argv[])

auto valid = validate_symmetric_communications(zones);
if (!valid) {
fmt::print(stderr,
fg(fmt::color::red),
fmt::print(stderr, fg(fmt::color::red),
"\nERROR: Zone Grid Communication interfaces are not symmetric. There is an error "
"in the decomposition.\n");
}
Expand Down
28 changes: 8 additions & 20 deletions packages/seacas/libraries/ioss/src/main/io_modify.C
Original file line number Diff line number Diff line change
Expand Up @@ -969,12 +969,9 @@ namespace {
if (Ioss::Utils::substr_equal(tokens[2], "add")) {
// Must be at least 6 tokens...
if (tokens.size() < 6) {
fmt::print(stderr,
fg(fmt::color::red),
fmt::print(stderr, fg(fmt::color::red),
"ERROR: ATTRIBUTE Command does not have enough tokens to be valid.\n");
fmt::print(stderr,
"\t\t{}\n",
fmt::join(tokens, " "));
fmt::print(stderr, "\t\t{}\n", fmt::join(tokens, " "));
handle_help("attribute");
return false;
}
Expand Down Expand Up @@ -1090,12 +1087,9 @@ namespace {

// Must be at least 4 tokens...
if (tokens.size() < 4) {
fmt::print(stderr,
fg(fmt::color::red),
fmt::print(stderr, fg(fmt::color::red),
"ERROR: RENAME Command does not have enough tokens to be valid.\n");
fmt::print(stderr,
"\t\t{}\n",
fmt::join(tokens, " "));
fmt::print(stderr, "\t\t{}\n", fmt::join(tokens, " "));
handle_help("rename");
return false;
}
Expand Down Expand Up @@ -1223,12 +1217,9 @@ namespace {
// TIME SCALE {{scale}}
// TIME OFFSET {{offset}
if (tokens.size() < 3) {
fmt::print(stderr,
fg(fmt::color::red),
fmt::print(stderr, fg(fmt::color::red),
"ERROR: TIME Command does not have enough tokens to be valid.\n");
fmt::print(stderr,
"\t\t{}\n",
fmt::join(tokens, " "));
fmt::print(stderr, "\t\t{}\n", fmt::join(tokens, " "));
handle_help("time");
return false;
}
Expand Down Expand Up @@ -1261,12 +1252,9 @@ namespace {
// GEOMETRY OFFSET {{ELEMENTBLOCKS|BLOCKS|ASSEMBLY}} {{names}} {{X|Y|Z}} {{offset}} ...

if (tokens.size() < 3) {
fmt::print(stderr,
fg(fmt::color::red),
fmt::print(stderr, fg(fmt::color::red),
"ERROR: GEOMETRY Command does not have enough tokens to be valid.\n");
fmt::print(stderr,
"\t\t{}\n",
fmt::join(tokens, " "));
fmt::print(stderr, "\t\t{}\n", fmt::join(tokens, " "));
handle_help("geometry");
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions packages/seacas/libraries/ioss/src/main/skinner.C
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ namespace {
size_t max_face = std::string("Face Count").length();
for (auto &eb : ebs) {
const std::string &name = eb->name();
max_name = std::max(max_name, name.length());
size_t face_width = Ioss::Utils::number_width(boundary_faces[name].size());
max_face = std::max(max_face, face_width);
max_name = std::max(max_name, name.length());
size_t face_width = Ioss::Utils::number_width(boundary_faces[name].size());
max_face = std::max(max_face, face_width);
}
max_name += 4; // Padding
max_face += 4;
Expand Down

0 comments on commit 7d7a292

Please sign in to comment.