Skip to content

Commit

Permalink
add a more complicated test for extra element integers to test stitch…
Browse files Browse the repository at this point in the history
…er of meshes with different set of integers idaholab#13764
  • Loading branch information
YaqiWang committed Oct 25, 2019
1 parent d93e6cc commit a30c6b4
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 0 deletions.
103 changes: 103 additions & 0 deletions test/tests/mesh/multi_elem_integers/multi_element_integer.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
[Mesh]
type = MeshGeneratorMesh

[gmg1]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 5
ny = 5
extra_element_integers = 'material_id'
[]
[gmg2]
type = GeneratedMeshGenerator
dim = 2
xmin = 1
xmax = 2
ymin = 0
ymax = 1
nx = 5
ny = 5
extra_element_integers = 'source_id'
[]
[stitcher]
type = StitchedMeshGenerator
inputs = 'gmg1 gmg2'
stitch_boundaries_pairs = 'right left'
[]
[set_material_id0]
type = SubdomainBoundingBoxGenerator
input = stitcher
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
location = INSIDE
integer_name = material_id
[]
[set_material_id1]
type = SubdomainBoundingBoxGenerator
input = set_material_id0
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 2
location = INSIDE
integer_name = material_id
[]
[set_material_id2]
type = SubdomainBoundingBoxGenerator
input = set_material_id1
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 3
location = INSIDE
integer_name = source_id
[]
[set_material_id3]
type = SubdomainBoundingBoxGenerator
input = set_material_id2
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 4
location = INSIDE
integer_name = source_id
[]
[]

[AuxVariables]
[id1]
family = MONOMIAL
order = CONSTANT
[]
[id2]
family = MONOMIAL
order = CONSTANT
[]
[]

[AuxKernels]
[id1]
type = ElementIntegerAux
variable = id1
integer_names = material_id
[]
[id2]
type = ElementIntegerAux
variable = id2
integer_names = source_id
[]
[]

[Problem]
solve = false
[]

[Executioner]
type = Steady
[]

[Outputs]
exodus = true
[]
10 changes: 10 additions & 0 deletions test/tests/mesh/multi_elem_integers/tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Tests]
issues = '#13764'
design = 'syntax/Mesh/index.md'
[./mesh_integer]
type = 'Exodiff'
input = 'multi_element_integer.i'
exodiff = 'multi_element_integer_out.e'
requirement = "MOOSE shall generate meshes with different set of element integers and properly stitch them."
[../]
[]

0 comments on commit a30c6b4

Please sign in to comment.