All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
joint Class Referenceabstract

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

Inheritance diagram for joint:
Collaboration diagram for joint:

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 rigidBodyModel &model, const dictionary &dict),(model, dict))
 
 joint (const rigidBodyModel &model, const label nDoF)
 Construct joint setting the size of the motion sub-space. More...
 
 joint (const joint &)=default
 Copy constructor. More...
 
virtual autoPtr< jointclone () 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 rigidBodyModelState &state) const =0
 Update the rigidBodyModel state for the joint given. More...
 
virtual void write (Ostream &) const
 Write. More...
 
void operator= (const joint &j)
 Assignment. 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< jointNew (joint *jointPtr)
 Simple selector to return an autoPtr<joint> of the given joint*. More...
 
static autoPtr< jointNew (const rigidBodyModel &model, const dictionary &dict)
 Select from dictionary. More...
 

Protected Attributes

const rigidBodyModelmodel_
 Reference to the model. More...
 
List< spatialVectorS_
 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...
 
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 80 of file joint.H.

Constructor & Destructor Documentation

◆ joint() [1/2]

joint ( const rigidBodyModel model,
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 28 of file jointI.H.

Referenced by joint::XSvc::XSvc().

Here is the caller graph for this function:

◆ joint() [2/2]

joint ( const joint )
default

Copy constructor.

◆ ~joint()

~joint ( )
virtual

Destructor.

Definition at line 76 of file joint.C.

Referenced by joint::iNew::iNew().

Here is the caller graph for this function:

Member Function Documentation

◆ TypeName()

TypeName ( "joint"  )

Runtime type information.

Referenced by joint::XSvc::XSvc().

Here is the caller graph for this function:

◆ declareRunTimeSelectionTable()

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

Referenced by joint::XSvc::XSvc().

Here is the caller graph for this function:

◆ clone()

virtual autoPtr<joint> clone ( ) const
pure virtual

Clone this joint (needed by PtrList)

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

Referenced by joint::XSvc::XSvc().

Here is the caller graph for this function:

◆ 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 43 of file joint.C.

Referenced by joint::iNew::iNew(), joint::iNew::operator()(), and rigidBodyModel::rigidBodyModel().

Here is the caller graph for this function:

◆ New() [2/2]

Foam::autoPtr< Foam::RBD::joint > New ( const rigidBodyModel model,
const dictionary dict 
)
static

Select from dictionary.

Definition at line 50 of file joint.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, dictionary::lookup(), and Foam::nl.

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 39 of file jointI.H.

References joint::S_.

Referenced by rigidBodyModel::forwardDynamics(), rigidBodyModel::forwardDynamicsCorrection(), joint::iNew::iNew(), rigidBodyModel::join_(), and joint::XSvc::XSvc().

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 44 of file jointI.H.

Referenced by joint::iNew::iNew(), Rs::jcalc(), rigidBodyModel::join_(), joint::operator=(), and joint::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 49 of file jointI.H.

References joint::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 54 of file jointI.H.

References joint::qIndex_.

◆ S()

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

Return the joint motion sub-space.

Definition at line 59 of file jointI.H.

References joint::S_.

Referenced by function::jcalc(), and functionDot::jcalc().

Here is the caller graph for this function:

◆ jcalc()

virtual void jcalc ( XSvc J,
const rigidBodyModelState state 
) const
pure virtual

Update the rigidBodyModel state for the joint given.

the joint state q, w and velocity qDot

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

Referenced by rigidBodyModel::forwardDynamics(), rigidBodyModel::forwardDynamicsCorrection(), and joint::iNew::iNew().

Here is the caller graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented in composite, Pa, Ra, and floating.

Definition at line 82 of file joint.C.

References Foam::type(), and Foam::writeEntry().

Referenced by joint::iNew::iNew(), Foam::RBD::operator<<(), floating::write(), Ra::write(), Pa::write(), and composite::write().

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

◆ operator=()

void operator= ( const joint j)
inline

Assignment.

Definition at line 67 of file jointI.H.

References joint::index_, joint::qIndex_, joint::S_, and joint::unitQuaternion().

Referenced by joint::iNew::iNew().

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 76 of file jointI.H.

References Foam::abort(), Field< Type >::block(), Foam::FatalError, FatalErrorInFunction, joint::qIndex_, quaternion::unit(), and joint::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 92 of file jointI.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, joint::qIndex_, joint::unitQuaternion(), quaternion::v(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ rigidBodyModel

friend class rigidBodyModel
friend

Allow the rigidBodyModel class to set the joint indices.

Definition at line 120 of file joint.H.

◆ operator<<

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

Referenced by joint::iNew::iNew().

Member Data Documentation

◆ model_

const rigidBodyModel& model_
protected

Reference to the model.

Definition at line 88 of file joint.H.

Referenced by joint::iNew::operator()().

◆ S_

◆ index_

label index_
protected

Index of this joint in the rigidBodyModel.

Definition at line 94 of file joint.H.

Referenced by joint::index(), and joint::operator=().

◆ qIndex_


The documentation for this class was generated from the following files: