Skip to content

Commit

Permalink
fix and closes idaholab#15793
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Rovinelli committed Mar 31, 2021
1 parent 0f5991f commit 9a3ee67
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 0 deletions.
1 change: 1 addition & 0 deletions framework/src/meshgenerators/BreakMeshByBlockGenerator.C
Expand Up @@ -221,6 +221,7 @@ BreakMeshByBlockGenerator::generate()
} // end nodeptr check

addInterfaceBoundary(*mesh);
Partitioner::set_node_processor_ids(*mesh);
return dynamic_pointer_cast<MeshBase>(mesh);
}

Expand Down
Binary file not shown.
@@ -0,0 +1,69 @@
[GlobalParams]
displacements = "disp_x disp_y disp_z"
[]

[Mesh]
[./msh]
type = GeneratedMeshGenerator
nx = 2
ny = 3
nz = 4
xmin = -2.5
xmax = 2.5
ymin = -2
ymax = 2
zmin = -1.5
zmax = 1.5
dim = 3
[../]
[./subdomain_1]
type = SubdomainBoundingBoxGenerator
input = msh
bottom_left = '-2.5 -2 -1'
top_right = '2.5 0 0.5'
block_id = 1
[]
[./subdomain_2]
type = SubdomainBoundingBoxGenerator
input = subdomain_1
bottom_left = '-2.5 0 -1'
top_right = '2.5 2 0.5'
block_id = 2
[]
[./subdomain_3]
type = SubdomainBoundingBoxGenerator
input = subdomain_2
bottom_left = '-2.5 -2 0.5'
top_right = '1.25 2 1.5'
block_id = 3
[]
[./subdomain_4]
type = SubdomainBoundingBoxGenerator
input = subdomain_3
bottom_left = '1.25 -2 0.5'
top_right = '5 2 1.5'
block_id = 4
[]
[./subdomain_5]
type = SubdomainBoundingBoxGenerator
input = subdomain_4
bottom_left = '-2.5 -2 -1.5'
top_right = '1.25 2 -1'
block_id = 3
[]
[./subdomain_6]
type = SubdomainBoundingBoxGenerator
input = subdomain_5
bottom_left = '1.25 -2 -1.5'
top_right = '2.5 2 -1'
block_id = 4
[]
[./split]
type = BreakMeshByBlockGenerator
input = subdomain_6
[]
[]

[Outputs]
exodus = true
[]
13 changes: 13 additions & 0 deletions test/tests/meshgenerators/break_mesh_by_block_generator/tests
Expand Up @@ -74,6 +74,19 @@

detail = "with a polycrystal based mesh in 2D."
[]
[./hanging_nodes]
type = 'Exodiff'
input = 'hanging_nodes_parallel.i'
cli_args = '--mesh-only'
exodiff = 'hanging_nodes_parallel_in.e'
requirement = 'MOOSE shall be able to create separate blocks in a mesh in parallel'
design = 'meshgenerators/BreakMeshByBlockGenerator.md'
issues = '#15793'
mesh_mode = 'REPLICATED'
min_parallel = 4
max_parallel = 5
recover = false
[../]
[]

[block_restricted]
Expand Down

0 comments on commit 9a3ee67

Please sign in to comment.