21 params.addParam<RealVectorValue>(
23 "Rotation angles (XZX convention, in degrees NOT radians) to rotate the "
24 "mesh of this component with. Note that this rotation "
25 "is applied before the translation.");
26 params.addParam<RealVectorValue>(
28 "Direction to orient the component mesh with, assuming it is initially oriented along the "
29 "X-axis (1, 0, 0). Note that this rotation is applied before the translation. Note that "
30 "specifying the direction is an alternative to specifying the 'rotation'");
32 params.addParam<Point>(
33 "position", Point(0., 0., 0.),
"Vector to translate the mesh of this component by.");
35 params.addParamNamesToGroup(
"rotation direction position",
36 "Position and orientation of the component");
42 _rotation(queryParam<RealVectorValue>(
"rotation")),
43 _direction(queryParam<RealVectorValue>(
"direction")),
44 _translation(getParam<Point>(
"position"))
57 params.
set<MeshGeneratorName>(
"input") =
_mg_names.back();
62 params.
set<RealVectorValue>(
"vector_value") = *
_rotation;
66 params.
set<
MooseEnum>(
"transform") =
"ROTATE_WITH_MATRIX";
68 RealVectorValue angles;
69 const auto rotation_matrix =
70 RotationMatrix::rodriguesRotationMatrix<false>(RealVectorValue(1, 0, 0), *
_direction);
71 params.
set<RealTensorValue>(
"rotation_matrix") = rotation_matrix;
74 "TransformGenerator",
name() +
"_rotated", params);
81 params.
set<MeshGeneratorName>(
"input") =
_mg_names.back();
83 params.
set<RealVectorValue>(
"vector_value") = getParam<Point>(
"position");
85 "TransformGenerator",
name() +
"_translated", params);
Base class for components that are defined using an action.
std::vector< MeshGeneratorName > _mg_names
Name(s) of the final mesh generator(s) creating the mesh for the component.
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...
static InputParameters validParams()
void setCurrentTopLevelMeshGeneratorName(const MeshGeneratorName &mg_name)
Set the name of the final mesh generator that contains this component.
MooseApp & _app
The MOOSE application this is associated with.
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
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.
MeshGeneratorSystem & getMeshGeneratorSystem()
Gets the system that manages the MeshGenerators.
const std::string & name() const
Get the name of the class.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Factory & _factory
The Factory associated with the MooseApp.