49 buf <<
'(' << q.
w() <<
',' << q.
v() <<
')';
99 const scalar magV =
mag(q.
v());
106 const scalar expW =
exp(q.
w());
111 expW*
sin(magV)*q.
v()/magV
118 const scalar magQ =
mag(q);
119 const scalar magV =
mag(q.
v());
123 if (magV != 0 && magQ != 0)
126 powq *= power*
acos(q.
w()/magQ);
129 return pow(magQ, power)*
exp(powq);
135 const scalar magQ =
mag(q);
136 const scalar magV =
mag(q.
v());
140 if (magV != 0 && magQ != 0)
143 powq *= power*
acos(q.
w()/magQ);
146 return pow(magQ, power)*
exp(powq);
157 is >> q.
w() >> q.
v();
163 is.
check(
"operator>>(Istream&, quaternion&)");
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Istream & readEnd(const char *funcName)
Istream & readBegin(const char *funcName)
Output to memory buffer stream.
string str() const
Return the string.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label size() const
Return the number of elements in the UList.
Quaternion class used to perform rotations in 3D space.
const vector & v() const
Vector part of the quaternion ( = axis of rotation)
quaternion()
Construct null.
scalar w() const
Scalar part of the quaternion ( = cos(theta/2) for rotation)
static const quaternion I
static const quaternion zero
static const char *const typeName
A class for handling words, derived from string.
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedScalar sign(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const bool)
Return a word representation of a bool.
dimensionedScalar sin(const dimensionedScalar &ds)
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Vector< scalar > vector
A scalar version of the templated Vector.
Istream & operator>>(Istream &, pistonPointEdgeData &)
dimensioned< scalar > mag(const dimensioned< Type > &)
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
quaternion slerp(const quaternion &qa, const quaternion &qb, const scalar t)
Spherical linear interpolation of quaternions.
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar acos(const dimensionedScalar &ds)