Skip to content

Commit

Permalink
NEM_SLICE: Fix bad logic in 1D border element determination
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsjaar committed Jul 29, 2024
1 parent 407665c commit 2957d9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/seacas/applications/nem_slice/elb.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <string>
#include <vector>

#define ELB_VERSION "5.01"
#define ELB_VERSION "5.02"
#define UTIL_NAME "nem_slice"
#define ELB_FALSE 0
#define ELB_TRUE 1
Expand Down
18 changes: 6 additions & 12 deletions packages/seacas/applications/nem_slice/elb_loadbal.C
Original file line number Diff line number Diff line change
Expand Up @@ -1553,14 +1553,7 @@ namespace {

size_t nhold = graph->sur_elem[side_nodes[0]].size();
assert(nhold == 1 || nhold == 2);
if (nhold == 1) {
// Only a single element connected to this node -- at boundary of 1D domain
if (!categorized[ecnt]) {
lb->bor_elems[proce].push_back(ecnt);
categorized[ecnt] = 1;
}
}
else {
if (nhold == 2) {
// 2 elements connected to this node -- `ecnt` and the other one...
for (size_t ncnt = 0; ncnt < nhold; ncnt++) {
size_t elem = graph->sur_elem[side_nodes[0]][ncnt];
Expand All @@ -1569,10 +1562,7 @@ namespace {
}
int proc2 = lb->vertex2proc[elem];
if (proce == proc2) {
if (!categorized[ecnt]) {
lb->int_elems[proce].push_back(ecnt);
categorized[ecnt] = 1;
}
continue;
}
else {
// Processors of the two elements are different, so we are
Expand All @@ -1589,6 +1579,10 @@ namespace {
}
}
}
if (!categorized[ecnt]) {
lb->int_elems[proce].push_back(ecnt);
categorized[ecnt] = 1;
}
}
}
else {
Expand Down

0 comments on commit 2957d9c

Please sign in to comment.