www.mooseframework.org
Classes | Functions
PETScDMDAMesh.h File Reference

Go to the source code of this file.

Classes

class  PETScDMDAMesh
 Generate a parallel (distributed) mesh from PETSc DMDA. More...
 

Functions

template<>
InputParameters validParams< PETScDMDAMesh > ()
 

Function Documentation

◆ validParams< PETScDMDAMesh >()

template<>
InputParameters validParams< PETScDMDAMesh > ( )

Definition at line 36 of file PETScDMDAMesh.C.

37 {
38  InputParameters params = validParams<MooseMesh>();
39 
40  MooseEnum elem_types("EDGE2 QUAD4 HEX8"); // no default
41 
42  MooseEnum dims("1=1 2 3", "2");
43  params.addRequiredParam<MooseEnum>(
44  "dim", dims, "The dimension of the mesh to be generated"); // Make this parameter required
45 
46  params.addParam<dof_id_type>("nx", 11, "Number of elements in the X direction");
47  params.addParam<dof_id_type>("ny", 11, "Number of elements in the Y direction");
48  params.addParam<dof_id_type>("nz", 11, "Number of elements in the Z direction");
49  params.addParam<Real>("xmin", 0.0, "Lower X Coordinate of the generated mesh");
50  params.addParam<Real>("ymin", 0.0, "Lower Y Coordinate of the generated mesh");
51  params.addParam<Real>("zmin", 0.0, "Lower Z Coordinate of the generated mesh");
52  params.addParam<Real>("xmax", 1.0, "Upper X Coordinate of the generated mesh");
53  params.addParam<Real>("ymax", 1.0, "Upper Y Coordinate of the generated mesh");
54  params.addParam<Real>("zmax", 1.0, "Upper Z Coordinate of the generated mesh");
55  params.addParam<MooseEnum>("elem_type",
56  elem_types,
57  "The type of element from libMesh to "
58  "generate (default: linear element for "
59  "requested dimension)");
60 
61  params.addParamNamesToGroup("dim", "Main");
62 
63  params.addClassDescription(
64  "Create a line, square, or cube mesh with uniformly spaced memsh using PETSc DMDA.");
65 
66  // This mesh is always distributed
67  params.set<MooseEnum>("parallel_type") = "DISTRIBUTED";
68 
69  return params;
70 }