Abstract base-class for all rigid-body joints. More...
Classes | |
class | iNew |
class | XSvc |
Joint state returned by jcalc. More... | |
Public Member Functions | |
TypeName ("joint") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, joint, dictionary,(const dictionary &dict),(dict)) | |
joint (const label nDoF) | |
Construct joint setting the size of the motion sub-space. More... | |
virtual autoPtr< joint > | clone () const =0 |
Clone this joint (needed by PtrList) More... | |
virtual | ~joint () |
Destructor. More... | |
label | nDoF () const |
Return the number of degrees of freedom in this joint. More... | |
virtual bool | unitQuaternion () const |
Return true if this joint describes rotation using a quaternion. More... | |
label | index () const |
Return the index of this joint in the model. More... | |
label | qIndex () const |
Return start index for the state variables for this joint. More... | |
const List< spatialVector > & | S () const |
Return the joint motion sub-space. More... | |
virtual void | jcalc (XSvc &J, const scalarField &q, const scalarField &qDot) const =0 |
Update the rigidBodyModel state for the joint given. More... | |
virtual void | write (Ostream &) const |
Write. More... | |
quaternion | unitQuaternion (const scalarField &q) const |
Return the unit quaternion for this joint. More... | |
void | unitQuaternion (const quaternion &quat, scalarField &q) const |
Set the unit quaternion for this joint. More... | |
Static Public Member Functions | |
static autoPtr< joint > | New (joint *jointPtr) |
Simple selector to return an autoPtr<joint> of the given joint*. More... | |
static autoPtr< joint > | New (const dictionary &dict) |
Select from dictionary. More... | |
Protected Attributes | |
List< spatialVector > | S_ |
Joint motion sub-space. More... | |
label | index_ |
Index of this joint in the rigidBodyModel. More... | |
label | qIndex_ |
Index of this joints data in the rigidBodyModel state. More... | |
Friends | |
class | rigidBodyModel |
Allow the rigidBodyModel class to set the joint indices. More... | |
Ostream & | operator<< (Ostream &, const joint &) |
Abstract base-class for all rigid-body joints.
Reference:
Featherstone, R. (2008). Rigid body dynamics algorithms. Springer. Chapter 4.
|
inline |
TypeName | ( | "joint" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
joint | , | ||
dictionary | , | ||
(const dictionary &dict) | , | ||
(dict) | |||
) |
|
static |
|
static |
Select from dictionary.
Definition at line 52 of file joint.C.
References dict, Foam::exit(), Foam::FatalIOError, and FatalIOErrorInLookup.
|
inline |
Return the number of degrees of freedom in this joint.
Definition at line 40 of file jointI.H.
Referenced by rigidBodyModel::forwardDynamics(), rigidBodyModel::forwardDynamicsCorrection(), and rigidBodyModel::join_().
|
inlinevirtual |
Return true if this joint describes rotation using a quaternion.
Reimplemented in Rs.
Definition at line 45 of file jointI.H.
Referenced by Rs::jcalc(), and rigidBodyModel::join_().
|
inline |
|
inline |
Return start index for the state variables for this joint.
in the rigidBodyModel state fields
|
inline |
|
pure virtual |
Update the rigidBodyModel state for the joint given.
the joint state q, w and velocity qDot
Implemented in composite, null, Pa, Px, Pxyz, Py, Pz, Ra, Rs, Rx, Rxyz, Ry, Ryxz, Rz, and Rzyx.
Referenced by rigidBodyModel::forwardDynamics(), and rigidBodyModel::forwardDynamicsCorrection().
|
virtual |
Write.
Reimplemented in composite, floating, Pa, and Ra.
Definition at line 84 of file joint.C.
References os(), and Foam::type().
Referenced by Foam::RBD::operator<<().
|
inline |
Return the unit quaternion for this joint.
if it uses a quaternion representation for rotation
Definition at line 68 of file jointI.H.
References Foam::abort(), Field< Type >::block(), Foam::FatalError, FatalErrorInFunction, and crankConRod::unit().
|
inline |
Set the unit quaternion for this joint.
if it uses a quaternion representation for rotation
Definition at line 84 of file jointI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, quaternion::v(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
|
friend |
Allow the rigidBodyModel class to set the joint indices.
|
protected |
Joint motion sub-space.
Definition at line 92 of file joint.H.
Referenced by Pa::Pa(), Px::Px(), Pxyz::Pxyz(), Py::Py(), Pz::Pz(), Ra::Ra(), Rs::Rs(), Rx::Rx(), Rxyz::Rxyz(), Ry::Ry(), Ryxz::Ryxz(), Rz::Rz(), and Rzyx::Rzyx().
|
protected |
Index of this joint in the rigidBodyModel.
|
protected |
Index of this joints data in the rigidBodyModel state.