forked from idaholab/moose
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added RefineSidesetGenerator to mesh_generators
Updated generate function for RefineSidesetGenerator.C Added test files for RefineSidesetGenerator Cleanup code and add documentation for RefineSidesetGenerator Updated test files, added golds to RefineSidesetGenerator Formatting and doc edits for PR idaholab#18913 More formatting changes, and optimizing the recursive refine algorithm Applying the formatting patch for RefineSideset Changed get_boundary_info() call to work in-line rather than an explicit declaration Clang-format changes to RefineSidesetGenerator.C Added documentation files to RefineSidesetGenerator. Apply minor formatting and documentation changes from code review Update framework/src/meshgenerators/RefineSidesetGenerator.C Update framework/src/meshgenerators/RefineSidesetGenerator.C Co-Authored-By: Logan Harbour <loganhharbour@gmail.com>
- Loading branch information
1 parent
7e77205
commit ebf9280
Showing
8 changed files
with
181 additions
and
54 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
framework/doc/content/source/meshgenerators/RefineSidesetGenerator.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# RefineSidesetGenerator | ||
|
||
!syntax description /Mesh/RefineSidesetGenerator | ||
|
||
## Overview | ||
|
||
This MeshGenerator object allows the user to refine one or more boundaries in a mesh, as well as neighboring elements of the boundary/boundaries. | ||
|
||
The user has to provide the name(s) of the boundary/boundaries to be modified, as well as the corresponding levels of refinement for each boundary. These must match up to the order of the aforementioned boundary name list, e.g. if the boundaries you wish to modify are 'left right', with 1 refinement for left, 2 for right, then the refinement list will need to look like '1 2'. By default, refinement in libmesh refines neighboring boundaries to avoid meshing problems. This generator shares this default, but it can be disabled with setting [!param](/Mesh/RefineSidesetGenerator/enable_neighbor_refinement) to `false`. Additionally, the user must provide the type of refinement to perform in [!param](/Mesh/RefineSidesetGenerator/boundary_side) where "primary" merely refines the elements on the boundary, "secondary" only refines the neighbors of the boundary, and "both" refines both the elements on the boundary and its neighboring elements. | ||
|
||
!syntax parameters /Mesh/RefineSidesetGenerator | ||
|
||
!syntax inputs /Mesh/RefineSidesetGenerator | ||
|
||
!syntax children /Mesh/RefineSidesetGenerator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+79.8 KB
test/tests/meshgenerators/refine_sideset_generator/gold/test_left_in.e
Binary file not shown.
Binary file added
BIN
+154 KB
test/tests/meshgenerators/refine_sideset_generator/gold/test_multi_in.e
Binary file not shown.
37 changes: 37 additions & 0 deletions
37
test/tests/meshgenerators/refine_sideset_generator/test_left.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[Mesh] | ||
[eg] | ||
type = CartesianMeshGenerator | ||
dim = 3 | ||
dx = '2 1 1' | ||
dy = '2 3' | ||
dz = '0.4 0.5 0.6 0.7' | ||
ix = '2 1 1' | ||
iy = '2 3' | ||
iz = '1 1 1 1' | ||
subdomain_id = '0 1 1 1 | ||
1 2 0 1 | ||
0 1 1 1 | ||
2 2 2 2 | ||
3 3 1 3 | ||
1 1 1 1' | ||
[] | ||
[sideset] | ||
type = SideSetsBetweenSubdomainsGenerator | ||
input = eg | ||
primary_block = 1 | ||
paired_block = 2 | ||
new_boundary = sideset_1 | ||
[] | ||
[refine] | ||
type = RefineSidesetGenerator | ||
input = sideset | ||
boundaries = 'sideset_1' | ||
refinement = '2' | ||
boundary_side = 'secondary' | ||
enable_neighbor_refinement = false | ||
[] | ||
[] | ||
|
||
[Outputs] | ||
exodus = true | ||
[] |
37 changes: 37 additions & 0 deletions
37
test/tests/meshgenerators/refine_sideset_generator/test_multi.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[Mesh] | ||
[eg] | ||
type = CartesianMeshGenerator | ||
dim = 3 | ||
dx = '2 1 1' | ||
dy = '2 3' | ||
dz = '0.4 0.5 0.6 0.7' | ||
ix = '2 1 1' | ||
iy = '2 3' | ||
iz = '1 1 1 1' | ||
subdomain_id = '0 1 1 1 | ||
1 2 0 1 | ||
0 1 1 1 | ||
2 2 2 2 | ||
3 3 1 3 | ||
1 1 1 1' | ||
[] | ||
[sideset] | ||
type = SideSetsBetweenSubdomainsGenerator | ||
input = eg | ||
primary_block = 1 | ||
paired_block = 2 | ||
new_boundary = sideset_1 | ||
[] | ||
[refine] | ||
type = RefineSidesetGenerator | ||
input = sideset | ||
boundaries = 'sideset_1' | ||
refinement = '2' | ||
boundary_side = 'both' | ||
enable_neighbor_refinement = false | ||
[] | ||
[] | ||
|
||
[Outputs] | ||
exodus = true | ||
[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[Tests] | ||
issues = '#18913' | ||
design = 'meshgenerators/RefineSidesetGenerator.md' | ||
|
||
[generate] | ||
requirement = 'The system shall support the ability to refine' | ||
|
||
[secondary] | ||
type = 'Exodiff' | ||
input = 'test_left.i' | ||
exodiff = 'test_left_in.e' | ||
cli_args = '--mesh-only' | ||
recover = false | ||
detail = 'a single block within a multi-domain mesh' | ||
[] | ||
[both] | ||
type = 'Exodiff' | ||
input = 'test_multi.i' | ||
exodiff = 'test_multi_in.e' | ||
recover = false | ||
cli_args = "--mesh-only" | ||
detail = 'multiple blocks within a multi-domain mesh' | ||
[] | ||
[] | ||
[] |