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

Go to the source code of this file.

Classes

class  GeneratedMesh
 Mesh generated from parameters. More...
 

Functions

template<>
InputParameters validParams< GeneratedMesh > ()
 

Function Documentation

Definition at line 28 of file GeneratedMesh.C.

Referenced by validParams< ImageMesh >().

29 {
31 
32  MooseEnum elem_types(
33  "EDGE EDGE2 EDGE3 EDGE4 QUAD QUAD4 QUAD8 QUAD9 TRI3 TRI6 HEX HEX8 HEX20 HEX27 TET4 TET10 "
34  "PRISM6 PRISM15 PRISM18 PYRAMID5 PYRAMID13 PYRAMID14"); // no default
35 
36  MooseEnum dims("1=1 2 3");
38  "dim", dims, "The dimension of the mesh to be generated"); // Make this parameter required
39 
40  params.addParam<unsigned int>("nx", 1, "Number of elements in the X direction");
41  params.addParam<unsigned int>("ny", 1, "Number of elements in the Y direction");
42  params.addParam<unsigned int>("nz", 1, "Number of elements in the Z direction");
43  params.addParam<Real>("xmin", 0.0, "Lower X Coordinate of the generated mesh");
44  params.addParam<Real>("ymin", 0.0, "Lower Y Coordinate of the generated mesh");
45  params.addParam<Real>("zmin", 0.0, "Lower Z Coordinate of the generated mesh");
46  params.addParam<Real>("xmax", 1.0, "Upper X Coordinate of the generated mesh");
47  params.addParam<Real>("ymax", 1.0, "Upper Y Coordinate of the generated mesh");
48  params.addParam<Real>("zmax", 1.0, "Upper Z Coordinate of the generated mesh");
49  params.addParam<MooseEnum>("elem_type",
50  elem_types,
51  "The type of element from libMesh to "
52  "generate (default: linear element for "
53  "requested dimension)");
54  params.addParam<bool>(
55  "gauss_lobatto_grid",
56  false,
57  "Grade mesh into boundaries according to Gauss-Lobatto quadrature spacing.");
58  params.addRangeCheckedParam<Real>(
59  "bias_x",
60  1.,
61  "bias_x>=0.5 & bias_x<=2",
62  "The amount by which to grow (or shrink) the cells in the x-direction.");
63  params.addRangeCheckedParam<Real>(
64  "bias_y",
65  1.,
66  "bias_y>=0.5 & bias_y<=2",
67  "The amount by which to grow (or shrink) the cells in the y-direction.");
68  params.addRangeCheckedParam<Real>(
69  "bias_z",
70  1.,
71  "bias_z>=0.5 & bias_z<=2",
72  "The amount by which to grow (or shrink) the cells in the z-direction.");
73 
74  params.addParamNamesToGroup("dim", "Main");
75 
76  params.addClassDescription(
77  "Create a line, square, or cube mesh with uniformly spaced or biased elements.");
78  return params;
79 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
InputParameters validParams< MooseMesh >()
Definition: MooseMesh.C:65
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:37
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
This method takes a space delimited list of parameter names and adds them to the specified group name...