Go to the documentation of this file.
72 inline static vector twoAxes
82 inline static vector threeAxes
124 static constexpr
const char*
const typeName =
"quaternion";
158 const scalar cosTheta,
189 inline scalar
w()
const;
192 inline const vector&
v()
const;
void normalize()
Normalize the quaternion by its magnitude.
void operator+=(const quaternion &q)
const vector & v() const
Vector part of the quaternion ( = axis of rotation)
A class for handling words, derived from Foam::string.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
tmp< GeometricField< Type, fvPatchField, volMesh > > operator&(const fvMatrix< Type > &, const DimensionedField< Type, volMesh > &)
quaternion slerp(const quaternion &qa, const quaternion &qb, const scalar t)
Spherical linear interpolation of quaternions.
quaternion & operator=(const quaternion &)=default
Copy assignment.
void operator/=(const quaternion &q)
static constexpr const char *const typeName
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
quaternion normalized() const
Return the quaternion normalized by its magnitude.
void operator-=(const quaternion &q)
static const quaternion I
Istream & operator>>(Istream &, directionInfo &)
vector eulerAngles(const eulerOrder order) const
dimensionedScalar exp(const dimensionedScalar &ds)
scalar w() const
Scalar part of the quaternion ( = cos(theta/2) for rotation)
quaternion()=default
Default construct.
Quaternion class used to perform rotations in 3D space.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
bool operator!=(const eddy &a, const eddy &b)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
static constexpr direction rank
Rank of quaternion is 1.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
eulerOrder
Euler-angle rotation order.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
OBJstream os(runTime.globalPath()/outputName)
static quaternion unit(const vector &v)
const dimensionedScalar c2
Second radiation constant: default SI units: [m.K].
A template class to specify if a data type is composed solely of Foam::scalar elements.
dimensionedScalar operator/(const scalar s1, const dimensionedScalar &ds2)
static const Enum< eulerOrder > eulerOrderNames
The names for Euler-angle rotation order.
void operator*=(const quaternion &q)
tmp< faMatrix< Type > > operator+(const faMatrix< Type > &, const faMatrix< Type > &)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
tmp< faMatrix< Type > > operator*(const areaScalarField &, const faMatrix< Type > &)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
scalar magType
Magnitude type.
scalar cmptType
Component type.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
vector invTransform(const vector &v) const
Rotate the given vector anti-clockwise.
tensor R() const
The rotation tensor corresponding to the quaternion.
static const quaternion zero
quaternion conjugate(const quaternion &q)
Return the conjugate of the given quaternion.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
tensor rotationTensor(const vector &n1, const vector &n2)
Rotational transformation tensor from vector n1 to n2.
quaternion normalize(const quaternion &q)
Return the normalized (unit) quaternion of the given quaternion.
vector transform(const vector &v) const
Rotate the given vector.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
A template class to specify that a data type can be considered as being contiguous in memory.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...