Abstract base-class for all rigid-body joints. More...
#include <joint.H>


Classes | |
| class | XSvc |
| Joint state returned by jcalc. More... | |
| class | iNew |
Public Member Functions | |
| TypeName ("joint") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, joint, dictionary,(const dictionary &dict),(dict)) | |
| joint (const label nDoF) | |
| Construct joint setting the size of the motion sub-space. | |
| virtual autoPtr< joint > | clone () const =0 |
| Clone this joint (needed by PtrList). | |
| virtual | ~joint () |
| Destructor. | |
| label | nDoF () const |
| Return the number of degrees of freedom in this joint. | |
| virtual bool | unitQuaternion () const |
| Return true if this joint describes rotation using a quaternion. | |
| label | index () const |
| Return the index of this joint in the model. | |
| label | qIndex () const |
| Return start index for the state variables for this joint. | |
| const List< spatialVector > & | S () const |
| Return the joint motion sub-space. | |
| virtual void | jcalc (XSvc &J, const scalarField &q, const scalarField &qDot) const =0 |
| Update the rigidBodyModel state for the joint given. | |
| virtual void | write (Ostream &) const |
| Write. | |
| quaternion | unitQuaternion (const scalarField &q) const |
| Return the unit quaternion for this joint. | |
| void | unitQuaternion (const quaternion &quat, scalarField &q) const |
| Set the unit quaternion for this joint. | |
Static Public Member Functions | |
| static autoPtr< joint > | New (joint *jointPtr) |
| Simple selector to return an autoPtr<joint> of the given joint*. | |
| static autoPtr< joint > | New (const dictionary &dict) |
| Select from dictionary. | |
Protected Attributes | |
| List< spatialVector > | S_ |
| Joint motion sub-space. | |
| label | index_ |
| Index of this joint in the rigidBodyModel. | |
| label | qIndex_ |
| Index of this joints data in the rigidBodyModel state. | |
Friends | |
| class | rigidBodyModel |
| Allow the rigidBodyModel class to set the joint indices. | |
| 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 |
Construct joint setting the size of the motion sub-space.
to the given degrees of freedom of the joint
Definition at line 23 of file jointI.H.
References index_, nDoF(), qIndex_, and S_.
Referenced by composite::composite(), composite::composite(), declareRunTimeSelectionTable(), New(), null::null(), null::null(), operator<<, Pa::Pa(), Px::Px(), Px::Px(), Pxyz::Pxyz(), Pxyz::Pxyz(), Py::Py(), Py::Py(), Pz::Pz(), Pz::Pz(), Ra::Ra(), Rs::Rs(), Rs::Rs(), Rx::Rx(), Rx::Rx(), Rxyz::Rxyz(), Rxyz::Rxyz(), Ry::Ry(), Ry::Ry(), Ryxz::Ryxz(), Ryxz::Ryxz(), Rz::Rz(), Rz::Rz(), Rzyx::Rzyx(), and Rzyx::Rzyx().


| TypeName | ( | "joint" | ) |
Runtime type information.
| declareRunTimeSelectionTable | ( | autoPtr | , |
| joint | , | ||
| dictionary | , | ||
| (const dictionary &dict) | , | ||
| (dict) | ) |
|
static |
Simple selector to return an autoPtr<joint> of the given joint*.
Definition at line 39 of file joint.C.
References joint().
Referenced by rigidBodyModel::rigidBodyModel().


|
static |
Select from dictionary.
Definition at line 45 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 33 of file jointI.H.
References S_.
Referenced by declareRunTimeSelectionTable(), rigidBodyModel::forwardDynamics(), rigidBodyModel::forwardDynamicsCorrection(), rigidBodyModel::join_(), and joint().

|
inlinevirtual |
Return true if this joint describes rotation using a quaternion.
Reimplemented in Rs.
Definition at line 38 of file jointI.H.
Referenced by Rs::jcalc(), rigidBodyModel::join_(), unitQuaternion(), and unitQuaternion().

|
inline |
|
inline |
Return start index for the state variables for this joint.
in the rigidBodyModel state fields
Definition at line 48 of file jointI.H.
References qIndex_.
|
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 77 of file joint.C.
References os(), and Foam::type().
Referenced by Foam::RBD::operator<<(), composite::write(), floating::write(), Pa::write(), and Ra::write().


|
inline |
Return the unit quaternion for this joint.
if it uses a quaternion representation for rotation
Definition at line 61 of file jointI.H.
References Foam::abort(), Field< Type >::block(), Foam::FatalError, FatalErrorInFunction, qIndex_, quaternion::unit(), and unitQuaternion().

|
inline |
Set the unit quaternion for this joint.
if it uses a quaternion representation for rotation
Definition at line 77 of file jointI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, qIndex_, unitQuaternion(), quaternion::v(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

|
friend |
Allow the rigidBodyModel class to set the joint indices.
Definition at line 130 of file joint.H.
References rigidBodyModel.
Referenced by rigidBodyModel.
|
protected |
Joint motion sub-space.
Definition at line 91 of file joint.H.
Referenced by Pa::jcalc(), Px::jcalc(), Py::jcalc(), Pz::jcalc(), Ra::jcalc(), Rx::jcalc(), Ry::jcalc(), Rz::jcalc(), joint(), nDoF(), Pa::Pa(), Px::Px(), Px::Px(), Pxyz::Pxyz(), Pxyz::Pxyz(), Py::Py(), Py::Py(), Pz::Pz(), Pz::Pz(), Ra::Ra(), Rs::Rs(), Rs::Rs(), Rx::Rx(), Rx::Rx(), Rxyz::Rxyz(), Rxyz::Rxyz(), Ry::Ry(), Ry::Ry(), Ryxz::Ryxz(), Ryxz::Ryxz(), Rz::Rz(), Rz::Rz(), Rzyx::Rzyx(), Rzyx::Rzyx(), S(), Pa::write(), and Ra::write().
|
protected |
Index of this joint in the rigidBodyModel.
|
protected |
Index of this joints data in the rigidBodyModel state.
Definition at line 101 of file joint.H.
Referenced by Pa::jcalc(), Px::jcalc(), Pxyz::jcalc(), Py::jcalc(), Pz::jcalc(), Ra::jcalc(), Rs::jcalc(), Rx::jcalc(), Rxyz::jcalc(), Ry::jcalc(), Ryxz::jcalc(), Rz::jcalc(), Rzyx::jcalc(), joint(), qIndex(), unitQuaternion(), and unitQuaternion().