Go to the documentation of this file.
42 { eulerOrder::XZX,
"xzx" },
43 { eulerOrder::XYX,
"xyx" },
44 { eulerOrder::YXY,
"yxy" },
45 { eulerOrder::YZY,
"yzy" },
46 { eulerOrder::ZYZ,
"zyz" },
47 { eulerOrder::ZXZ,
"zxz" },
50 { eulerOrder::XZY,
"xzy" },
51 { eulerOrder::XYZ,
"xyz" },
52 { eulerOrder::YXZ,
"yxz" },
53 { eulerOrder::YZX,
"yzx" },
54 { eulerOrder::ZYX,
"zyx" },
55 { eulerOrder::ZXY,
"zxy" },
72 buf <<
'(' << q.
w() <<
',' << q.
v() <<
')';
103 for (label i=1; i<qs.size(); i++)
106 if ((qa & qs[i]) > 0)
122 const scalar magV =
mag(q.
v());
129 const scalar expW =
exp(q.
w());
134 expW*
sin(magV)*q.
v()/magV
141 const scalar magQ =
mag(q);
142 const scalar magV =
mag(q.
v());
146 if (magV != 0 && magQ != 0)
149 powq *= power*
acos(q.
w()/magQ);
152 return pow(magQ, power)*
exp(powq);
158 const scalar magQ =
mag(q);
159 const scalar magV =
mag(q.
v());
163 if (magV != 0 && magQ != 0)
166 powq *= power*
acos(q.
w()/magQ);
169 return pow(magQ, power)*
exp(powq);
178 is >> q.
w() >> q.
v();
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
const vector & v() const
Vector part of the quaternion ( = axis of rotation)
A class for handling words, derived from Foam::string.
static constexpr const zero Zero
Global zero (0)
quaternion slerp(const quaternion &qa, const quaternion &qb, const scalar t)
Spherical linear interpolation of quaternions.
dimensionedScalar sin(const dimensionedScalar &ds)
Input/output from string buffers.
static const quaternion I
Istream & operator>>(Istream &, directionInfo &)
dimensionedScalar exp(const dimensionedScalar &ds)
bool readEnd(const char *funcName)
End read of data chunk, ends with ')'.
scalar w() const
Scalar part of the quaternion ( = cos(theta/2) for rotation)
dimensionedScalar sign(const dimensionedScalar &ds)
quaternion()=default
Default construct.
Quaternion class used to perform rotations in 3D space.
bool readBegin(const char *funcName)
Begin read of data chunk, starts with '('.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
word name(const complex &c)
Return string representation of complex.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Vector< scalar > vector
A scalar version of the templated Vector.
Foam::string str() const
Get the string - as Foam::string rather than std::string.
static const Enum< eulerOrder > eulerOrderNames
The names for Euler-angle rotation order.
Output to string buffer, using a OSstream.
dimensionedScalar acos(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
static const quaternion zero
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Begin list [isseparator].
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
dimensionedScalar cos(const dimensionedScalar &ds)