Skip to content

Commit

Permalink
EJOIN: Only create non-empty assemblies
Browse files Browse the repository at this point in the history
  • Loading branch information
gsjaardema committed Jun 16, 2023
1 parent 68ed48f commit c583b52
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/seacas/applications/ejoin/EJ_Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

static std::array<std::string, 3> qainfo{
"ejoin",
"2023/05/26",
"1.6.0",
"2023/06/16",
"1.6.1",
};
10 changes: 5 additions & 5 deletions packages/seacas/applications/ejoin/EJoin.C
Original file line number Diff line number Diff line change
Expand Up @@ -577,11 +577,6 @@ namespace {
const std::string &prefix = region.name();

Ioss::Assembly *assem = nullptr;
if (create_assemblies) {
assem = new Ioss::Assembly(output_region.get_database(), region.name());
output_region.add(assem);
assem->property_add(Ioss::Property("name_in_output", region.name()));
}

const Ioss::ElementBlockContainer &ebs = region.get_element_blocks();
for (const auto &eb : ebs) {
Expand Down Expand Up @@ -618,6 +613,11 @@ namespace {
}

if (create_assemblies) {
if (assem == nullptr) {
assem = new Ioss::Assembly(output_region.get_database(), region.name());
output_region.add(assem);
assem->property_add(Ioss::Property("name_in_output", region.name()));
}
assem->add(ebn);
}
}
Expand Down

0 comments on commit c583b52

Please sign in to comment.