Go to the documentation of this file.
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();
virtual void write(Ostream &) const
Write.
const Cmpt & x() const
Access to the vector x component.
label nDoF() const
Return the number of degrees of freedom in this joint.
const vector & v() const
Vector part of the quaternion ( = axis of rotation)
joint(const label nDoF)
Construct joint setting the size of the motion sub-space.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
const Cmpt & z() const
Access to the vector z component.
Ostream & operator<<(Ostream &, const rigidBody &)
Quaternion class used to perform rotations in 3D space.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual Ostream & endBlock()
Write end block group.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
static quaternion unit(const vector &v)
errorManip< error > abort(error &err)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
const Cmpt & y() const
Access to the vector y component.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
VSForm block(const label start) const
Abstract base-class for all rigid-body joints.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const List< spatialVector > & S() const
Return the joint motion sub-space.
virtual bool unitQuaternion() const
Return true if this joint describes rotation using a quaternion.