Loading...
Searching...
No Matches
cuboid Class Reference

#include <cuboid.H>

Inheritance diagram for cuboid:
Collaboration diagram for cuboid:

Public Member Functions

 TypeName ("cuboid")
 Runtime type information.
 cuboid (const word &name, const scalar m, const vector &c, const vector &L)
 Construct from name, mass, centre of mass and lengths of the sides.
 cuboid (const word &name, const dictionary &dict)
 Construct from dictionary.
virtual autoPtr< rigidBodyclone () const
 Return clone of this cuboid.
virtual ~cuboid ()
 Destructor.
const vectorL () const
 Return the lengths of the sides of the cuboid.
virtual void write (Ostream &) const
 Write.
Public Member Functions inherited from rigidBody
 TypeName ("rigidBody")
 Runtime type information.
 declareRunTimeSelectionTable (autoPtr, rigidBody, dictionary,(const word &name, const dictionary &dict),(name, dict))
 rigidBody (const word &name, const scalar &m, const vector &c, const symmTensor &Ic)
 Construct from mass, centre of mass and moment of inertia tensor.
 rigidBody (const word &name, const rigidBodyInertia &rbi)
 Construct from with the given rigidBodyInertia.
 rigidBody (const word &name, const dictionary &dict)
 Construct from dictionary.
virtual ~rigidBody ()
 Destructor.
const wordname () const
 Return name.
virtual bool massless () const
 Return false as this body is not massless.
void merge (const subBody &)
 Merge a body into this parent body.
Public Member Functions inherited from rigidBodyInertia
 rigidBodyInertia ()
 Null constructor, initializes to zero.
 rigidBodyInertia (const scalar m, const vector &c, const symmTensor &Ic)
 Construct from mass, centre of mass and moment of inertia tensor.
 rigidBodyInertia (const dictionary &dict)
 Construct from dictionary.
 rigidBodyInertia (const spatialTensor &st)
 Construct from the components of a spatial tensor.
 rigidBodyInertia (Istream &is)
 Construct from Istream.
scalar m () const
 Return the mass of the rigid-body.
const vectorc () const
 Return the centre of mass of the rigid-body.
const symmTensorIc () const
 Return the inertia tensor of the rigid-body about the centre of mass.
symmTensor Ioc () const
 Return the difference between the inertia tensor of the rigid-body.
symmTensor Icc (const vector &c) const
 Return the difference between the inertia tensor of the rigid-body.
symmTensor Io () const
 Return the inertia tensor of the rigid-body about the origin.
scalar kineticEnergy (const spatialVector &v)
 Return the kinetic energy of the body with the given velocity.
 operator spatialTensor () const
 Conversion to spatial tensor.
void operator+= (const rigidBodyInertia &)

Additional Inherited Members

Static Public Member Functions inherited from rigidBody
static autoPtr< rigidBodyNew (const word &name, const scalar &m, const vector &c, const symmTensor &Ic)
 Select constructed from components.
static autoPtr< rigidBodyNew (const word &name, const dictionary &dict)
 Select constructed from name and dictionary.
Static Public Member Functions inherited from rigidBodyInertia
static symmTensor Ioc (const scalar m, const vector &c)
 Return the difference between the inertia tensor of the rigid-body.

Detailed Description

Definition at line 53 of file cuboid.H.

Constructor & Destructor Documentation

◆ cuboid() [1/2]

cuboid ( const word & name,
const scalar m,
const vector & c,
const vector & L )
inline

Construct from name, mass, centre of mass and lengths of the sides.

Definition at line 45 of file cuboidI.H.

References rigidBodyInertia::c(), L(), rigidBodyInertia::m(), rigidBody::name(), and rigidBody::rigidBody().

Referenced by clone().

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

◆ cuboid() [2/2]

cuboid ( const word & name,
const dictionary & dict )
inline

Construct from dictionary.

Definition at line 58 of file cuboidI.H.

References rigidBodyInertia::c(), dict, Foam::I, rigidBodyInertia::m(), rigidBody::name(), rigidBody::rigidBody(), and rigidBodyInertia::rigidBodyInertia().

Here is the call graph for this function:

◆ ~cuboid()

~cuboid ( )
virtual

Destructor.

Definition at line 52 of file cuboid.C.

Member Function Documentation

◆ TypeName()

TypeName ( "cuboid" )

Runtime type information.

References rigidBodyInertia::c(), dict, L(), rigidBodyInertia::m(), and rigidBody::name().

Here is the call graph for this function:

◆ clone()

Foam::autoPtr< Foam::RBD::rigidBody > clone ( ) const
virtual

Return clone of this cuboid.

Reimplemented from rigidBody.

Definition at line 44 of file cuboid.C.

References cuboid().

Here is the call graph for this function:

◆ L()

const Foam::vector & L ( ) const
inline

Return the lengths of the sides of the cuboid.

Definition at line 75 of file cuboidI.H.

Referenced by cuboid(), and TypeName().

Here is the caller graph for this function:

◆ write()

void write ( Ostream & os) const
virtual

Write.

Reimplemented from rigidBody.

Definition at line 58 of file cuboid.C.

References L, rigidBodyInertia::m(), os(), and Foam::type().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • src/rigidBodyDynamics/bodies/cuboid/cuboid.H
  • src/rigidBodyDynamics/bodies/cuboid/cuboid.C
  • src/rigidBodyDynamics/bodies/cuboid/cuboidI.H