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 Sep 1, 2020
1 parent 166c9f3 commit 373481a
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 1 deletion.
3 changes: 2 additions & 1 deletion framework/src/meshgenerators/BreakMeshByBlockGenerator.C
Expand Up @@ -12,7 +12,7 @@

#include "libmesh/distributed_mesh.h"
#include "libmesh/elem.h"

#include "libmesh/partitioner.h"
#include <typeinfo>

registerMooseObject("MooseApp", BreakMeshByBlockGenerator);
Expand Down Expand Up @@ -163,6 +163,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
[]
14 changes: 14 additions & 0 deletions test/tests/meshgenerators/break_mesh_by_block_generator/tests
Expand Up @@ -70,4 +70,18 @@
mesh_mode = 'REPLICATED'
recover = false
[../]

[./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
[../]
[]

0 comments on commit 373481a

Please sign in to comment.