Skip to content

Commit e35f9e4

Browse files
committed
IOSS: Fix cgns owning_processor calculation also
1 parent e9538a2 commit e35f9e4

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

packages/seacas/libraries/ioss/src/cgns/Iocgns_ParallelDatabaseIO.C

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// * Single Base.
44
// * ZoneGridConnectivity is 1to1 with point lists for unstructured
55

6-
// Copyright(C) 1999-2024 National Technology & Engineering Solutions
6+
// Copyright(C) 1999-2025 National Technology & Engineering Solutions
77
// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
88
// NTESS, the U.S. Government retains certain rights in this software.
99
//
@@ -1209,9 +1209,7 @@ namespace Iocgns {
12091209
for (size_t i = 0; i < ent_proc.size(); i += 2) {
12101210
int64_t node = ent_proc[i + 0];
12111211
int64_t proc = ent_proc[i + 1];
1212-
if (proc < idata[node - 1]) {
1213-
idata[node - 1] = proc;
1214-
}
1212+
idata[node - 1] = std::min(idata[node - 1], proc);
12151213
}
12161214
}
12171215
else {
@@ -1226,9 +1224,7 @@ namespace Iocgns {
12261224
for (size_t i = 0; i < ent_proc.size(); i += 2) {
12271225
int node = ent_proc[i + 0];
12281226
int proc = ent_proc[i + 1];
1229-
if (proc < idata[node - 1]) {
1230-
idata[node - 1] = proc;
1231-
}
1227+
idata[node - 1] = std::min(idata[node - 1], proc);
12321228
}
12331229
}
12341230
}

0 commit comments

Comments
 (0)