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")),
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 ",
52 for (
unsigned int i = 0; i <
_disp.size(); ++i)
64 auto norms = std::sqrt(dr1.
norm_sq() * dr2.norm_sq());
68 return std::acos((dr1 * dr2) / norms) * ((dr1.
cross(dr2) *
_direction) > 0 ? 1.0 : -1.0);
std::vector< const VariableValue * > _disp
displacement variables
Compute the field of angular rotations of points around an axis defined by an origin point and a dire...
auto norm() const -> decltype(std::norm(Real()))
const Point _origin
origin point to determine the angle w.r.t.
static constexpr Real TOLERANCE
static InputParameters validParams()
const Node *const & _current_node
int delta(unsigned int i, unsigned int j)
Delta function, which returns zero if $i j$ and unity if $i=j$.
registerMooseObject("SolidMechanicsApp", RotationAngle)
auto norm_sq() const -> decltype(std::norm(Real()))
void paramError(const std::string ¶m, Args... args) const
TypeVector< typename CompareTypes< Real, T2 >::supertype > cross(const TypeVector< T2 > &v) const
RealVectorValue _direction
compute angles in the plane defined by this vector
RotationAngle(const InputParameters ¶meters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real computeValue() override
static InputParameters validParams()