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"
VSForm block(const label start) const
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Abstract base-class for all rigid-body joints.
List< spatialVector > S_
Joint motion sub-space.
virtual void write(Ostream &) const
Write.
label qIndex_
Index of this joints data in the rigidBodyModel state.
label nDoF() const
Return the number of degrees of freedom in this joint.
label qIndex() const
Return start index for the state variables for this joint.
const List< spatialVector > & S() const
Return the joint motion sub-space.
label index() const
Return the index of this joint in the model.
virtual bool unitQuaternion() const
Return true if this joint describes rotation using a quaternion.
label index_
Index of this joint in the rigidBodyModel.
joint(const label nDoF)
Construct joint setting the size of the motion sub-space.
const Cmpt & x() const noexcept
Access to the vector x component.
const Cmpt & z() const noexcept
Access to the vector z component.
const Cmpt & y() const noexcept
Access to the vector y component.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Quaternion class used to perform rotations in 3D space.
const vector & v() const noexcept
Vector part of the quaternion ( = axis of rotation).
static quaternion unit(const vector &v)
Return the unit quaternion (versor) from the given vector (w = sqrt(1 - |sqr(v)|)).
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
Ostream & operator<<(Ostream &, const rigidBody &)
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.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...