GeneratedMesh

Create a line, square, or cube mesh with uniformly spaced or biased elements.

Description

The GeneratedMesh object is the built-in mesh generation capable of creating lines, rectangles, and rectangular prisms ("boxes"). The mesh automatically creates side sets that are logically named and numbered as follows:

  • In 1D, left = 0, right = 1

  • In 2D, bottom = 0, right = 1, top = 2, left = 3

  • In 3D, back = 0, bottom = 1, right = 2, top = 3, left = 4, front = 5

The length, width, and height of the domain, as well as the number of elements in each direction can be specified independently.

Example Syntax

[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
  ny = 10
[]
(test/tests/kernels/simple_diffusion/simple_diffusion.i)

Input Parameters

  • bias_x1The amount by which to grow (or shrink) the cells in the x-direction.

    Default:1

    C++ Type:double

    Options:

    Description:The amount by which to grow (or shrink) the cells in the x-direction.

  • bias_z1The amount by which to grow (or shrink) the cells in the z-direction.

    Default:1

    C++ Type:double

    Options:

    Description:The amount by which to grow (or shrink) the cells in the z-direction.

  • zmax1Upper Z Coordinate of the generated mesh

    Default:1

    C++ Type:double

    Options:

    Description:Upper Z Coordinate of the generated mesh

  • ymax1Upper Y Coordinate of the generated mesh

    Default:1

    C++ Type:double

    Options:

    Description:Upper Y Coordinate of the generated mesh

  • bias_y1The amount by which to grow (or shrink) the cells in the y-direction.

    Default:1

    C++ Type:double

    Options:

    Description:The amount by which to grow (or shrink) the cells in the y-direction.

  • zmin0Lower Z Coordinate of the generated mesh

    Default:0

    C++ Type:double

    Options:

    Description:Lower Z Coordinate of the generated mesh

  • ghosting_patch_sizeThe number of nearest neighbors considered for ghosting purposes when 'iteration' patch update strategy is used. Default is 5 * patch_size.

    C++ Type:unsigned int

    Options:

    Description:The number of nearest neighbors considered for ghosting purposes when 'iteration' patch update strategy is used. Default is 5 * patch_size.

  • nz1Number of elements in the Z direction

    Default:1

    C++ Type:unsigned int

    Options:

    Description:Number of elements in the Z direction

  • nx1Number of elements in the X direction

    Default:1

    C++ Type:unsigned int

    Options:

    Description:Number of elements in the X direction

  • ny1Number of elements in the Y direction

    Default:1

    C++ Type:unsigned int

    Options:

    Description:Number of elements in the Y direction

  • gauss_lobatto_gridFalseGrade mesh into boundaries according to Gauss-Lobatto quadrature spacing.

    Default:False

    C++ Type:bool

    Options:

    Description:Grade mesh into boundaries according to Gauss-Lobatto quadrature spacing.

  • parallel_typeDEFAULTDISTRIBUTED: Always use libMesh::DistributedMesh REPLICATED: Always use libMesh::ReplicatedMesh DEFAULT: Use libMesh::ReplicatedMesh unless --distributed-mesh is specified on the command line

    Default:DEFAULT

    C++ Type:MooseEnum

    Options:DISTRIBUTED REPLICATED DEFAULT

    Description:DISTRIBUTED: Always use libMesh::DistributedMesh REPLICATED: Always use libMesh::ReplicatedMesh DEFAULT: Use libMesh::ReplicatedMesh unless --distributed-mesh is specified on the command line

  • xmax1Upper X Coordinate of the generated mesh

    Default:1

    C++ Type:double

    Options:

    Description:Upper X Coordinate of the generated mesh

  • allow_renumberingTrueIf allow_renumbering=false, node and element numbers are kept fixed until deletion

    Default:True

    C++ Type:bool

    Options:

    Description:If allow_renumbering=false, node and element numbers are kept fixed until deletion

  • xmin0Lower X Coordinate of the generated mesh

    Default:0

    C++ Type:double

    Options:

    Description:Lower X Coordinate of the generated mesh

  • ymin0Lower Y Coordinate of the generated mesh

    Default:0

    C++ Type:double

    Options:

    Description:Lower Y Coordinate of the generated mesh

  • max_leaf_size10The maximum number of points in each leaf of the KDTree used in the nearest neighbor search. As the leaf size becomes larger,KDTree construction becomes faster but the nearest neighbor searchbecomes slower.

    Default:10

    C++ Type:unsigned int

    Options:

    Description:The maximum number of points in each leaf of the KDTree used in the nearest neighbor search. As the leaf size becomes larger,KDTree construction becomes faster but the nearest neighbor searchbecomes slower.

  • elem_typeThe type of element from libMesh to generate (default: linear element for requested dimension)

    C++ Type:MooseEnum

    Options:EDGE EDGE2 EDGE3 EDGE4 QUAD QUAD4 QUAD8 QUAD9 TRI3 TRI6 HEX HEX8 HEX20 HEX27 TET4 TET10 PRISM6 PRISM15 PRISM18 PYRAMID5 PYRAMID13 PYRAMID14

    Description:The type of element from libMesh to generate (default: linear element for requested dimension)

Optional Parameters

  • partitionerdefaultSpecifies a mesh partitioner to use when splitting the mesh for a parallel computation.

    Default:default

    C++ Type:MooseEnum

    Options:default metis parmetis linear centroid hilbert_sfc morton_sfc

    Description:Specifies a mesh partitioner to use when splitting the mesh for a parallel computation.

  • centroid_partitioner_directionSpecifies the sort direction if using the centroid partitioner. Available options: x, y, z, radial

    C++ Type:MooseEnum

    Options:x y z radial

    Description:Specifies the sort direction if using the centroid partitioner. Available options: x, y, z, radial

Partitioning Parameters

  • nemesisFalseIf nemesis=true and file=foo.e, actually reads foo.e.N.0, foo.e.N.1, ... foo.e.N.N-1, where N = # CPUs, with NemesisIO.

    Default:False

    C++ Type:bool

    Options:

    Description:If nemesis=true and file=foo.e, actually reads foo.e.N.0, foo.e.N.1, ... foo.e.N.N-1, where N = # CPUs, with NemesisIO.

  • patch_update_strategyneverHow often to update the geometric search 'patch'. The default is to never update it (which is the most efficient but could be a problem with lots of relative motion). 'always' will update the patch for all slave nodes at the beginning of every timestep which might be time consuming. 'auto' will attempt to determine at the start of which timesteps the patch for all slave nodes needs to be updated automatically.'iteration' updates the patch at every nonlinear iteration for a subset of slave nodes for which penetration is not detected. If there can be substantial relative motion between the master and slave surfaces during the nonlinear iterations within a timestep, it is advisable to use 'iteration' option to ensure accurate contact detection.

    Default:never

    C++ Type:MooseEnum

    Options:never always auto iteration

    Description:How often to update the geometric search 'patch'. The default is to never update it (which is the most efficient but could be a problem with lots of relative motion). 'always' will update the patch for all slave nodes at the beginning of every timestep which might be time consuming. 'auto' will attempt to determine at the start of which timesteps the patch for all slave nodes needs to be updated automatically.'iteration' updates the patch at every nonlinear iteration for a subset of slave nodes for which penetration is not detected. If there can be substantial relative motion between the master and slave surfaces during the nonlinear iterations within a timestep, it is advisable to use 'iteration' option to ensure accurate contact detection.

  • 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.

  • construct_node_list_from_side_listTrueWhether or not to generate nodesets from the sidesets (usually a good idea).

    Default:True

    C++ Type:bool

    Options:

    Description:Whether or not to generate nodesets from the sidesets (usually a good idea).

  • patch_size40The number of nodes to consider in the NearestNode neighborhood.

    Default:40

    C++ Type:unsigned int

    Options:

    Description:The number of nodes to consider in the NearestNode neighborhood.

Advanced Parameters

  • dimThe dimension of the mesh to be generated

    C++ Type:MooseEnum

    Options:1 2 3

    Description:The dimension of the mesh to be generated

Main Parameters

Input Files