20 params.
addClassDescription(
"Compute the field of angular rotations of points around an axis "
21 "defined by an origin point and a direction vector");
23 params.
set<
bool>(
"use_displaced_mesh") =
false;
29 _origin(getParam<Point>(
"origin")),
30 _direction(getParam<RealVectorValue>(
"direction")),
31 _disp(coupledValues(
"displacements"))
37 if (getParam<bool>(
"use_displaced_mesh"))
38 paramError(
"use_displaced_mesh",
"This AuxKernel must be run on the undisplaced mesh");
40 paramError(
"variable",
"This AuxKernel must operate on a nodal variable");
41 if (
_disp.size() > LIBMESH_DIM)
43 "Too many displacement variables were specified. The max is LIBMESH_DIM, which is ",
51 RealVectorValue delta;
52 for (
unsigned int i = 0; i <
_disp.size(); ++i)
57 RealVectorValue dr2 = dr1 + delta;
64 auto norms = std::sqrt(dr1.norm_sq() * dr2.norm_sq());
68 return std::atan2(dr1.cross(dr2) *
_direction, dr1 * dr2);
registerMooseObject("SolidMechanicsApp", RotationAngle)
const Node *const & _current_node
static InputParameters validParams()
void paramError(const std::string ¶m, Args... args) const
Compute the field of angular rotations of points around an axis defined by an origin point and a dire...
static InputParameters validParams()
std::vector< const VariableValue * > _disp
displacement variables
RealVectorValue _direction
compute angles in the plane defined by this vector
Real computeValue() override
const Point _origin
origin point to determine the angle w.r.t.
RotationAngle(const InputParameters ¶meters)
static constexpr Real TOLERANCE