- fileThe filename to read.
C++ Type:MeshFileName
Description:The filename to read.
FileMeshGenerator
Support File Formats
The FileMeshGenerator
is the default type for MOOSE and as the name suggests it reads the mesh from an external file. MOOSE supports reading and writing a large number of formats and could be extended to read more.
Extension | Description |
---|---|
.e, .exd | Sandia's ExodusII format |
.dat | Tecplot ASCII file |
.fro | ACDL's surface triangulation file |
.gmv | LANL's GMV (General Mesh Viewer) format |
.mat | Matlab triangular ASCII file (read only) |
.msh | GMSH ASCII file |
.n, .nem | Sandia's Nemesis format |
.plt | Tecplot binary file (write only) |
.node, .ele; .poly | TetGen ASCII file (read; write) |
.inp | Abaqus .inp format (read only) |
.ucd | AVS's ASCII UCD format |
.unv | I-deas Universal format |
.xda, .xdr | libMesh formats |
.vtk, .pvtu | Visualization Toolkit |
Further FileMeshGenerator Documentation
Input Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector
Options:
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Options:
Description:Set the enabled status of the MooseObject.
Advanced Parameters
Input Files
- test/tests/meshgenerators/mixed_dim/1d_2d.i
- test/tests/meshgenerators/block_deletion_generator/block_deletion_test11.i
- test/tests/meshgenerators/generate_extra_nodeset/generate_extra_nodeset_coord.i
- test/tests/meshgenerators/break_mesh_by_block_generator/break_mesh_2DJunction_auto.i
- test/tests/meshgenerators/break_mesh_by_block_generator/break_mesh_3D_polycrystal.i
- test/tests/meshgenerators/adapt/displaced_adapt_test_mg.i
- test/tests/meshgenerators/add_all_side_sets_generators/less_simple.i
- test/tests/meshgenerators/break_mesh_by_block_generator/break_mesh_2DJunction_splittrue.i
- test/tests/meshgenerators/sidesets_between_subdomains_generator/between.i
- test/tests/meshgenerators/patterned_mesh_generator/patterned_mesh_generator.i
- test/tests/meshgenerators/generate_sidesets_by_normals/simple.i
- test/tests/meshgenerators/sidesets_from_points_generator/sidesets_from_points.i
- test/tests/meshgenerators/add_all_side_sets_generators/simple.i
- test/tests/meshgenerators/mixed_dim/1d_3d.i
- test/tests/meshgenerators/adapt_weight/adapt_weight_mg.i
- test/tests/meshgenerators/transform_generator/rotate_and_scale.i
- test/tests/meshgenerators/adapt/patch_recovery_test_mg.i
- test/tests/meshgenerators/sidesets_from_normals_generator/sidesets_cylinder_normals_fixed.i
- test/tests/meshgenerators/file_mesh_generator/file_mesh_generator.i
- test/tests/meshgenerators/break_mesh_by_block_generator/break_mesh_3D_auto.i
- test/tests/meshgenerators/adapt/adapt_mg_test.i
- test/tests/meshgenerators/mesh_extruder_generator/extrude_quad.i
- test/tests/meshgenerators/mesh_extruder_generator/extrude_angle.i
- test/tests/meshgenerators/adapt/interval_mg.i
- test/tests/meshgenerators/gmsh/gmsh_test.i
- test/tests/meshgenerators/tiled_mesh_generator/tiled_mesh_generator.i
- test/tests/meshgenerators/mesh_extruder_generator/extrude_remap_layer1.i
- test/tests/meshgenerators/smooth_mesh_generator/mesh_smoother_generator.i
- test/tests/meshgenerators/sidesets_by_normals_generator/simple.i
- test/tests/meshgenerators/extra_nodeset_generator/generate_extra_nodeset_coord.i
- test/tests/meshgenerators/adapt/adapt_test_cycles_mg.i
- test/tests/meshgenerators/mixed_dim/1d_2d_w_matl.i
- test/tests/meshgenerators/break_mesh_by_block_generator/break_mesh_3D_splittrue.i
- test/tests/meshgenerators/sideset_around_subdomain_generator/around_normals_generator.i
- test/tests/meshgenerators/sidesets_by_normals_generator/less_simple.i
- test/tests/meshgenerators/stitched_mesh_generator/stitched_mesh_generator2.i
- test/tests/meshgenerators/generate_sidesets_by_normals/less_simple.i
- test/tests/meshgenerators/sidesets_from_normals_generator/sidesets_cylinder_normals.i
- test/tests/meshgenerators/gmsh_bcs/gmsh_bcs.i
- test/tests/meshgenerators/break_mesh_by_block_generator/break_mesh_2DJunction_polycrystal.i
- test/tests/meshgenerators/generate_extra_nodeset/generate_extra_nodeset.i
- test/tests/meshgenerators/adapt/adapt_time_test_mg.i
- test/tests/meshgenerators/sideset_around_subdomain_generator/around.i
- test/tests/meshgenerators/stitched_mesh_generator/stitched_mesh_generator.i
- test/tests/meshgenerators/extra_nodeset_generator/generate_extra_nodeset.i
- test/tests/meshgenerators/mesh_extruder_generator/extrude_remap_layer2.i
test/tests/meshgenerators/mixed_dim/1d_2d.i
[MeshGenerators]
[./fmg]
type= FileMeshGenerator
file = 1d_2d.e
[]
[]
[Mesh]
type= MeshGeneratorMesh
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 4
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[./bottom]
type = DirichletBC
variable = u
boundary = 100
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = 101
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out
exodus = true
[]
test/tests/meshgenerators/block_deletion_generator/block_deletion_test11.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = pyramid.e
[]
[./sbb2]
type = SubdomainBoundingBoxGenerator
input = fmg
block_id = 2
bottom_left = '-0.5 -0.5 -0.5'
top_right = '0.5 0.5 0.5'
[../]
[./swiss_cheese2]
type = BlockDeletionGenerator
block_id = 2
input = 'sbb2'
[../]
[./sbb3]
type = SubdomainBoundingBoxGenerator
input = swiss_cheese2
block_id = 3
bottom_left = '-5 -5 -3'
top_right = '-2 -2 -1'
[../]
[./swiss_cheese3]
type = BlockDeletionGenerator
block_id = 3
input = 'sbb3'
[../]
[./sbb4]
type = SubdomainBoundingBoxGenerator
input = swiss_cheese3
block_id = 4
bottom_left = '-1 2 -2'
top_right = '1 5 0'
[../]
[./swiss_cheese4]
type = BlockDeletionGenerator
block_id = 4
input = 'sbb4'
[../]
[./sbb5]
type = OrientedSubdomainBoundingBoxGenerator
input = swiss_cheese4
block_id = 5
center = '2.4 -1.4 0.4'
height = 3
length = 8
length_direction = '-2 1 -1'
width = 3
width_direction = '1 2 0'
[../]
[./swiss_cheese5]
type = BlockDeletionGenerator
block_id = 5
input = 'sbb5'
[../]
[./sbb6]
type = OrientedSubdomainBoundingBoxGenerator
input = swiss_cheese5
block_id = 6
center = '-1 0.4 2.2'
height = 1
length = 8
length_direction = '2 -1 -1'
width = 1
width_direction = '1 2 0'
[../]
[./swiss_cheese6]
type = BlockDeletionGenerator
block_id = 6
input = 'sbb6'
[../]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 100
dt = 100
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/generate_extra_nodeset/generate_extra_nodeset_coord.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = square.e
[]
[./extra_nodeset]
type = ExtraNodesetGenerator
input = fmg
new_boundary = 'middle_node'
coord = '0.5 0.5'
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
active = 'left right middle'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[./middle]
type = DirichletBC
variable = u
boundary = 'middle_node'
value = -1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
file_base = out_coord
[]
test/tests/meshgenerators/break_mesh_by_block_generator/break_mesh_2DJunction_auto.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = 4ElementJunction.e
[]
[./breakmesh]
type = BreakMeshByBlockGenerator
input = fmg
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/break_mesh_by_block_generator/break_mesh_3D_polycrystal.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = poly2.msh
#parallel_type = replicated
[]
[./breakmesh]
type = BreakMeshByBlockGenerator
input = fmg
split_interface = true
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/adapt/displaced_adapt_test_mg.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = square.e
uniform_refine = 3
displacements = 'u aux_v'
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Functions]
[./aux_v_fn]
type = ParsedFunction
value = x*(y-0.5)/5
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'udiff uie vdiff vconv vie'
[./udiff]
type = Diffusion
variable = u
[../]
[./uie]
type = TimeDerivative
variable = u
[../]
[./vdiff]
type = Diffusion
variable = v
[../]
[./vconv]
type = Convection
variable = v
velocity = '-10 1 0'
[../]
[./vie]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
active = 'uleft uright vleft vright'
[./uleft]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./uright]
type = DirichletBC
variable = u
boundary = 2
value = 0.1
[../]
[./vleft]
type = DirichletBC
variable = v
boundary = 1
value = 1
[../]
[./vright]
type = DirichletBC
variable = v
boundary = 2
value = 0
[../]
[]
[AuxVariables]
[./aux_v]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./aux_k_1]
type = FunctionAux
variable = aux_v
function = aux_v_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 2
dt = .1
[./Adaptivity]
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
exodus = true
[./displaced]
type = Exodus
use_displaced = true
[../]
[]
test/tests/meshgenerators/add_all_side_sets_generators/less_simple.i
[MeshGenerators]
[read]
type = FileMeshGenerator
file = reactor.e
[]
[block_1]
type = AllSideSetsByNormalsGenerator
input = read
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
# This input file is intended to be run with the "--mesh-only" option so
# no other sections are required
test/tests/meshgenerators/break_mesh_by_block_generator/break_mesh_2DJunction_splittrue.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = 4ElementJunction.e
[]
[./breakmesh]
type = BreakMeshByBlockGenerator
input = fmg
split_interface = true
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/sidesets_between_subdomains_generator/between.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = twoblocks.e
[]
[./extrude]
type = SideSetsBetweenSubdomainsGenerator
input = fmg
master_block = 'left'
paired_block = 'right'
new_boundary = 'in_between'
[../]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/patterned_mesh_generator/patterned_mesh_generator.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = quad_mesh.e
[]
[./fmg2]
type = FileMeshGenerator
file = tri_mesh.e
[]
[./pmg]
type = PatternedMeshGenerator
inputs = 'fmg fmg2'
pattern = '0 0 0 0 0 0 0 0 0 0 0 0 0 0 ;
0 1 1 0 0 0 0 0 0 0 0 1 1 0 ;
0 1 1 1 0 0 0 0 0 0 1 1 1 0 ;
0 1 0 1 1 0 0 0 0 1 1 0 1 0 ;
0 1 0 0 1 1 0 0 1 1 0 0 1 0 ;
0 1 0 0 0 1 1 1 1 0 0 0 1 0 ;
0 1 0 0 0 0 1 1 0 0 0 0 1 0 ;
0 1 0 0 0 0 0 0 0 0 0 0 1 0 ;
0 1 0 0 0 0 0 0 0 0 0 0 1 0 ;
0 1 0 0 0 0 0 0 0 0 0 0 1 0 ;
0 1 0 0 0 0 0 0 0 0 0 0 1 0 ;
0 0 0 0 0 0 0 0 0 0 0 0 0 0'
bottom_boundary = 1
right_boundary = 2
top_boundary = 3
left_boundary = 4
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = MatCoefDiffusion
variable = u
conductivity = conductivity
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = 3
value = 1
[../]
[./bottom]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Materials]
[./mat1]
type = GenericConstantMaterial
block = 1
prop_names = conductivity
prop_values = 100
[../]
[./mat2]
type = GenericConstantMaterial
block = 2
prop_names = conductivity
prop_values = 1e-4
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/generate_sidesets_by_normals/simple.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = twoblocks.e
[]
[./generate_sidesets]
type = GenerateAllSideSetsByNormals
input = fmg
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/sidesets_from_points_generator/sidesets_from_points.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = cylinder.e
#parallel_type = replicated
[]
[./sidesets]
type = SideSetsFromPointsGenerator
input = fmg
points = '0 0 0.5
0.1 0 0
0 0 -0.5'
new_boundary = 'top side bottom'
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/add_all_side_sets_generators/simple.i
[MeshGenerators]
[read]
type = FileMeshGenerator
file = twoblocks.e
[]
[block_1]
type = AllSideSetsByNormalsGenerator
input = read
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
# This input file is intended to be run with the "--mesh-only" option so
# no other sections are required
test/tests/meshgenerators/mixed_dim/1d_3d.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = 1d_3d.e
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 4
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[./bottom]
type = DirichletBC
variable = u
boundary = 100
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = 101
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = 1d_3d_out
exodus = true
[]
test/tests/meshgenerators/adapt_weight/adapt_weight_mg.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = square.e
uniform_refine = 3
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'udiff uconv uie vdiff vconv vie'
[./udiff]
type = Diffusion
variable = u
[../]
[./uconv]
type = Convection
variable = u
velocity = '10 1 0'
[../]
[./uie]
type = TimeDerivative
variable = u
[../]
[./vdiff]
type = Diffusion
variable = v
[../]
[./vconv]
type = Convection
variable = v
velocity = '-10 1 0'
[../]
[./vie]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
active = 'uleft uright vleft vright'
[./uleft]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./uright]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[./vleft]
type = DirichletBC
variable = v
boundary = 1
value = 1
[../]
[./vright]
type = DirichletBC
variable = v
boundary = 2
value = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 2
dt = .1
[./Adaptivity]
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
weight_names = 'u'
weight_values = '1.0'
[../]
[]
[Outputs]
file_base = out
exodus = true
[]
test/tests/meshgenerators/transform_generator/rotate_and_scale.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = cylinder.e
[]
[./rotate]
type = TransformGenerator
input = fmg
transform = ROTATE
vector_value = '0 90 0'
[]
[./scale]
type = TransformGenerator
input = rotate
transform = SCALE
vector_value ='1e2 1e2 1e2'
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/adapt/patch_recovery_test_mg.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = square.e
uniform_refine = 4
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'udiff uconv uie vdiff vconv vie'
[./udiff]
type = Diffusion
variable = u
[../]
[./uconv]
type = Convection
variable = u
velocity = '10 1 0'
[../]
[./uie]
type = TimeDerivative
variable = u
[../]
[./vdiff]
type = Diffusion
variable = v
[../]
[./vconv]
type = Convection
variable = v
velocity = '-10 1 0'
[../]
[./vie]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
active = 'uleft uright vleft vright'
[./uleft]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./uright]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[./vleft]
type = DirichletBC
variable = v
boundary = 1
value = 1
[../]
[./vright]
type = DirichletBC
variable = v
boundary = 2
value = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 2
dt = .1
[./Adaptivity]
refine_fraction = 0.5
coarsen_fraction = 0.05
# max_h_level = 8
error_estimator = PatchRecoveryErrorEstimator
[../]
[]
[Outputs]
file_base = patch_out
exodus = true
[]
test/tests/meshgenerators/sidesets_from_normals_generator/sidesets_cylinder_normals_fixed.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = cylinder.e
#parallel_type = replicated
[]
[./sidesets]
type = SideSetsFromNormalsGenerator
input = fmg
normals = '0 1 0
0 -1 0'
fixed_normal = true
new_boundary = 'front back'
variance = 0.5
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./front]
type = DirichletBC
variable = u
boundary = front
value = 0
[../]
[./back]
type = DirichletBC
variable = u
boundary = back
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/file_mesh_generator/file_mesh_generator.i
[MeshGenerators]
[fmg]
type = FileMeshGenerator
file = square.e
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/break_mesh_by_block_generator/break_mesh_3D_auto.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = coh3D_3Blocks.e
parallel_type = replicated
[]
[./breakmesh]
type = BreakMeshByBlockGenerator
input = fmg
split_interface = true
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/adapt/adapt_mg_test.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = square.e
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'udiff uconv uie vdiff vconv vie'
[./udiff]
type = Diffusion
variable = u
[../]
[./uconv]
type = Convection
variable = u
velocity = '10 1 0'
[../]
[./uie]
type = TimeDerivative
variable = u
[../]
[./vdiff]
type = Diffusion
variable = v
[../]
[./vconv]
type = Convection
variable = v
velocity = '-10 1 0'
[../]
[./vie]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
active = 'uleft uright vleft vright'
[./uleft]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./uright]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[./vleft]
type = DirichletBC
variable = v
boundary = 1
value = 1
[../]
[./vright]
type = DirichletBC
variable = v
boundary = 2
value = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 2
dt = .1
[./Adaptivity]
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
file_base = out
exodus = true
[]
test/tests/meshgenerators/mesh_extruder_generator/extrude_quad.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = chimney_quad.e
[]
[./extrude]
type = MeshExtruderGenerator
input = fmg
num_layers = 20
extrusion_vector = '0 1e-2 0'
bottom_sideset = 'new_bottom'
top_sideset = 'new_top'
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = 'new_bottom'
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = 'new_top'
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out_quad
exodus = true
[]
test/tests/meshgenerators/mesh_extruder_generator/extrude_angle.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = chimney_quad.e
[]
[./extrude]
type = MeshExtruderGenerator
input = fmg
num_layers = 20
extrusion_vector = '1e-2 1e-2 0'
bottom_sideset = '10'
top_sideset = '20'
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = 10
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = 20
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out_quad_angle
exodus = true
[]
test/tests/meshgenerators/adapt/interval_mg.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = square.e
uniform_refine = 3
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'udiff uconv uie vdiff vconv vie'
[./udiff]
type = Diffusion
variable = u
[../]
[./uconv]
type = Convection
variable = u
velocity = '10 1 0'
[../]
[./uie]
type = TimeDerivative
variable = u
[../]
[./vdiff]
type = Diffusion
variable = v
[../]
[./vconv]
type = Convection
variable = v
velocity = '-10 1 0'
[../]
[./vie]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
active = 'uleft uright vleft vright'
[./uleft]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./uright]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[./vleft]
type = DirichletBC
variable = v
boundary = 1
value = 1
[../]
[./vright]
type = DirichletBC
variable = v
boundary = 2
value = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 4
dt = .1
[./Adaptivity]
interval = 2
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/gmsh/gmsh_test.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = sample.msh
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
test/tests/meshgenerators/tiled_mesh_generator/tiled_mesh_generator.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = cube.e
[]
[./tmg]
type = TiledMeshGenerator
input = fmg
left_boundary = left
right_boundary = right
top_boundary = top
bottom_boundary = bottom
front_boundary = front
back_boundary = back
x_tiles = 2
y_tiles = 2
z_tiles = 2
# You can only run this test with ReplicatedMesh because the underlying
# algorithm, stitch_meshes(), only works with ReplicatedMesh.
parallel_type = replicated
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/mesh_extruder_generator/extrude_remap_layer1.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = multiblock.e
[]
[./extrude]
type = MeshExtruderGenerator
input = fmg
num_layers = 6
extrusion_vector = '0 0 2'
bottom_sideset = 'new_bottom'
top_sideset = 'new_top'
# Remap layers
existing_subdomains = '1 2 5'
layers = '1 3 5'
new_ids = '10 12 15
30 32 35
50 52 55'
[../]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = 'new_bottom'
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = 'new_top'
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/smooth_mesh_generator/mesh_smoother_generator.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = concentric_circle_mesh_in.e
[]
[./smooth]
type = SmoothMeshGenerator
input = fmg
iterations = 3
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/sidesets_by_normals_generator/simple.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = twoblocks.e
[]
[./generate_sidesets]
type = AllSideSetsByNormalsGenerator
input = fmg
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/extra_nodeset_generator/generate_extra_nodeset_coord.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = square.e
[]
[./extra_nodeset]
type = ExtraNodesetGenerator
input = fmg
new_boundary = 'middle_node'
coord = '0.5 0.5'
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/adapt/adapt_test_cycles_mg.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = square.e
uniform_refine = 3
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'udiff uconv uie vdiff'
[./udiff]
type = Diffusion
variable = u
[../]
[./uconv]
type = Convection
variable = u
velocity = '20 1 0'
[../]
[./uie]
type = TimeDerivative
variable = u
[../]
[./vdiff]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'uleft uright vleft vright'
[./uleft]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./uright]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[./vleft]
type = DirichletBC
variable = v
boundary = 1
value = 1
[../]
[./vright]
type = DirichletBC
variable = v
boundary = 2
value = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 2
dt = .1
[./Adaptivity]
refine_fraction = 0.3
max_h_level = 7
cycles_per_step = 2
[../]
[]
[Outputs]
file_base = out_cycles
exodus = true
[]
test/tests/meshgenerators/mixed_dim/1d_2d_w_matl.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = 1d_2d-2.e
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = matp
[../]
[]
[Materials]
[./mat1]
type = MTMaterial
block = '1 2'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 4
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[./bottom]
type = DirichletBC
variable = u
boundary = 100
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = 101
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/break_mesh_by_block_generator/break_mesh_3D_splittrue.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = coh3D_3Blocks.e
#parallel_type = replicated
[]
[./breakmesh]
type = BreakMeshByBlockGenerator
input = fmg
split_interface = true
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/sideset_around_subdomain_generator/around_normals_generator.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = twoblocks.e
[]
[./top_block1]
type = SideSetsAroundSubdomainGenerator
input = fmg
block = 'left'
new_boundary = 'top_of_left_block'
normal = '0 0 1'
[]
[./bottom_block2]
type = SideSetsAroundSubdomainGenerator
input = top_block1
block = 'right'
new_boundary = 'bottom_of_right_block'
normal = '0 0 -1'
[]
[./right_block1]
type = SideSetsAroundSubdomainGenerator
input = bottom_block2
block = 'left'
new_boundary = 'right_of_left_block'
normal = '1 0 0'
[]
[./right_block2]
type = SideSetsAroundSubdomainGenerator
input = right_block1
block = 'right'
new_boundary = 'right_of_right_block'
normal = '1 0 0'
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/sidesets_by_normals_generator/less_simple.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = reactor.e
[]
[./generate_sidesets]
type = AllSideSetsByNormalsGenerator
input = fmg
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/stitched_mesh_generator/stitched_mesh_generator2.i
[MeshGenerators]
[./fmg_left]
type = FileMeshGenerator
file = left.e
[]
[./fmg_center]
type = FileMeshGenerator
file = center.e
[]
[./fmg_right]
type = FileMeshGenerator
file = right.e
[]
[./smg]
type = StitchedMeshGenerator
inputs = 'fmg_left fmg_center fmg_right'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'right left;
right left'
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[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
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/generate_sidesets_by_normals/less_simple.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = reactor.e
[]
[./generate_sidesets]
type = GenerateAllSideSetsByNormals
input = fmg
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/sidesets_from_normals_generator/sidesets_cylinder_normals.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = cylinder.e
#parallel_type = replicated
[]
[./sidesets]
type = SideSetsFromNormalsGenerator
input = fmg
normals = '0 0 1
0 1 0
0 0 -1'
fixed_normal = false
new_boundary = 'top side bottom'
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/gmsh_bcs/gmsh_bcs.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = plate_hole.msh
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 12
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 10
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
test/tests/meshgenerators/break_mesh_by_block_generator/break_mesh_2DJunction_polycrystal.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = poly.msh
#parallel_type = replicated
[]
[./breakmesh]
type = BreakMeshByBlockGenerator
input = fmg
split_interface = true
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/generate_extra_nodeset/generate_extra_nodeset.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = square.e
[]
[./extra_nodeset]
type = ExtraNodesetGenerator
input = fmg
new_boundary = 'middle_node'
nodes = '2'
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
active = 'left right middle'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[./middle]
type = DirichletBC
variable = u
boundary = 'middle_node'
value = -1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
file_base = out
[]
test/tests/meshgenerators/adapt/adapt_time_test_mg.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = square.e
uniform_refine = 3
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'udiff uconv uie vdiff vconv vie'
[./udiff]
type = Diffusion
variable = u
[../]
[./uconv]
type = Convection
variable = u
velocity = '10 1 0'
[../]
[./uie]
type = TimeDerivative
variable = u
[../]
[./vdiff]
type = Diffusion
variable = v
[../]
[./vconv]
type = Convection
variable = v
velocity = '-10 1 0'
[../]
[./vie]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
active = 'uleft uright vleft vright'
[./uleft]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./uright]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[./vleft]
type = DirichletBC
variable = v
boundary = 1
value = 1
[../]
[./vright]
type = DirichletBC
variable = v
boundary = 2
value = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 7
dt = 0.1
[./Adaptivity]
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
start_time = 0.2
stop_time = 0.4
[../]
[]
[Outputs]
file_base = out_time
exodus = true
print_mesh_changed_info = true
[]
test/tests/meshgenerators/sideset_around_subdomain_generator/around.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = twoblocks.e
[]
[./block_1]
type = SideSetsAroundSubdomainGenerator
input = fmg
block = 'left'
new_boundary = 'hull_1'
[]
[./block_2]
type = SideSetsAroundSubdomainGenerator
input = block_1
block = 'right'
new_boundary = 'hull_2'
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/stitched_mesh_generator/stitched_mesh_generator.i
[MeshGenerators]
[./fmg_left]
type = FileMeshGenerator
file = left.e
[]
[./fmg_center]
type = FileMeshGenerator
file = center.e
[]
[./fmg_right]
type = FileMeshGenerator
file = right.e
[]
[./smg]
type = StitchedMeshGenerator
inputs = 'fmg_left fmg_center fmg_right'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'right left;
right left'
parallel_type = 'replicated'
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/extra_nodeset_generator/generate_extra_nodeset.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = square.e
[]
[./extra_nodeset]
type = ExtraNodesetGenerator
input = fmg
new_boundary = 'middle_node'
nodes = '2'
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Outputs]
exodus = true
[]
test/tests/meshgenerators/mesh_extruder_generator/extrude_remap_layer2.i
[MeshGenerators]
[./fmg]
type = FileMeshGenerator
file = multiblock.e
[]
[./extrude]
type = MeshExtruderGenerator
input = fmg
num_layers = 6
extrusion_vector = '0 0 2'
bottom_sideset = 'new_bottom'
top_sideset = 'new_top'
# Remap layers
existing_subdomains = '1 2 5'
layers = '1 3 5'
new_ids = '10 12 15' # Repeat this remapping for each layer
[]
[]
[Mesh]
type = MeshGeneratorMesh
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = 'new_bottom'
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = 'new_top'
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]