Skip to content

Commit

Permalink
Preserved block and boundary names of secondary meshes in CombinerGen…
Browse files Browse the repository at this point in the history
…erator

Closes idaholab#22838
  • Loading branch information
joshuahansel committed Apr 15, 2023
1 parent 176b752 commit 82cee4a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Expand Up @@ -6,6 +6,12 @@

The `CombinerGenerator` allows the user to combine the outputs of multiple `MeshGenerator`s into a single mesh. This is somewhat similar to the [StitchedMeshGenerator.md] with the difference being that `CombinerGenerator` makes no attempt to "heal" / "join" the mesh like [StitchedMeshGenerator.md] does. There `CombinerGenerator` is more suited to creation of disjoint meshes (where the individual pieces are not directly tied together).

!alert note title=Mesh naming precedence
`CombinerGenerator` preserves subdomain names and boundary names (node sets, side sets, and edge sets).
If the corresponding IDs exist in multiple meshes, then the meshes/copies listed
later in [!param](/Mesh/CombinerGenerator/inputs)/[!param](/Mesh/CombinerGenerator/positions)
take precedence.

## Usage

There are three main ways to use the `CombinerGenerator`:
Expand Down
9 changes: 9 additions & 0 deletions framework/src/meshgenerators/CombinerGenerator.C
Expand Up @@ -252,6 +252,15 @@ CombinerGenerator::copyIntoMesh(UnstructuredMesh & destination, const Unstructur
for (const auto & t : other_boundary.build_shellface_list())
boundary.add_shellface(std::get<0>(t) + elem_delta, std::get<1>(t), std::get<2>(t));

for (auto elem : source.get_subdomain_name_map())
destination.set_subdomain_name_map().insert(elem);

for (auto elem : other_boundary.get_nodeset_name_map())
boundary.set_nodeset_name_map().insert(elem);

for (auto elem : other_boundary.get_sideset_name_map())
boundary.set_sideset_name_map().insert(elem);

for (auto elem : other_boundary.get_edgeset_name_map())
boundary.set_edgeset_name_map().insert(elem);
}

0 comments on commit 82cee4a

Please sign in to comment.