13#include "libmesh/mesh_generation.h"
14#include "libmesh/string_to_enum.h"
28 params.
addParam<
unsigned int>(
"n_smooth", 0,
"Number of smoothing operations");
34 _radius(getParam<Real>(
"radius")),
35 _nr(getParam<unsigned
int>(
"nr")),
36 _elem_type(getParam<
MooseEnum>(
"elem_type")),
37 _n_smooth(getParam<unsigned
int>(
"n_smooth"))
41std::unique_ptr<MeshBase>
52 ElemType et = Utility::string_to_enum<ElemType>(
_elem_type);
54 MeshTools::Generation::build_sphere(
57 return dynamic_pointer_cast<MeshBase>(
mesh);
registerMooseObject("MooseApp", SphereMeshGenerator)
void ErrorVector unsigned int
MeshGenerators are objects that can modify or add to an existing mesh.
static InputParameters validParams()
std::unique_ptr< MeshBase > buildMeshBaseObject(unsigned int dim=libMesh::invalid_uint)
Build a MeshBase object whose underlying type will be determined by the Mesh input file block.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
static MooseEnum elemTypes()
returns MooseMesh element type options
Create a sphere volume mesh.
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
const unsigned int & _n_smooth
number of smoothing operations
const Real & _radius
sphere radius
SphereMeshGenerator(const InputParameters ¶meters)
MooseEnum _elem_type
element type
static InputParameters validParams()
const unsigned int & _nr
number of radial elements