- dimSpatial dimension of the mesh (1, 2, or 3).
C++ Type:MooseEnum
Controllable:No
Description:Spatial dimension of the mesh (1, 2, or 3).
MFEMGeneratedMeshGenerator
Overview
MFEMGeneratedMeshGenerator generates a structured Cartesian MFEM mesh for use in an MFEMProblem. It produces a line (1D), rectangle (2D), or box (3D) with uniformly spaced elements, and is the MFEM analog of GeneratedMeshGenerator.
The "dim" parameter is required and selects the spatial dimension. EDGE is the only element type for 1D meshes. Element type defaults to QUAD for 2D and HEX for 3D; TRI and TET are also supported via "elem_type".
Named boundary sets are assigned automatically so boundaries can be referenced by name in [BCs] blocks:
| Dimension | Boundary names (ID) |
|---|---|
| 1D | left (1), right (2) |
| 2D | bottom (1), right (2), top (3), left (4) |
| 3D | bottom (1), front (2), right (3), back (4), left (5), top (6) |
Example Input File Syntax
[Mesh<<<{"href": "../../../syntax/Mesh/index.html"}>>>]
[gen]
type = MFEMGeneratedMeshGenerator<<<{"description": "Generates a structured Cartesian MFEM mesh (line, rectangle, or box) with uniformly spaced elements.", "href": "MFEMGeneratedMeshGenerator.html"}>>>
dim<<<{"description": "Spatial dimension of the mesh (1, 2, or 3)."}>>> = 1
nx<<<{"description": "Number of elements in the x direction."}>>> = 5
[]
[]
[BCs<<<{"href": "../../../syntax/BCs/index.html"}>>>]
[left]
type = MFEMScalarDirichletBC<<<{"description": "Applies a Dirichlet condition to a scalar variable.", "href": "../bcs/MFEMScalarDirichletBC.html"}>>>
variable<<<{"description": "Variable on which to apply the boundary condition"}>>> = u
boundary<<<{"description": "The list of boundaries (ids or names) from the mesh where this object applies. Defaults to all boundaries."}>>> = 'left'
coefficient<<<{"description": "The coefficient setting the values on the essential boundary. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = 0
[]
[right]
type = MFEMScalarDirichletBC<<<{"description": "Applies a Dirichlet condition to a scalar variable.", "href": "../bcs/MFEMScalarDirichletBC.html"}>>>
variable<<<{"description": "Variable on which to apply the boundary condition"}>>> = u
boundary<<<{"description": "The list of boundaries (ids or names) from the mesh where this object applies. Defaults to all boundaries."}>>> = 'right'
coefficient<<<{"description": "The coefficient setting the values on the essential boundary. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = 1
[]
[](test/tests/mfem/meshgenerators/generated/test.i)Input Parameters
- elem_typeElement type. Use EDGE for 1D meshes, TRI or QUAD for 2D meshes, TET or HEX for 3D meshes. If not specified, defaults to EDGE for 1D, QUAD for 2D, and HEX for 3D.
C++ Type:MooseEnum
Controllable:No
Description:Element type. Use EDGE for 1D meshes, TRI or QUAD for 2D meshes, TET or HEX for 3D meshes. If not specified, defaults to EDGE for 1D, QUAD for 2D, and HEX for 3D.
- nx1Number of elements in the x direction.
Default:1
C++ Type:unsigned int
Controllable:No
Description:Number of elements in the x direction.
- ny1Number of elements in the y direction.
Default:1
C++ Type:unsigned int
Controllable:No
Description:Number of elements in the y direction.
- nz1Number of elements in the z direction.
Default:1
C++ Type:unsigned int
Controllable:No
Description:Number of elements in the z direction.
- xmax1Upper bound of the domain in the x direction.
Default:1
C++ Type:Real
Unit:(no unit assumed)
Controllable:No
Description:Upper bound of the domain in the x direction.
- ymax1Upper bound of the domain in the y direction.
Default:1
C++ Type:Real
Unit:(no unit assumed)
Controllable:No
Description:Upper bound of the domain in the y direction.
- zmax1Upper bound of the domain in the z direction.
Default:1
C++ Type:Real
Unit:(no unit assumed)
Controllable:No
Description:Upper bound of the domain in the z direction.
Optional Parameters
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
- save_with_nameKeep the mesh from this mesh generator in memory with the name specified
C++ Type:std::string
Controllable:No
Description:Keep the mesh from this mesh generator in memory with the name specified
Advanced Parameters
- nemesisFalseWhether or not to output the mesh file in the nemesisformat (only if output = true)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file in the nemesisformat (only if output = true)
- outputFalseWhether or not to output the mesh file after generating the mesh
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file after generating the mesh
- 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)