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" },
58 { eulerOrder::XYZ,
"rollPitchYaw" },
59 { eulerOrder::ZYX,
"yawPitchRoll" },
76 buf <<
'(' << q.
w() <<
',' << q.
v() <<
')';
107 for (label i=1; i<qs.
size(); i++)
110 if ((qa & qs[i]) > 0)
126 const scalar magV =
mag(q.
v());
133 const scalar expW =
exp(q.
w());
138 expW*
sin(magV)*q.
v()/magV
145 const scalar magQ =
mag(q);
146 const scalar magV =
mag(q.
v());
150 if (magV != 0 && magQ != 0)
153 powq *= power*
acos(q.
w()/magQ);
156 return pow(magQ, power)*
exp(powq);
162 const scalar magQ =
mag(q);
163 const scalar magV =
mag(q.
v());
167 if (magV != 0 && magQ != 0)
170 powq *= power*
acos(q.
w()/magQ);
173 return pow(magQ, power)*
exp(powq);
182 is >> q.
w() >> q.
v();
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
Input/output from string buffers.
Foam::string str() const
Get the string - as Foam::string rather than std::string.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
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)....
bool readEnd(const char *funcName)
End read of data chunk, ends with ')'.
bool readBegin(const char *funcName)
Begin read of data chunk, starts with '('.
Output to string buffer, using a OSstream. Always UNCOMPRESSED.
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...
void size(const label n)
Older name for setAddressableSize.
Quaternion class used to perform rotations in 3D space.
const vector & v() const noexcept
Vector part of the quaternion ( = axis of rotation)
scalar w() const noexcept
Scalar part of the quaternion ( = cos(theta/2) for rotation)
quaternion()=default
Default construct.
static const Enum< eulerOrder > eulerOrderNames
static const quaternion I
static const quaternion zero
@ BEGIN_LIST
Begin list [isseparator].
@ END_LIST
End list [isseparator].
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedScalar sign(const dimensionedScalar &ds)
dimensionedScalar sin(const dimensionedScalar &ds)
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Istream & operator>>(Istream &, directionInfo &)
static constexpr const zero Zero
Global zero (0)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
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)