Loading...
Searching...
No Matches
joint Class Referenceabstract

Abstract base-class for all rigid-body joints. More...

#include <joint.H>

Inheritance diagram for joint:
Collaboration diagram for joint:

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< jointclone () 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< jointNew (joint *jointPtr)
 Simple selector to return an autoPtr<joint> of the given joint*.
static autoPtr< jointNew (const dictionary &dict)
 Select from dictionary.

Protected Attributes

List< spatialVectorS_
 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.
Ostreamoperator<< (Ostream &, const joint &)

Detailed Description

Abstract base-class for all rigid-body joints.

Reference:

    Featherstone, R. (2008).
    Rigid body dynamics algorithms.
    Springer.
    Chapter 4.
Source files

Definition at line 81 of file joint.H.

Constructor & Destructor Documentation

◆ joint()

joint ( const label nDoF)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~joint()

~joint ( )
virtual

Destructor.

Definition at line 71 of file joint.C.

Member Function Documentation

◆ TypeName()

TypeName ( "joint" )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr ,
joint ,
dictionary ,
(const dictionary &dict) ,
(dict)  )

References dict, joint(), and nDoF().

Here is the call graph for this function:

◆ clone()

virtual autoPtr< joint > clone ( ) const
pure virtual

Clone this joint (needed by PtrList).

Implemented in composite, floating, null, Pa, Px, Pxyz, Py, Pz, Ra, Rs, Rx, Rxyz, Ry, Ryxz, Rz, and Rzyx.

◆ New() [1/2]

Foam::autoPtr< Foam::RBD::joint > New ( joint * jointPtr)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ New() [2/2]

Foam::autoPtr< Foam::RBD::joint > New ( const dictionary & dict)
static

Select from dictionary.

Definition at line 45 of file joint.C.

References dict, Foam::exit(), Foam::FatalIOError, and FatalIOErrorInLookup.

Here is the call graph for this function:

◆ nDoF()

Foam::label nDoF ( ) const
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().

Here is the caller graph for this function:

◆ unitQuaternion() [1/3]

bool unitQuaternion ( ) const
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().

Here is the caller graph for this function:

◆ index()

Foam::label index ( ) const
inline

Return the index of this joint in the model.

Definition at line 43 of file jointI.H.

References index_.

◆ qIndex()

Foam::label qIndex ( ) const
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_.

◆ S()

const Foam::List< Foam::spatialVector > & S ( ) const
inline

Return the joint motion sub-space.

Definition at line 53 of file jointI.H.

References S_.

◆ jcalc()

virtual void jcalc ( XSvc & J,
const scalarField & q,
const scalarField & qDot ) const
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().

Here is the caller graph for this function:

◆ write()

void write ( Ostream & os) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unitQuaternion() [2/3]

Foam::quaternion unitQuaternion ( const scalarField & q) const
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().

Here is the call graph for this function:

◆ unitQuaternion() [3/3]

void unitQuaternion ( const quaternion & quat,
scalarField & q ) const
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().

Here is the call graph for this function:

◆ rigidBodyModel

friend class rigidBodyModel
friend

Allow the rigidBodyModel class to set the joint indices.

Definition at line 130 of file joint.H.

References rigidBodyModel.

Referenced by rigidBodyModel.

◆ operator<<

Ostream & operator<< ( Ostream & ,
const joint &  )
friend

References joint().

Member Data Documentation

◆ S_

◆ index_

label index_
protected

Index of this joint in the rigidBodyModel.

Definition at line 96 of file joint.H.

Referenced by index(), and joint().

◆ qIndex_

label qIndex_
protected

The documentation for this class was generated from the following files:
  • src/rigidBodyDynamics/joints/joint/joint.H
  • src/rigidBodyDynamics/joints/joint/joint.C
  • src/rigidBodyDynamics/joints/joint/jointI.H