10 #include "libmesh/ignore_warnings.h" 23 phi1 = std::atan2((q.x() * q.z() + q.w() * q.y()), -(-q.w() * q.x() + q.y() * q.z())) *
27 auto val = 1.0 -
std::pow(q.w() * q.w() - q.x() * q.x() - q.y() * q.y() + q.z() * q.z(), 2.0);
28 if (val < 0.0 && !MooseUtils::absoluteFuzzyEqual(val, 0.0))
29 mooseError(
"Euler angle conversion is not successful due to invalid quaternion value.");
31 Phi = std::atan2(std::sqrt(std::abs(val)),
32 q.w() * q.w() - q.x() * q.x() - q.y() * q.y() + q.z() * q.z()) *
34 phi2 = std::atan2((q.x() * q.z() - q.w() * q.y()), (q.w() * q.x() + q.y() * q.z())) *
54 Eigen::Quaternion<Real>
57 Eigen::Quaternion<Real> q;
59 Real cPhi1PlusPhi2, cphi, cPhi1MinusPhi2;
60 Real sPhi1PlusPhi2, sphi, sPhi1MinusPhi2;
75 q.w() = cphi * cPhi1PlusPhi2;
76 q.x() = sphi * cPhi1MinusPhi2;
77 q.y() = sphi * sPhi1MinusPhi2;
78 q.z() = cphi * sPhi1PlusPhi2;
98 #include "libmesh/restore_warnings.h"
void mooseError(Args &&... args)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MooseUnits pow(const MooseUnits &, int)
Eigen::Quaternion< Real > toQuaternion()