- inputThe mesh we want to modify
C++ Type:MeshGeneratorName
Controllable:No
Description:The mesh we want to modify
- subdomain_idsNew subdomain IDs of all elements
C++ Type:std::vector<unsigned short>
Controllable:No
Description:New subdomain IDs of all elements
ElementSubdomainIDGenerator
Allows the user to assign each element the subdomain ID of their choice
Input Parameters
- element_idsNew element IDs of all elements
C++ Type:std::vector<unsigned long>
Controllable:No
Description:New element IDs of all elements
- show_infoFalseWhether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
Advanced Parameters
Input Files
- (test/tests/userobjects/internal_side_user_object/internal_side_user_object_two_materials.i)
- (test/tests/meshgenerators/sidesets_between_subdomains_generator/sideset_between_vector_subdomains_generator.i)
- (test/tests/meshgenerators/sideset_around_subdomain_generator/around_multi_created_subdomain.i)
- (test/tests/mesh_modifiers/sidesets_between_subdomains/sidesets_between_vectors_of_subdomains.i)
- (modules/tensor_mechanics/test/tests/crystal_plasticity/user_object_based/prop_block_read.i)
- (test/tests/transfers/multiapp_transfer_transformation/transfer_transformation.i)
- (test/tests/postprocessors/point_value/point_value.i)
- (test/tests/mesh_modifiers/assign_element_subdomain_id/quad_with_subdomainid_test.i)
- (test/tests/mesh_modifiers/assign_element_subdomain_id/tri_with_subdomainid_test.i)
- (test/tests/mesh_modifiers/sidesets_around_subdomain/around_multi_created_subdomain.i)
- (modules/tensor_mechanics/test/tests/cohesive_zone_model/czm_multiple_action_and_materials.i)
- (test/tests/mesh_modifiers/assign_element_subdomain_id/quad_with_elementid_subdomainid_test.i)
- (test/tests/transfers/multiapp_transfer_transformation/transfer_transformation_sub.i)
(test/tests/userobjects/internal_side_user_object/internal_side_user_object_two_materials.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
ymin = -1
xmax = 1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = ElementSubdomainIDGenerator
subdomain_ids = '0 1
1 1'
[../]
[]
[Functions]
[./fn_exact]
type = ParsedFunction
value = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
value = -4
[../]
[]
[UserObjects]
[./isuo]
type = InsideUserObject
variable = u
diffusivity = diffusivity
execute_on = 'initial timestep_end'
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[../]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 1
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
[../]
[]
[Postprocessors]
[./value]
type = InsideValuePPS
user_object = isuo
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/sidesets_between_subdomains_generator/sideset_between_vector_subdomains_generator.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[./subdomain_id]
type = ElementSubdomainIDGenerator
input = gmg
subdomain_ids = '0 0 0 0
1 1 1 3
2 2 3 3
1 2 3 3'
[]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
primary_block = '0 1'
paired_block = '2 3'
new_boundary = 'in_between'
[]
[./emperty_interface]
type = SideSetsBetweenSubdomainsGenerator
input = interface
primary_block = '0'
paired_block = '2'
new_boundary = 'not_in_mesh'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/sideset_around_subdomain_generator/around_multi_created_subdomain.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 4
nx = 4
ymin = 0
ymax = 4
ny = 4
zmin = 0
zmax = 2
nz = 2
[]
[./subdomains]
type = ElementSubdomainIDGenerator
input = gmg
subdomain_ids = '0 0 0 0
0 0 0 0
1 1 0 0
2 2 2 2
3 3 0 0
3 3 0 0
1 1 0 0
0 0 0 0'
[]
[./interface]
type = SideSetsAroundSubdomainGenerator
input = subdomains
block = '1 2 3'
new_boundary = 'to0'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/mesh_modifiers/sidesets_between_subdomains/sidesets_between_vectors_of_subdomains.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[subdomain_id]
type = ElementSubdomainIDGenerator
input = gen
subdomain_ids = '0 0 0 0
1 1 1 3
2 2 3 3
'
' 1 2 3 3'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
primary_block = '0 1'
paired_block = '2 3'
new_boundary = 'in_between'
[]
[emperty_interface]
type = SideSetsBetweenSubdomainsGenerator
input = interface
primary_block = '0'
paired_block = '2'
new_boundary = 'not_in_mesh'
[]
[]
# This input file is intended to be run with the "--mesh-only" option so
# no other sections are required
(modules/tensor_mechanics/test/tests/crystal_plasticity/user_object_based/prop_block_read.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = ElementSubdomainIDGenerator
subdomain_ids = '0 1
0 1'
[../]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[GlobalParams]
volumetric_locking_correction = true
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./e_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./fp_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./gss]
order = CONSTANT
family = MONOMIAL
[../]
[./euler1]
order = CONSTANT
family = MONOMIAL
[../]
[./euler2]
order = CONSTANT
family = MONOMIAL
[../]
[./euler3]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
value = 0.01*t
[../]
[]
[UserObjects]
[./prop_read]
type = PropertyReadFile
prop_file_name = 'euler_ang_file.txt'
# Enter file data as prop#1, prop#2, .., prop#nprop
nprop = 3
read_type = block
nblock= 2
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./e_yy]
type = RankTwoAux
variable = e_yy
rank_two_tensor = lage
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./fp_yy]
type = RankTwoAux
variable = fp_yy
rank_two_tensor = fp
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./gss]
type = MaterialStdVectorAux
variable = gss
property = state_var_gss
index = 0
execute_on = timestep_end
[../]
[./euler1]
type = MaterialRealVectorValueAux
variable = euler1
property = Euler_angles
component = 0
execute_on = timestep_end
[../]
[./euler2]
type = MaterialRealVectorValueAux
variable = euler2
property = Euler_angles
component = 1
execute_on = timestep_end
[../]
[./euler3]
type = MaterialRealVectorValueAux
variable = euler3
property = Euler_angles
component = 2
execute_on = timestep_end
[../]
[]
[BCs]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tdisp
[../]
[]
[UserObjects]
[./slip_rate_gss]
type = CrystalPlasticitySlipRateGSS
variable_size = 12
slip_sys_file_name = input_slip_sys.txt
num_slip_sys_flowrate_props = 2
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
uo_state_var_name = state_var_gss
[../]
[./slip_resistance_gss]
type = CrystalPlasticitySlipResistanceGSS
variable_size = 12
uo_state_var_name = state_var_gss
[../]
[./state_var_gss]
type = CrystalPlasticityStateVariable
variable_size = 12
groups = '0 4 8 12'
group_values = '60.8 60.8 60.8'
uo_state_var_evol_rate_comp_name = state_var_evol_rate_comp_gss
scale_factor = 1.0
[../]
[./state_var_evol_rate_comp_gss]
type = CrystalPlasticityStateVarRateComponentGSS
variable_size = 12
hprops = '1.0 541.5 109.8 2.5'
uo_slip_rate_name = slip_rate_gss
uo_state_var_name = state_var_gss
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainUObasedCP
stol = 1e-2
tan_mod_type = exact
uo_slip_rates = 'slip_rate_gss'
uo_slip_resistances = 'slip_resistance_gss'
uo_state_vars = 'state_var_gss'
uo_state_var_evol_rate_comps = 'state_var_evol_rate_comp_gss'
[../]
[./strain]
type = ComputeFiniteStrain
displacements = 'disp_x disp_y'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
read_prop_user_object = prop_read
[../]
[]
[Postprocessors]
[./stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./e_yy]
type = ElementAverageValue
variable = e_yy
[../]
[./fp_yy]
type = ElementAverageValue
variable = fp_yy
[../]
[./gss]
type = ElementAverageValue
variable = gss
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.01
num_steps = 10
nl_abs_step_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y'
use_displaced_mesh = true
[../]
[]
(test/tests/transfers/multiapp_transfer_transformation/transfer_transformation.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 3
ny = 5
nz = 0
xmax = 0.8
xmin = 0.2
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[./subdomain_id]
type = ElementSubdomainIDGenerator
input = gmg
subdomain_ids = '0 1 2
0 1 2
0 1 2
0 1 2
0 1 2'
[]
[./boundary01]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
primary_block = '0'
paired_block = '1'
new_boundary = 'boundary01'
[]
[./boundary10]
type = SideSetsBetweenSubdomainsGenerator
input = boundary01
primary_block = '1'
paired_block = '0'
new_boundary = 'boundary10'
[]
[./boundary12]
type = SideSetsBetweenSubdomainsGenerator
input = boundary10
primary_block = '1'
paired_block = '2'
new_boundary = 'boundary12'
[]
[./boundary21]
type = SideSetsBetweenSubdomainsGenerator
input = boundary12
primary_block = '2'
paired_block = '1'
new_boundary = 'boundary21'
[]
uniform_refine = 3
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxVariables]
[./fromsubelem]
order = constant
family = monomial
[../]
[./fromsub]
[]
[]
[BCs]
[./left0]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right0]
type = DirichletBC
variable = u
boundary = boundary01
value = 1
[../]
[./right1]
type = DirichletBC
variable = u
boundary = boundary12
value = 0
[../]
[./right2]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0.0 0.0 0.0'
execute_on = 'timestep_end'
input_files = transfer_transformation_sub.i
[]
[]
[Transfers]
[from_sub]
type = MultiAppInterpolationTransfer
from_multi_app = sub
num_points = 1
shrink_gap_width = 0.2
shrink_mesh = 'source'
source_variable = 'u'
variable = 'fromsub'
exclude_gap_blocks = '1 3'
[]
[from_sub_elem]
type = MultiAppInterpolationTransfer
from_multi_app = sub
num_points = 4
shrink_gap_width = 0.2
shrink_mesh = 'source'
source_variable = 'u'
variable = 'fromsubelem'
exclude_gap_blocks = '1 3'
[]
[from_master]
type = MultiAppInterpolationTransfer
to_multi_app = sub
num_points = 1
shrink_gap_width = 0.2
shrink_mesh = 'target'
source_variable = 'u'
exclude_gap_blocks = '1 3'
variable = 'frommaster'
[]
[from_master_elem]
type = MultiAppInterpolationTransfer
to_multi_app = sub
num_points = 4
shrink_gap_width = 0.2
shrink_mesh = 'target'
source_variable = 'u'
exclude_gap_blocks = '1 3'
variable = 'frommasterelem'
[]
[]
(test/tests/postprocessors/point_value/point_value.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[./subdomain]
input = gen
type = ElementSubdomainIDGenerator
element_ids = '0 1 2 3'
subdomain_ids = '1 2 3 4'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./value]
type = PointValue
variable = u
point = '0.371 .41 0'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
csv = true
[]
(test/tests/mesh_modifiers/assign_element_subdomain_id/quad_with_subdomainid_test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[subdomain_id]
type = ElementSubdomainIDGenerator
input = gen
subdomain_ids = '0 1
1 1'
[]
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
active = 'diff'
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
active = 'left right'
# Mesh Generation produces boundaries in counter-clockwise fashion
[left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out_quad_subdomain_id
exodus = true
[]
(test/tests/mesh_modifiers/assign_element_subdomain_id/tri_with_subdomainid_test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
nz = 0
zmin = 0
zmax = 0
elem_type = TRI3
[]
[subdomain_id]
type = ElementSubdomainIDGenerator
input = gen
subdomain_ids = '0 1 1 1
1 1 1 0'
[]
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
active = 'diff'
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
active = 'left right'
# Mesh Generation produces boundaries in counter-clockwise fashion
[left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out_tri_subdomain_id
exodus = true
[]
(test/tests/mesh_modifiers/sidesets_around_subdomain/around_multi_created_subdomain.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 4
nx = 4
ymin = 0
ymax = 4
ny = 4
zmin = 0
zmax = 2
nz = 2
[]
[subdomains]
type = ElementSubdomainIDGenerator
input = gen
subdomain_ids = '0 0 0 0
0 0 0 0
1 1 0 0
'
' 2 2 2 2
3 3 0 0
3 3 0 0
'
' 1 1 0 0
0 0 0 0'
[]
[interface]
type = SideSetsAroundSubdomainGenerator
input = subdomains
block = '1 2 3'
new_boundary = 'to0'
[]
[]
# This input file is intended to be run with the "--mesh-only" option so
# no other sections are required
(modules/tensor_mechanics/test/tests/cohesive_zone_model/czm_multiple_action_and_materials.i)
[Mesh]
[./msh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 4
zmin = 0
zmax = 4
[../]
[./subdomain_id]
type = ElementSubdomainIDGenerator
input = msh
subdomain_ids = '0 1 2 3'
[]
[./split]
type = BreakMeshByBlockGenerator
input = subdomain_id
split_interface = true
[]
[add_side_sets]
input = split
type = SideSetsFromNormalsGenerator
normals = '0 -1 0
0 1 0
-1 0 0
1 0 0
0 0 -1
0 0 1'
fixed_normal = true
new_boundary = 'y0 y1 x0 x1 z0 z1'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./stretch]
type = PiecewiseLinear
x = '0 1'
y = '0 100'
[../]
[]
[Constraints]
[x1]
type = EqualValueBoundaryConstraint
variable = disp_x
secondary = 'x1' # boundary
penalty = 1e6
[]
[y1]
type = EqualValueBoundaryConstraint
variable = disp_y
secondary = 'y1' # boundary
penalty = 1e6
[]
[]
[BCs]
[./fix_x]
type = DirichletBC
preset = true
value = 0.0
boundary = x0
variable = disp_x
[../]
[./fix_y]
type = DirichletBC
preset = true
value = 0.0
boundary = y0
variable = disp_y
[../]
[./fix_z]
type = DirichletBC
preset = true
value = 0.0
boundary = z0
variable = disp_z
[../]
[./back_z]
type = FunctionNeumannBC
boundary = z1
variable = disp_z
use_displaced_mesh = false
function = stretch
[../]
[]
[Modules/TensorMechanics/CohesiveZoneMaster]
[./czm_ik_012]
boundary = 'Block0_Block1 Block1_Block2'
base_name = 'czm_b012'
[../]
[./czm_ik_23]
boundary = 'Block2_Block3'
base_name = 'czm_b23'
[../]
[]
[Materials]
# cohesive materials
[./czm_3dc]
type = SalehaniIrani3DCTraction
boundary = 'Block0_Block1 Block1_Block2'
normal_gap_at_maximum_normal_traction = 1
tangential_gap_at_maximum_shear_traction = 0.5
maximum_normal_traction = 500
maximum_shear_traction = 300
base_name = 'czm_b012'
[../]
[./czm_elastic_incremental]
type = PureElasticTractionSeparationIncremental
boundary = 'Block2_Block3'
normal_stiffness = 500
tangent_stiffness = 300
base_name = 'czm_b23'
[../]
# bulk materials
[./stress]
type = ADComputeFiniteStrainElasticStress
[../]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200e4
poissons_ratio = 0.3
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./all]
strain = FINITE
add_variables = true
use_finite_deform_jacobian = true
use_automatic_differentiation = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_xz'
[../]
[../]
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
# Executioner
type = Transient
solve_type = 'NEWTON'
line_search = none
petsc_options_iname = '-pc_type '
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
l_max_its = 20
start_time = 0.0
dt = 0.25
dtmin = 0.25
num_steps =1
[]
[Outputs]
exodus = true
[]
(test/tests/mesh_modifiers/assign_element_subdomain_id/quad_with_elementid_subdomainid_test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[subdomain_id]
type = ElementSubdomainIDGenerator
input = gen
element_ids = '1 2 3'
subdomain_ids = '1 1 1'
[]
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
active = 'diff'
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
active = 'left right'
# Mesh Generation produces boundaries in counter-clockwise fashion
[left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out_quad_subdomain_id
exodus = true
[]
(test/tests/transfers/multiapp_transfer_transformation/transfer_transformation_sub.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[./subdomain_id]
type = ElementSubdomainIDGenerator
input = gmg
subdomain_ids = '0 1 2 3 4
0 1 2 3 4
0 1 2 3 4
0 1 2 3 4
0 1 2 3 4'
[]
[./boundary01]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
primary_block = '0'
paired_block = '1'
new_boundary = 'boundary01'
[]
[./boundary10]
type = SideSetsBetweenSubdomainsGenerator
input = boundary01
primary_block = '1'
paired_block = '0'
new_boundary = 'boundary10'
[]
[./boundary12]
type = SideSetsBetweenSubdomainsGenerator
input = boundary10
primary_block = '1'
paired_block = '2'
new_boundary = 'boundary12'
[]
[./boundary21]
type = SideSetsBetweenSubdomainsGenerator
input = boundary12
primary_block = '2'
paired_block = '1'
new_boundary = 'boundary21'
[]
[./boundary23]
type = SideSetsBetweenSubdomainsGenerator
input = boundary21
primary_block = '2'
paired_block = '3'
new_boundary = 'boundary23'
[]
[./boundary32]
type = SideSetsBetweenSubdomainsGenerator
input = boundary23
primary_block = '3'
paired_block = '2'
new_boundary = 'boundary32'
[]
[./boundary34]
type = SideSetsBetweenSubdomainsGenerator
input = boundary32
primary_block = '3'
paired_block = '4'
new_boundary = 'boundary34'
[]
[./boundary43]
type = SideSetsBetweenSubdomainsGenerator
input = boundary34
primary_block = '4'
paired_block = '3'
new_boundary = 'boundary43'
[]
uniform_refine = 3
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxVariables]
[./frommaster]
[]
[./frommasterelem]
order = constant
family = monomial
[../]
[]
[BCs]
[./left0]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right0]
type = DirichletBC
variable = u
boundary = boundary01
value = 1
[../]
[./right1]
type = DirichletBC
variable = u
boundary = boundary12
value = 1
[../]
[./right2]
type = DirichletBC
variable = u
boundary = boundary23
value = 0
[../]
[./right3]
type = DirichletBC
variable = u
boundary = boundary34
value = 0
[../]
[./right4]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]