35 "Dimension of the cylinder. 0 for a point (not implemented), " 36 "1 for an (axial) 1D line, 2 for a 2D-RZ cylinder, and 3 for " 37 "a 3D cylinder (not implemented)");
41 params.
addRequiredParam<
unsigned int>(
"n_axial",
"Number of axial elements of the cylinder");
42 params.
addParam<
unsigned int>(
"n_radial",
"Number of radial elements of the cylinder");
43 params.
addParam<
unsigned int>(
"n_azimuthal",
"Number of azimuthal elements of the cylinder");
45 params.
addParam<SubdomainName>(
"block",
"Block name for the cylinder");
57 _radius(getParam<
Real>(
"radius")),
58 _height(getParam<
Real>(
"length"))
69 paramError(
"dimension",
"0D cylinder not implemented");
74 params.
set<
Real>(
"xmax") = {getParam<Real>(
"length")};
75 params.
set<
unsigned int>(
"nx") = {getParam<unsigned int>(
"n_axial")};
76 params.
set<std::string>(
"boundary_name_prefix") =
name();
79 params.
set<
Real>(
"ymax") = {getParam<Real>(
"radius")};
81 paramError(
"n_radial",
"Should be provided for a 2D cylinder");
82 params.
set<
unsigned int>(
"ny") = {getParam<unsigned int>(
"n_radial")};
85 paramError(
"n_radial",
"Should not be provided for a 1D cylinder");
88 const auto block_name = getParam<SubdomainName>(
"block");
89 params.
set<SubdomainName>(
"subdomain_name") = block_name;
93 "GeneratedMeshGenerator",
name() +
"_base", params);
98 paramError(
"dimension",
"3D cylinder is not implemented");
100 paramError(
"n_radial",
"Should be provided for a 3D cylinder");
102 paramError(
"n_azimuthal",
"Should be provided in 3D");
static InputParameters validParams()
static InputParameters validParams()
virtual void setupComponent() override
ActionWarehouse & _awh
Reference to ActionWarehouse where we store object build by actions.
Cylinder on which one can define a Physics.
const std::shared_ptr< MooseMesh > & getMesh() const
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
std::vector< MeshGeneratorName > _mg_names
Name(s) of the final mesh generator(s) creating the mesh for the component.
unsigned int _dimension
Maximum dimension of the component.
Base class for components that are defined using an action.
virtual const std::string & name() const
Get the name of the class.
static InputParameters validParams()
void addMeshGenerator(const std::string &type, const std::string &name, const InputParameters ¶ms)
Add a mesh generator that will act on the meshes in the system.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Factory & _factory
The Factory associated with the MooseApp.
virtual void checkIntegrity() override
Used for various checks notably:
static InputParameters validParams()
virtual void addMeshGenerators() override
Helper class to help creating an entire physics Note: Trying out virtual inheritance.
CylinderComponent(const InputParameters ¶ms)
std::vector< SubdomainName > _blocks
Names of the blocks the component is comprised of.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Helper class to help Components define the material properties the Physics may need from the paramete...
MooseApp & _app
The MOOSE application this is associated with.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
void addRequiredTask(const std::string &task)
Add a new required task for all physics deriving from this class NOTE: This does not register the tas...
virtual void checkIntegrity() override
Used for various checks notably:
static InputParameters validParams()
Helper class to help Components accept boundary condition parameters that the Physics may use to gene...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void checkIntegrity() override
Used for various checks notably:
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...
MeshGeneratorSystem & getMeshGeneratorSystem()
Gets the system that manages the MeshGenerators.
Helper class to help Components define the initial conditions the Physics may need from the parameter...
static InputParameters validParams()
registerMooseAction("MooseApp", CylinderComponent, "add_mesh_generator")
registerActionComponent("MooseApp", CylinderComponent)