diff --git a/packages/seacas/applications/nem_slice/elb.h b/packages/seacas/applications/nem_slice/elb.h index a427b49ecb..6255820f51 100644 --- a/packages/seacas/applications/nem_slice/elb.h +++ b/packages/seacas/applications/nem_slice/elb.h @@ -14,7 +14,7 @@ #include #include -#define ELB_VERSION "5.03 (2024/07/30)" +#define ELB_VERSION "5.04 (2024/08/19)" #define UTIL_NAME "nem_slice" #define ELB_FALSE 0 #define ELB_TRUE 1 diff --git a/packages/seacas/applications/nem_slice/elb_loadbal.C b/packages/seacas/applications/nem_slice/elb_loadbal.C index 1b0b059517..2b42dbd5b5 100644 --- a/packages/seacas/applications/nem_slice/elb_loadbal.C +++ b/packages/seacas/applications/nem_slice/elb_loadbal.C @@ -1637,23 +1637,25 @@ namespace { if (etype == BAR2 || etype == BAR3) { size_t nhold = graph->sur_elem[side_nodes[0]].size(); - for (size_t ncnt = 0; ncnt < nhold; ncnt++) { - hold_elem[ncnt] = graph->sur_elem[side_nodes[0]][ncnt]; - } + if (nhold > 1) { + for (size_t ncnt = 0; ncnt < nhold; ncnt++) { + hold_elem[ncnt] = graph->sur_elem[side_nodes[0]][ncnt]; + } - for (int ncnt = 0; ncnt < nnodes; ncnt++) { - /* Find elements connected to both node '0' and node 'ncnt+1' */ - nelem = find_inter(Data(hold_elem), Data(graph->sur_elem[side_nodes[(ncnt + 1)]]), - nhold, graph->sur_elem[side_nodes[(ncnt + 1)]].size(), - Data(pt_list)); + for (int ncnt = 0; ncnt < nnodes; ncnt++) { + /* Find elements connected to both node '0' and node 'ncnt+1' */ + nelem = find_inter(Data(hold_elem), Data(graph->sur_elem[side_nodes[(ncnt + 1)]]), + nhold, graph->sur_elem[side_nodes[(ncnt + 1)]].size(), + Data(pt_list)); - if (nelem < 2) { - break; - } + if (nelem < 2) { + break; + } - nhold = nelem; - for (int ncnt2 = 0; ncnt2 < nelem; ncnt2++) { - hold_elem[ncnt2] = hold_elem[pt_list[ncnt2]]; + nhold = nelem; + for (int ncnt2 = 0; ncnt2 < nelem; ncnt2++) { + hold_elem[ncnt2] = hold_elem[pt_list[ncnt2]]; + } } } }