Public Member Functions | Private Attributes | Friends
sixDoFRigidBodyMotionState Class Reference

Holds the motion state of sixDoF object. Wrapped up together to allow rapid scatter to other processors. The processors must all maintain exactly the same state data to avoid any drift or inconsistency. More...

Collaboration diagram for sixDoFRigidBodyMotionState:
Collaboration graph
[legend]

Public Member Functions

 sixDoFRigidBodyMotionState ()
 Construct null. More...
 
 sixDoFRigidBodyMotionState (const dictionary &dict)
 Construct from dictionary. More...
 
 sixDoFRigidBodyMotionState (const sixDoFRigidBodyMotionState &)
 Construct as copy. More...
 
 ~sixDoFRigidBodyMotionState ()
 Destructor. More...
 
const pointcentreOfRotation () const
 Return access to the centre of mass. More...
 
const tensorQ () const
 Return access to the orientation. More...
 
const vectorv () const
 Return access to velocity. More...
 
const vectora () const
 Return access to acceleration. More...
 
const vectorpi () const
 Return access to angular momentum. More...
 
const vectortau () const
 Return access to torque. More...
 
pointcentreOfRotation ()
 Return non-const access to the centre of mass. More...
 
tensorQ ()
 Return non-const access to the orientation. More...
 
vectorv ()
 Return non-const access to vector. More...
 
vectora ()
 Return non-const access to acceleration. More...
 
vectorpi ()
 Return non-const access to angular momentum. More...
 
vectortau ()
 Return non-const access to torque. More...
 
void write (dictionary &dict) const
 Write to dictionary. More...
 
void write (Ostream &) const
 Write to stream. More...
 

Private Attributes

point centreOfRotation_
 Current position of the centre of mass of the body. More...
 
tensor Q_
 Orientation, stored as the rotation tensor to transform. More...
 
vector v_
 
vector a_
 
vector pi_
 Angular momentum of body, in body local reference frame. More...
 
vector tau_
 Total torque on body, in body local reference frame. More...
 

Friends

Istreamoperator>> (Istream &, sixDoFRigidBodyMotionState &)
 
Ostreamoperator<< (Ostream &, const sixDoFRigidBodyMotionState &)
 

Detailed Description

Holds the motion state of sixDoF object. Wrapped up together to allow rapid scatter to other processors. The processors must all maintain exactly the same state data to avoid any drift or inconsistency.

Source files

Definition at line 66 of file sixDoFRigidBodyMotionState.H.

Constructor & Destructor Documentation

◆ sixDoFRigidBodyMotionState() [1/3]

Construct null.

Definition at line 30 of file sixDoFRigidBodyMotionState.C.

◆ sixDoFRigidBodyMotionState() [2/3]

Construct from dictionary.

Definition at line 42 of file sixDoFRigidBodyMotionState.C.

◆ sixDoFRigidBodyMotionState() [3/3]

Construct as copy.

Definition at line 63 of file sixDoFRigidBodyMotionState.C.

◆ ~sixDoFRigidBodyMotionState()

Destructor.

Definition at line 78 of file sixDoFRigidBodyMotionState.C.

Member Function Documentation

◆ centreOfRotation() [1/2]

Foam::point & centreOfRotation ( ) const
inline

Return access to the centre of mass.

Definition at line 29 of file sixDoFRigidBodyMotionStateI.H.

References sixDoFRigidBodyMotionState::centreOfRotation_.

Referenced by sixDoFSolver::centreOfRotation().

Here is the caller graph for this function:

◆ Q() [1/2]

Foam::tensor & Q ( ) const
inline

Return access to the orientation.

Definition at line 35 of file sixDoFRigidBodyMotionStateI.H.

◆ v() [1/2]

Foam::vector & v ( ) const
inline

Return access to velocity.

Definition at line 41 of file sixDoFRigidBodyMotionStateI.H.

◆ a() [1/2]

Foam::vector & a ( ) const
inline

Return access to acceleration.

Definition at line 47 of file sixDoFRigidBodyMotionStateI.H.

◆ pi() [1/2]

Foam::vector & pi ( ) const
inline

Return access to angular momentum.

Definition at line 53 of file sixDoFRigidBodyMotionStateI.H.

◆ tau() [1/2]

Foam::vector & tau ( ) const
inline

Return access to torque.

Definition at line 59 of file sixDoFRigidBodyMotionStateI.H.

◆ centreOfRotation() [2/2]

point& centreOfRotation ( )
inline

Return non-const access to the centre of mass.

◆ Q() [2/2]

tensor& Q ( )
inline

Return non-const access to the orientation.

◆ v() [2/2]

vector& v ( )
inline

Return non-const access to vector.

◆ a() [2/2]

vector& a ( )
inline

Return non-const access to acceleration.

◆ pi() [2/2]

vector& pi ( )
inline

Return non-const access to angular momentum.

◆ tau() [2/2]

vector& tau ( )
inline

Return non-const access to torque.

◆ write() [1/2]

void write ( dictionary dict) const

◆ write() [2/2]

void write ( Ostream os) const

Write to stream.

Definition at line 42 of file sixDoFRigidBodyMotionStateIO.C.

References token::END_STATEMENT, Foam::nl, and Ostream::writeKeyword().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream ,
sixDoFRigidBodyMotionState  
)
friend

◆ operator<<

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

Field Documentation

◆ centreOfRotation_

point centreOfRotation_
private

Current position of the centre of mass of the body.

Definition at line 71 of file sixDoFRigidBodyMotionState.H.

Referenced by sixDoFRigidBodyMotionState::centreOfRotation(), and sixDoFRigidBodyMotionState::write().

◆ Q_

tensor Q_
private

Orientation, stored as the rotation tensor to transform.

from the body to the global reference frame, i.e.: globalVector = Q_ & bodyLocalVector bodyLocalVector = Q_.T() & globalVector

Definition at line 77 of file sixDoFRigidBodyMotionState.H.

Referenced by sixDoFRigidBodyMotionState::write().

◆ v_

vector v_
private

Definition at line 80 of file sixDoFRigidBodyMotionState.H.

Referenced by sixDoFRigidBodyMotionState::write().

◆ a_

vector a_
private

Definition at line 83 of file sixDoFRigidBodyMotionState.H.

Referenced by sixDoFRigidBodyMotionState::write().

◆ pi_

vector pi_
private

Angular momentum of body, in body local reference frame.

Definition at line 86 of file sixDoFRigidBodyMotionState.H.

Referenced by sixDoFRigidBodyMotionState::write().

◆ tau_

vector tau_
private

Total torque on body, in body local reference frame.

Definition at line 89 of file sixDoFRigidBodyMotionState.H.

Referenced by sixDoFRigidBodyMotionState::write().


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