50 inline Foam::label Foam::RBD::joint::index()
const 55 inline Foam::label Foam::RBD::joint::qIndex()
const 73 if (!unitQuaternion())
76 <<
"Attempt to get the quaternion for a non-spherical joint" 90 if (!unitQuaternion())
93 <<
"Attempt to set quaternion for a non-spherical joint" 97 q[qIndex_] = quat.
v().x();
98 q[qIndex_+1] = quat.
v().y();
99 q[qIndex_+2] = quat.
v().z();
Ostream & operator<<(Ostream &, const rigidBody &)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const vector & v() const noexcept
Vector part of the quaternion ( = axis of rotation)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
static quaternion unit(const vector &v)
Return the unit quaternion (versor) from the given vector (w = sqrt(1 - |sqr(v)|)) ...
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Quaternion class used to perform rotations in 3D space.
VSForm block(const label start) const
errorManip< error > abort(error &err)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
label nDoF() const
Return the number of degrees of freedom in this joint.
List< spatialVector > S_
Joint motion sub-space.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
const List< spatialVector > & S() const
Return the joint motion sub-space.
joint(const label nDoF)
Construct joint setting the size of the motion sub-space.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
virtual bool unitQuaternion() const
Return true if this joint describes rotation using a quaternion.