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"))
41 std::unique_ptr<MeshBase>
54 MeshTools::Generation::build_sphere(
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
static InputParameters validParams()
registerMooseObject("MooseApp", SphereMeshGenerator)
const unsigned int & _n_smooth
number of smoothing operations
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
static InputParameters validParams()
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
const unsigned int & _nr
number of radial elements
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MooseEnum _elem_type
element type
SphereMeshGenerator(const InputParameters ¶meters)
Create a sphere volume mesh.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
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...
MeshGenerators are objects that can modify or add to an existing mesh.
void ErrorVector unsigned int
static MooseEnum elemTypes()
returns MooseMesh element type options
const Real & _radius
sphere radius