mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Rename sixDof to sixDoF
This commit is contained in:
@ -31,10 +31,10 @@ pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPat
|
|||||||
pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C
|
pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C
|
||||||
pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C
|
pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C
|
||||||
pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C
|
pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C
|
||||||
pointPatchFields/derived/sixDofRigidBodyDisplacement/sixDofRigidBodyDisplacementPointPatchVectorField.C
|
pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C
|
||||||
pointPatchFields/derived/sixDofRigidBodyDisplacement/sixDofRigidBodyMotion/sixDofRigidBodyMotion.C
|
pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C
|
||||||
pointPatchFields/derived/sixDofRigidBodyDisplacement/sixDofRigidBodyMotion/sixDofRigidBodyMotionIO.C
|
pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C
|
||||||
pointPatchFields/derived/sixDofRigidBodyDisplacement/sixDofRigidBodyMotion/sixDofRigidBodyMotionState.C
|
pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C
|
||||||
pointPatchFields/derived/sixDofRigidBodyDisplacement/sixDofRigidBodyMotion/sixDofRigidBodyMotionStateIO.C
|
pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateIO.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libfvMotionSolvers
|
LIB = $(FOAM_LIBBIN)/libfvMotionSolvers
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "sixDofRigidBodyDisplacementPointPatchVectorField.H"
|
#include "sixDoFRigidBodyDisplacementPointPatchVectorField.H"
|
||||||
#include "pointPatchFields.H"
|
#include "pointPatchFields.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
@ -40,8 +40,8 @@ namespace Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
sixDofRigidBodyDisplacementPointPatchVectorField::
|
sixDoFRigidBodyDisplacementPointPatchVectorField::
|
||||||
sixDofRigidBodyDisplacementPointPatchVectorField
|
sixDoFRigidBodyDisplacementPointPatchVectorField
|
||||||
(
|
(
|
||||||
const pointPatch& p,
|
const pointPatch& p,
|
||||||
const DimensionedField<vector, pointMesh>& iF
|
const DimensionedField<vector, pointMesh>& iF
|
||||||
@ -54,8 +54,8 @@ sixDofRigidBodyDisplacementPointPatchVectorField
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
sixDofRigidBodyDisplacementPointPatchVectorField::
|
sixDoFRigidBodyDisplacementPointPatchVectorField::
|
||||||
sixDofRigidBodyDisplacementPointPatchVectorField
|
sixDoFRigidBodyDisplacementPointPatchVectorField
|
||||||
(
|
(
|
||||||
const pointPatch& p,
|
const pointPatch& p,
|
||||||
const DimensionedField<vector, pointMesh>& iF,
|
const DimensionedField<vector, pointMesh>& iF,
|
||||||
@ -82,10 +82,10 @@ sixDofRigidBodyDisplacementPointPatchVectorField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sixDofRigidBodyDisplacementPointPatchVectorField::
|
sixDoFRigidBodyDisplacementPointPatchVectorField::
|
||||||
sixDofRigidBodyDisplacementPointPatchVectorField
|
sixDoFRigidBodyDisplacementPointPatchVectorField
|
||||||
(
|
(
|
||||||
const sixDofRigidBodyDisplacementPointPatchVectorField& ptf,
|
const sixDoFRigidBodyDisplacementPointPatchVectorField& ptf,
|
||||||
const pointPatch& p,
|
const pointPatch& p,
|
||||||
const DimensionedField<vector, pointMesh>& iF,
|
const DimensionedField<vector, pointMesh>& iF,
|
||||||
const pointPatchFieldMapper& mapper
|
const pointPatchFieldMapper& mapper
|
||||||
@ -98,10 +98,10 @@ sixDofRigidBodyDisplacementPointPatchVectorField
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
sixDofRigidBodyDisplacementPointPatchVectorField::
|
sixDoFRigidBodyDisplacementPointPatchVectorField::
|
||||||
sixDofRigidBodyDisplacementPointPatchVectorField
|
sixDoFRigidBodyDisplacementPointPatchVectorField
|
||||||
(
|
(
|
||||||
const sixDofRigidBodyDisplacementPointPatchVectorField& ptf,
|
const sixDoFRigidBodyDisplacementPointPatchVectorField& ptf,
|
||||||
const DimensionedField<vector, pointMesh>& iF
|
const DimensionedField<vector, pointMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
@ -114,7 +114,7 @@ sixDofRigidBodyDisplacementPointPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void sixDofRigidBodyDisplacementPointPatchVectorField::updateCoeffs()
|
void sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs()
|
||||||
{
|
{
|
||||||
if (this->updated())
|
if (this->updated())
|
||||||
{
|
{
|
||||||
@ -166,7 +166,7 @@ void sixDofRigidBodyDisplacementPointPatchVectorField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void sixDofRigidBodyDisplacementPointPatchVectorField::write(Ostream& os) const
|
void sixDoFRigidBodyDisplacementPointPatchVectorField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
pointPatchField<vector>::write(os);
|
pointPatchField<vector>::write(os);
|
||||||
motion_.write(os);
|
motion_.write(os);
|
||||||
@ -182,7 +182,7 @@ void sixDofRigidBodyDisplacementPointPatchVectorField::write(Ostream& os) const
|
|||||||
makePointPatchTypeField
|
makePointPatchTypeField
|
||||||
(
|
(
|
||||||
pointPatchVectorField,
|
pointPatchVectorField,
|
||||||
sixDofRigidBodyDisplacementPointPatchVectorField
|
sixDoFRigidBodyDisplacementPointPatchVectorField
|
||||||
);
|
);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -23,21 +23,21 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::sixDofRigidBodyDisplacementPointPatchVectorField
|
Foam::sixDoFRigidBodyDisplacementPointPatchVectorField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Foam::sixDofRigidBodyDisplacementPointPatchVectorField
|
Foam::sixDoFRigidBodyDisplacementPointPatchVectorField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
sixDofRigidBodyDisplacementPointPatchVectorField.C
|
sixDoFRigidBodyDisplacementPointPatchVectorField.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef sixDofRigidBodyDisplacementPointPatchVectorField_H
|
#ifndef sixDoFRigidBodyDisplacementPointPatchVectorField_H
|
||||||
#define sixDofRigidBodyDisplacementPointPatchVectorField_H
|
#define sixDoFRigidBodyDisplacementPointPatchVectorField_H
|
||||||
|
|
||||||
#include "fixedValuePointPatchField.H"
|
#include "fixedValuePointPatchField.H"
|
||||||
#include "sixDofRigidBodyMotion.H"
|
#include "sixDoFRigidBodyMotion.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -45,17 +45,17 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class sixDofRigidBodyDisplacementPointPatchVectorField Declaration
|
Class sixDoFRigidBodyDisplacementPointPatchVectorField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class sixDofRigidBodyDisplacementPointPatchVectorField
|
class sixDoFRigidBodyDisplacementPointPatchVectorField
|
||||||
:
|
:
|
||||||
public fixedValuePointPatchField<vector>
|
public fixedValuePointPatchField<vector>
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Six dof motion object
|
//- Six dof motion object
|
||||||
sixDofRigidBodyMotion motion_;
|
sixDoFRigidBodyMotion motion_;
|
||||||
|
|
||||||
//- Reference positions of points on the patch
|
//- Reference positions of points on the patch
|
||||||
pointField p0_;
|
pointField p0_;
|
||||||
@ -68,20 +68,20 @@ class sixDofRigidBodyDisplacementPointPatchVectorField
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("sixDofRigidBodyDisplacement");
|
TypeName("sixDoFRigidBodyDisplacement");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from patch and internal field
|
//- Construct from patch and internal field
|
||||||
sixDofRigidBodyDisplacementPointPatchVectorField
|
sixDoFRigidBodyDisplacementPointPatchVectorField
|
||||||
(
|
(
|
||||||
const pointPatch&,
|
const pointPatch&,
|
||||||
const DimensionedField<vector, pointMesh>&
|
const DimensionedField<vector, pointMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from patch, internal field and dictionary
|
//- Construct from patch, internal field and dictionary
|
||||||
sixDofRigidBodyDisplacementPointPatchVectorField
|
sixDoFRigidBodyDisplacementPointPatchVectorField
|
||||||
(
|
(
|
||||||
const pointPatch&,
|
const pointPatch&,
|
||||||
const DimensionedField<vector, pointMesh>&,
|
const DimensionedField<vector, pointMesh>&,
|
||||||
@ -89,9 +89,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given patchField<vector> onto a new patch
|
//- Construct by mapping given patchField<vector> onto a new patch
|
||||||
sixDofRigidBodyDisplacementPointPatchVectorField
|
sixDoFRigidBodyDisplacementPointPatchVectorField
|
||||||
(
|
(
|
||||||
const sixDofRigidBodyDisplacementPointPatchVectorField&,
|
const sixDoFRigidBodyDisplacementPointPatchVectorField&,
|
||||||
const pointPatch&,
|
const pointPatch&,
|
||||||
const DimensionedField<vector, pointMesh>&,
|
const DimensionedField<vector, pointMesh>&,
|
||||||
const pointPatchFieldMapper&
|
const pointPatchFieldMapper&
|
||||||
@ -102,7 +102,7 @@ public:
|
|||||||
{
|
{
|
||||||
return autoPtr<pointPatchField<vector> >
|
return autoPtr<pointPatchField<vector> >
|
||||||
(
|
(
|
||||||
new sixDofRigidBodyDisplacementPointPatchVectorField
|
new sixDoFRigidBodyDisplacementPointPatchVectorField
|
||||||
(
|
(
|
||||||
*this
|
*this
|
||||||
)
|
)
|
||||||
@ -110,9 +110,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//- Construct as copy setting internal field reference
|
//- Construct as copy setting internal field reference
|
||||||
sixDofRigidBodyDisplacementPointPatchVectorField
|
sixDoFRigidBodyDisplacementPointPatchVectorField
|
||||||
(
|
(
|
||||||
const sixDofRigidBodyDisplacementPointPatchVectorField&,
|
const sixDoFRigidBodyDisplacementPointPatchVectorField&,
|
||||||
const DimensionedField<vector, pointMesh>&
|
const DimensionedField<vector, pointMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ public:
|
|||||||
{
|
{
|
||||||
return autoPtr<pointPatchField<vector> >
|
return autoPtr<pointPatchField<vector> >
|
||||||
(
|
(
|
||||||
new sixDofRigidBodyDisplacementPointPatchVectorField
|
new sixDoFRigidBodyDisplacementPointPatchVectorField
|
||||||
(
|
(
|
||||||
*this,
|
*this,
|
||||||
iF
|
iF
|
||||||
@ -24,11 +24,11 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "sixDofRigidBodyMotion.H"
|
#include "sixDoFRigidBodyMotion.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::sixDofRigidBodyMotion::sixDofRigidBodyMotion()
|
Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion()
|
||||||
:
|
:
|
||||||
motionState_(),
|
motionState_(),
|
||||||
refCentreOfMass_(vector::zero),
|
refCentreOfMass_(vector::zero),
|
||||||
@ -37,7 +37,7 @@ Foam::sixDofRigidBodyMotion::sixDofRigidBodyMotion()
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::sixDofRigidBodyMotion::sixDofRigidBodyMotion
|
Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion
|
||||||
(
|
(
|
||||||
const point& centreOfMass,
|
const point& centreOfMass,
|
||||||
const tensor& Q,
|
const tensor& Q,
|
||||||
@ -65,7 +65,7 @@ Foam::sixDofRigidBodyMotion::sixDofRigidBodyMotion
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::sixDofRigidBodyMotion::sixDofRigidBodyMotion(const dictionary& dict)
|
Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion(const dictionary& dict)
|
||||||
:
|
:
|
||||||
motionState_(dict),
|
motionState_(dict),
|
||||||
refCentreOfMass_(dict.lookupOrDefault("refCentreOfMass", centreOfMass())),
|
refCentreOfMass_(dict.lookupOrDefault("refCentreOfMass", centreOfMass())),
|
||||||
@ -74,27 +74,27 @@ Foam::sixDofRigidBodyMotion::sixDofRigidBodyMotion(const dictionary& dict)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::sixDofRigidBodyMotion::sixDofRigidBodyMotion
|
Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion
|
||||||
(
|
(
|
||||||
const sixDofRigidBodyMotion& sDofRBM
|
const sixDoFRigidBodyMotion& sDoFRBM
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
motionState_(sDofRBM.motionState()),
|
motionState_(sDoFRBM.motionState()),
|
||||||
refCentreOfMass_(sDofRBM.refCentreOfMass()),
|
refCentreOfMass_(sDoFRBM.refCentreOfMass()),
|
||||||
momentOfInertia_(sDofRBM.momentOfInertia()),
|
momentOfInertia_(sDoFRBM.momentOfInertia()),
|
||||||
mass_(sDofRBM.mass())
|
mass_(sDoFRBM.mass())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::sixDofRigidBodyMotion::~sixDofRigidBodyMotion()
|
Foam::sixDoFRigidBodyMotion::~sixDoFRigidBodyMotion()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::sixDofRigidBodyMotion::updatePosition
|
void Foam::sixDoFRigidBodyMotion::updatePosition
|
||||||
(
|
(
|
||||||
scalar deltaT
|
scalar deltaT
|
||||||
)
|
)
|
||||||
@ -141,7 +141,7 @@ void Foam::sixDofRigidBodyMotion::updatePosition
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::sixDofRigidBodyMotion::updateForce
|
void Foam::sixDoFRigidBodyMotion::updateForce
|
||||||
(
|
(
|
||||||
const vector& fGlobal,
|
const vector& fGlobal,
|
||||||
const vector& tauGlobal,
|
const vector& tauGlobal,
|
||||||
@ -166,7 +166,7 @@ void Foam::sixDofRigidBodyMotion::updateForce
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::sixDofRigidBodyMotion::updateForce
|
void Foam::sixDoFRigidBodyMotion::updateForce
|
||||||
(
|
(
|
||||||
const pointField& positions,
|
const pointField& positions,
|
||||||
const vectorField& forces,
|
const vectorField& forces,
|
||||||
@ -201,7 +201,7 @@ void Foam::sixDofRigidBodyMotion::updateForce
|
|||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::pointField>
|
Foam::tmp<Foam::pointField>
|
||||||
Foam::sixDofRigidBodyMotion::generatePositions(const pointField& pts) const
|
Foam::sixDoFRigidBodyMotion::generatePositions(const pointField& pts) const
|
||||||
{
|
{
|
||||||
return (centreOfMass() + (Q() & (pts - refCentreOfMass_)));
|
return (centreOfMass() + (Q() & (pts - refCentreOfMass_)));
|
||||||
}
|
}
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::sixDofRigidBodyMotion
|
Foam::sixDoFRigidBodyMotion
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Six degree of freedom motion for a rigid body. Angular momentum stored in
|
Six degree of freedom motion for a rigid body. Angular momentum stored in
|
||||||
@ -44,16 +44,16 @@ Description
|
|||||||
doi = {10.1063/1.474310}
|
doi = {10.1063/1.474310}
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
sixDofRigidBodyMotionI.H
|
sixDoFRigidBodyMotionI.H
|
||||||
sixDofRigidBodyMotion.C
|
sixDoFRigidBodyMotion.C
|
||||||
sixDofRigidBodyMotionIO.C
|
sixDoFRigidBodyMotionIO.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef sixDofRigidBodyMotion_H
|
#ifndef sixDoFRigidBodyMotion_H
|
||||||
#define sixDofRigidBodyMotion_H
|
#define sixDoFRigidBodyMotion_H
|
||||||
|
|
||||||
#include "sixDofRigidBodyMotionState.H"
|
#include "sixDoFRigidBodyMotionState.H"
|
||||||
#include "pointField.H"
|
#include "pointField.H"
|
||||||
#include "mathConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
@ -67,21 +67,21 @@ class Istream;
|
|||||||
class Ostream;
|
class Ostream;
|
||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
class sixDofRigidBodyMotion;
|
class sixDoFRigidBodyMotion;
|
||||||
Istream& operator>>(Istream&, sixDofRigidBodyMotion&);
|
Istream& operator>>(Istream&, sixDoFRigidBodyMotion&);
|
||||||
Ostream& operator<<(Ostream&, const sixDofRigidBodyMotion&);
|
Ostream& operator<<(Ostream&, const sixDoFRigidBodyMotion&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class sixDofRigidBodyMotion Declaration
|
Class sixDoFRigidBodyMotion Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class sixDofRigidBodyMotion
|
class sixDoFRigidBodyMotion
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
// state data object
|
// state data object
|
||||||
sixDofRigidBodyMotionState motionState_;
|
sixDoFRigidBodyMotionState motionState_;
|
||||||
|
|
||||||
//- Centre of mass of reference state
|
//- Centre of mass of reference state
|
||||||
point refCentreOfMass_;
|
point refCentreOfMass_;
|
||||||
@ -113,10 +113,10 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct null
|
//- Construct null
|
||||||
sixDofRigidBodyMotion();
|
sixDoFRigidBodyMotion();
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
sixDofRigidBodyMotion
|
sixDoFRigidBodyMotion
|
||||||
(
|
(
|
||||||
const point& centreOfMass,
|
const point& centreOfMass,
|
||||||
const tensor& Q,
|
const tensor& Q,
|
||||||
@ -130,14 +130,14 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
sixDofRigidBodyMotion(const dictionary& dict);
|
sixDoFRigidBodyMotion(const dictionary& dict);
|
||||||
|
|
||||||
//- Construct as copy
|
//- Construct as copy
|
||||||
sixDofRigidBodyMotion(const sixDofRigidBodyMotion&);
|
sixDoFRigidBodyMotion(const sixDoFRigidBodyMotion&);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~sixDofRigidBodyMotion();
|
~sixDoFRigidBodyMotion();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -166,7 +166,7 @@ public:
|
|||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Return access to the motion state
|
//- Return access to the motion state
|
||||||
inline const sixDofRigidBodyMotionState& motionState() const;
|
inline const sixDoFRigidBodyMotionState& motionState() const;
|
||||||
|
|
||||||
//- Return access to the centre of mass
|
//- Return access to the centre of mass
|
||||||
inline const point& centreOfMass() const;
|
inline const point& centreOfMass() const;
|
||||||
@ -232,8 +232,8 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
friend Istream& operator>>(Istream&, sixDofRigidBodyMotion&);
|
friend Istream& operator>>(Istream&, sixDoFRigidBodyMotion&);
|
||||||
friend Ostream& operator<<(Ostream&, const sixDofRigidBodyMotion&);
|
friend Ostream& operator<<(Ostream&, const sixDoFRigidBodyMotion&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "sixDofRigidBodyMotionI.H"
|
#include "sixDoFRigidBodyMotionI.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ License
|
|||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
inline Foam::tensor
|
inline Foam::tensor
|
||||||
Foam::sixDofRigidBodyMotion::rotationTensorX(scalar phi) const
|
Foam::sixDoFRigidBodyMotion::rotationTensorX(scalar phi) const
|
||||||
{
|
{
|
||||||
return tensor
|
return tensor
|
||||||
(
|
(
|
||||||
@ -41,7 +41,7 @@ Foam::sixDofRigidBodyMotion::rotationTensorX(scalar phi) const
|
|||||||
|
|
||||||
|
|
||||||
inline Foam::tensor
|
inline Foam::tensor
|
||||||
Foam::sixDofRigidBodyMotion::rotationTensorY(scalar phi) const
|
Foam::sixDoFRigidBodyMotion::rotationTensorY(scalar phi) const
|
||||||
{
|
{
|
||||||
return tensor
|
return tensor
|
||||||
(
|
(
|
||||||
@ -53,7 +53,7 @@ Foam::sixDofRigidBodyMotion::rotationTensorY(scalar phi) const
|
|||||||
|
|
||||||
|
|
||||||
inline Foam::tensor
|
inline Foam::tensor
|
||||||
Foam::sixDofRigidBodyMotion::rotationTensorZ(scalar phi) const
|
Foam::sixDoFRigidBodyMotion::rotationTensorZ(scalar phi) const
|
||||||
{
|
{
|
||||||
return tensor
|
return tensor
|
||||||
(
|
(
|
||||||
@ -64,117 +64,117 @@ Foam::sixDofRigidBodyMotion::rotationTensorZ(scalar phi) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::sixDofRigidBodyMotionState&
|
inline const Foam::sixDoFRigidBodyMotionState&
|
||||||
Foam::sixDofRigidBodyMotion::motionState() const
|
Foam::sixDoFRigidBodyMotion::motionState() const
|
||||||
{
|
{
|
||||||
return motionState_;
|
return motionState_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::point& Foam::sixDofRigidBodyMotion::centreOfMass() const
|
inline const Foam::point& Foam::sixDoFRigidBodyMotion::centreOfMass() const
|
||||||
{
|
{
|
||||||
return motionState_.centreOfMass();
|
return motionState_.centreOfMass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::point& Foam::sixDofRigidBodyMotion::refCentreOfMass() const
|
inline const Foam::point& Foam::sixDoFRigidBodyMotion::refCentreOfMass() const
|
||||||
{
|
{
|
||||||
return refCentreOfMass_;
|
return refCentreOfMass_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::diagTensor&
|
inline const Foam::diagTensor&
|
||||||
Foam::sixDofRigidBodyMotion::momentOfInertia() const
|
Foam::sixDoFRigidBodyMotion::momentOfInertia() const
|
||||||
{
|
{
|
||||||
return momentOfInertia_;
|
return momentOfInertia_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::scalar Foam::sixDofRigidBodyMotion::mass() const
|
inline Foam::scalar Foam::sixDoFRigidBodyMotion::mass() const
|
||||||
{
|
{
|
||||||
return mass_;
|
return mass_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::tensor& Foam::sixDofRigidBodyMotion::Q() const
|
inline const Foam::tensor& Foam::sixDoFRigidBodyMotion::Q() const
|
||||||
{
|
{
|
||||||
return motionState_.Q();
|
return motionState_.Q();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::vector& Foam::sixDofRigidBodyMotion::v() const
|
inline const Foam::vector& Foam::sixDoFRigidBodyMotion::v() const
|
||||||
{
|
{
|
||||||
return motionState_.v();
|
return motionState_.v();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::vector& Foam::sixDofRigidBodyMotion::a() const
|
inline const Foam::vector& Foam::sixDoFRigidBodyMotion::a() const
|
||||||
{
|
{
|
||||||
return motionState_.a();
|
return motionState_.a();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::vector& Foam::sixDofRigidBodyMotion::pi() const
|
inline const Foam::vector& Foam::sixDoFRigidBodyMotion::pi() const
|
||||||
{
|
{
|
||||||
return motionState_.pi();
|
return motionState_.pi();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::vector& Foam::sixDofRigidBodyMotion::tau() const
|
inline const Foam::vector& Foam::sixDoFRigidBodyMotion::tau() const
|
||||||
{
|
{
|
||||||
return motionState_.tau();
|
return motionState_.tau();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::point& Foam::sixDofRigidBodyMotion::centreOfMass()
|
inline Foam::point& Foam::sixDoFRigidBodyMotion::centreOfMass()
|
||||||
{
|
{
|
||||||
return motionState_.centreOfMass();
|
return motionState_.centreOfMass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::point& Foam::sixDofRigidBodyMotion::refCentreOfMass()
|
inline Foam::point& Foam::sixDoFRigidBodyMotion::refCentreOfMass()
|
||||||
{
|
{
|
||||||
return refCentreOfMass_;
|
return refCentreOfMass_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::diagTensor& Foam::sixDofRigidBodyMotion::momentOfInertia()
|
inline Foam::diagTensor& Foam::sixDoFRigidBodyMotion::momentOfInertia()
|
||||||
{
|
{
|
||||||
return momentOfInertia_;
|
return momentOfInertia_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::scalar& Foam::sixDofRigidBodyMotion::mass()
|
inline Foam::scalar& Foam::sixDoFRigidBodyMotion::mass()
|
||||||
{
|
{
|
||||||
return mass_;
|
return mass_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::tensor& Foam::sixDofRigidBodyMotion::Q()
|
inline Foam::tensor& Foam::sixDoFRigidBodyMotion::Q()
|
||||||
{
|
{
|
||||||
return motionState_.Q();
|
return motionState_.Q();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::vector& Foam::sixDofRigidBodyMotion::v()
|
inline Foam::vector& Foam::sixDoFRigidBodyMotion::v()
|
||||||
{
|
{
|
||||||
return motionState_.v();
|
return motionState_.v();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::vector& Foam::sixDofRigidBodyMotion::a()
|
inline Foam::vector& Foam::sixDoFRigidBodyMotion::a()
|
||||||
{
|
{
|
||||||
return motionState_.a();
|
return motionState_.a();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::vector& Foam::sixDofRigidBodyMotion::pi()
|
inline Foam::vector& Foam::sixDoFRigidBodyMotion::pi()
|
||||||
{
|
{
|
||||||
return motionState_.pi();
|
return motionState_.pi();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::vector& Foam::sixDofRigidBodyMotion::tau()
|
inline Foam::vector& Foam::sixDoFRigidBodyMotion::tau()
|
||||||
{
|
{
|
||||||
return motionState_.tau();
|
return motionState_.tau();
|
||||||
}
|
}
|
||||||
@ -24,12 +24,12 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "sixDofRigidBodyMotion.H"
|
#include "sixDoFRigidBodyMotion.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::sixDofRigidBodyMotion::write(Ostream& os) const
|
void Foam::sixDoFRigidBodyMotion::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
motionState_.write(os);
|
motionState_.write(os);
|
||||||
|
|
||||||
@ -44,18 +44,18 @@ void Foam::sixDofRigidBodyMotion::write(Ostream& os) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Istream& Foam::operator>>(Istream& is, sixDofRigidBodyMotion& sDofRBM)
|
Foam::Istream& Foam::operator>>(Istream& is, sixDoFRigidBodyMotion& sDoFRBM)
|
||||||
{
|
{
|
||||||
is >> sDofRBM.motionState_
|
is >> sDoFRBM.motionState_
|
||||||
>> sDofRBM.refCentreOfMass_
|
>> sDoFRBM.refCentreOfMass_
|
||||||
>> sDofRBM.momentOfInertia_
|
>> sDoFRBM.momentOfInertia_
|
||||||
>> sDofRBM.mass_;
|
>> sDoFRBM.mass_;
|
||||||
|
|
||||||
// Check state of Istream
|
// Check state of Istream
|
||||||
is.check
|
is.check
|
||||||
(
|
(
|
||||||
"Foam::Istream& Foam::operator>>"
|
"Foam::Istream& Foam::operator>>"
|
||||||
"(Foam::Istream&, Foam::sixDofRigidBodyMotion&)"
|
"(Foam::Istream&, Foam::sixDoFRigidBodyMotion&)"
|
||||||
);
|
);
|
||||||
|
|
||||||
return is;
|
return is;
|
||||||
@ -65,19 +65,19 @@ Foam::Istream& Foam::operator>>(Istream& is, sixDofRigidBodyMotion& sDofRBM)
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const sixDofRigidBodyMotion& sDofRBM
|
const sixDoFRigidBodyMotion& sDoFRBM
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
os << sDofRBM.motionState()
|
os << sDoFRBM.motionState()
|
||||||
<< token::SPACE << sDofRBM.refCentreOfMass()
|
<< token::SPACE << sDoFRBM.refCentreOfMass()
|
||||||
<< token::SPACE << sDofRBM.momentOfInertia()
|
<< token::SPACE << sDoFRBM.momentOfInertia()
|
||||||
<< token::SPACE << sDofRBM.mass() ;
|
<< token::SPACE << sDoFRBM.mass() ;
|
||||||
|
|
||||||
// Check state of Ostream
|
// Check state of Ostream
|
||||||
os.check
|
os.check
|
||||||
(
|
(
|
||||||
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
|
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
|
||||||
"const Foam::sixDofRigidBodyMotion&)"
|
"const Foam::sixDoFRigidBodyMotion&)"
|
||||||
);
|
);
|
||||||
|
|
||||||
return os;
|
return os;
|
||||||
@ -24,11 +24,11 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "sixDofRigidBodyMotionState.H"
|
#include "sixDoFRigidBodyMotionState.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::sixDofRigidBodyMotionState::sixDofRigidBodyMotionState()
|
Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState()
|
||||||
:
|
:
|
||||||
centreOfMass_(vector::zero),
|
centreOfMass_(vector::zero),
|
||||||
Q_(I),
|
Q_(I),
|
||||||
@ -39,7 +39,7 @@ Foam::sixDofRigidBodyMotionState::sixDofRigidBodyMotionState()
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::sixDofRigidBodyMotionState::sixDofRigidBodyMotionState
|
Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState
|
||||||
(
|
(
|
||||||
const point& centreOfMass,
|
const point& centreOfMass,
|
||||||
const tensor& Q,
|
const tensor& Q,
|
||||||
@ -58,7 +58,7 @@ Foam::sixDofRigidBodyMotionState::sixDofRigidBodyMotionState
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::sixDofRigidBodyMotionState::sixDofRigidBodyMotionState
|
Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState
|
||||||
(
|
(
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
@ -72,23 +72,23 @@ Foam::sixDofRigidBodyMotionState::sixDofRigidBodyMotionState
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::sixDofRigidBodyMotionState::sixDofRigidBodyMotionState
|
Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState
|
||||||
(
|
(
|
||||||
const sixDofRigidBodyMotionState& sDofRBMS
|
const sixDoFRigidBodyMotionState& sDoFRBMS
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
centreOfMass_(sDofRBMS.centreOfMass()),
|
centreOfMass_(sDoFRBMS.centreOfMass()),
|
||||||
Q_(sDofRBMS.Q()),
|
Q_(sDoFRBMS.Q()),
|
||||||
v_(sDofRBMS.v()),
|
v_(sDoFRBMS.v()),
|
||||||
a_(sDofRBMS.a()),
|
a_(sDoFRBMS.a()),
|
||||||
pi_(sDofRBMS.pi()),
|
pi_(sDoFRBMS.pi()),
|
||||||
tau_(sDofRBMS.tau())
|
tau_(sDoFRBMS.tau())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::sixDofRigidBodyMotionState::~sixDofRigidBodyMotionState()
|
Foam::sixDoFRigidBodyMotionState::~sixDoFRigidBodyMotionState()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -23,22 +23,22 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::sixDofRigidBodyMotionState
|
Foam::sixDoFRigidBodyMotionState
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Holds the motion state of sixDof object. Wrapped up together
|
Holds the motion state of sixDoF object. Wrapped up together
|
||||||
to allow rapid scatter to other processors. The processors must all
|
to allow rapid scatter to other processors. The processors must all
|
||||||
maintain exactly the same state data to avoid any drift or inconsistency.
|
maintain exactly the same state data to avoid any drift or inconsistency.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
sixDofRigidBodyMotionStateI.H
|
sixDoFRigidBodyMotionStateI.H
|
||||||
sixDofRigidBodyMotionState.C
|
sixDoFRigidBodyMotionState.C
|
||||||
sixDofRigidBodyMotionStateIO.C
|
sixDoFRigidBodyMotionStateIO.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef sixDofRigidBodyMotionState_H
|
#ifndef sixDoFRigidBodyMotionState_H
|
||||||
#define sixDofRigidBodyMotionState_H
|
#define sixDoFRigidBodyMotionState_H
|
||||||
|
|
||||||
#include "vector.H"
|
#include "vector.H"
|
||||||
#include "point.H"
|
#include "point.H"
|
||||||
@ -56,16 +56,16 @@ class Istream;
|
|||||||
class Ostream;
|
class Ostream;
|
||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
class sixDofRigidBodyMotionState;
|
class sixDoFRigidBodyMotionState;
|
||||||
Istream& operator>>(Istream&, sixDofRigidBodyMotionState&);
|
Istream& operator>>(Istream&, sixDoFRigidBodyMotionState&);
|
||||||
Ostream& operator<<(Ostream&, const sixDofRigidBodyMotionState&);
|
Ostream& operator<<(Ostream&, const sixDoFRigidBodyMotionState&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class sixDofRigidBodyMotionState Declaration
|
Class sixDoFRigidBodyMotionState Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class sixDofRigidBodyMotionState
|
class sixDoFRigidBodyMotionState
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -96,10 +96,10 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct null
|
//- Construct null
|
||||||
sixDofRigidBodyMotionState();
|
sixDoFRigidBodyMotionState();
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
sixDofRigidBodyMotionState
|
sixDoFRigidBodyMotionState
|
||||||
(
|
(
|
||||||
const point& centreOfMass,
|
const point& centreOfMass,
|
||||||
const tensor& Q,
|
const tensor& Q,
|
||||||
@ -110,14 +110,14 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
sixDofRigidBodyMotionState(const dictionary& dict);
|
sixDoFRigidBodyMotionState(const dictionary& dict);
|
||||||
|
|
||||||
//- Construct as copy
|
//- Construct as copy
|
||||||
sixDofRigidBodyMotionState(const sixDofRigidBodyMotionState&);
|
sixDoFRigidBodyMotionState(const sixDoFRigidBodyMotionState&);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~sixDofRigidBodyMotionState();
|
~sixDoFRigidBodyMotionState();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -174,8 +174,8 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
friend Istream& operator>>(Istream&, sixDofRigidBodyMotionState&);
|
friend Istream& operator>>(Istream&, sixDoFRigidBodyMotionState&);
|
||||||
friend Ostream& operator<<(Ostream&, const sixDofRigidBodyMotionState&);
|
friend Ostream& operator<<(Ostream&, const sixDoFRigidBodyMotionState&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "sixDofRigidBodyMotionStateI.H"
|
#include "sixDoFRigidBodyMotionStateI.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -27,73 +27,73 @@ License
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
inline const Foam::point& Foam::sixDofRigidBodyMotionState::centreOfMass() const
|
inline const Foam::point& Foam::sixDoFRigidBodyMotionState::centreOfMass() const
|
||||||
{
|
{
|
||||||
return centreOfMass_;
|
return centreOfMass_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::tensor& Foam::sixDofRigidBodyMotionState::Q() const
|
inline const Foam::tensor& Foam::sixDoFRigidBodyMotionState::Q() const
|
||||||
{
|
{
|
||||||
return Q_;
|
return Q_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::vector& Foam::sixDofRigidBodyMotionState::v() const
|
inline const Foam::vector& Foam::sixDoFRigidBodyMotionState::v() const
|
||||||
{
|
{
|
||||||
return v_;
|
return v_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::vector& Foam::sixDofRigidBodyMotionState::a() const
|
inline const Foam::vector& Foam::sixDoFRigidBodyMotionState::a() const
|
||||||
{
|
{
|
||||||
return a_;
|
return a_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::vector& Foam::sixDofRigidBodyMotionState::pi() const
|
inline const Foam::vector& Foam::sixDoFRigidBodyMotionState::pi() const
|
||||||
{
|
{
|
||||||
return pi_;
|
return pi_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::vector& Foam::sixDofRigidBodyMotionState::tau() const
|
inline const Foam::vector& Foam::sixDoFRigidBodyMotionState::tau() const
|
||||||
{
|
{
|
||||||
return tau_;
|
return tau_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::point& Foam::sixDofRigidBodyMotionState::centreOfMass()
|
inline Foam::point& Foam::sixDoFRigidBodyMotionState::centreOfMass()
|
||||||
{
|
{
|
||||||
return centreOfMass_;
|
return centreOfMass_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::tensor& Foam::sixDofRigidBodyMotionState::Q()
|
inline Foam::tensor& Foam::sixDoFRigidBodyMotionState::Q()
|
||||||
{
|
{
|
||||||
return Q_;
|
return Q_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::vector& Foam::sixDofRigidBodyMotionState::v()
|
inline Foam::vector& Foam::sixDoFRigidBodyMotionState::v()
|
||||||
{
|
{
|
||||||
return v_;
|
return v_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::vector& Foam::sixDofRigidBodyMotionState::a()
|
inline Foam::vector& Foam::sixDoFRigidBodyMotionState::a()
|
||||||
{
|
{
|
||||||
return a_;
|
return a_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::vector& Foam::sixDofRigidBodyMotionState::pi()
|
inline Foam::vector& Foam::sixDoFRigidBodyMotionState::pi()
|
||||||
{
|
{
|
||||||
return pi_;
|
return pi_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::vector& Foam::sixDofRigidBodyMotionState::tau()
|
inline Foam::vector& Foam::sixDoFRigidBodyMotionState::tau()
|
||||||
{
|
{
|
||||||
return tau_;
|
return tau_;
|
||||||
}
|
}
|
||||||
@ -24,12 +24,12 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "sixDofRigidBodyMotionState.H"
|
#include "sixDoFRigidBodyMotionState.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::sixDofRigidBodyMotionState::write(Ostream& os) const
|
void Foam::sixDoFRigidBodyMotionState::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
os.writeKeyword("centreOfMass")
|
os.writeKeyword("centreOfMass")
|
||||||
<< centreOfMass_ << token::END_STATEMENT << nl;
|
<< centreOfMass_ << token::END_STATEMENT << nl;
|
||||||
@ -50,21 +50,21 @@ void Foam::sixDofRigidBodyMotionState::write(Ostream& os) const
|
|||||||
|
|
||||||
Foam::Istream& Foam::operator>>
|
Foam::Istream& Foam::operator>>
|
||||||
(
|
(
|
||||||
Istream& is, sixDofRigidBodyMotionState& sDofRBMS
|
Istream& is, sixDoFRigidBodyMotionState& sDoFRBMS
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
is >> sDofRBMS.centreOfMass_
|
is >> sDoFRBMS.centreOfMass_
|
||||||
>> sDofRBMS.Q_
|
>> sDoFRBMS.Q_
|
||||||
>> sDofRBMS.v_
|
>> sDoFRBMS.v_
|
||||||
>> sDofRBMS.a_
|
>> sDoFRBMS.a_
|
||||||
>> sDofRBMS.pi_
|
>> sDoFRBMS.pi_
|
||||||
>> sDofRBMS.tau_;
|
>> sDoFRBMS.tau_;
|
||||||
|
|
||||||
// Check state of Istream
|
// Check state of Istream
|
||||||
is.check
|
is.check
|
||||||
(
|
(
|
||||||
"Foam::Istream& Foam::operator>>"
|
"Foam::Istream& Foam::operator>>"
|
||||||
"(Foam::Istream&, Foam::sixDofRigidBodyMotionState&)"
|
"(Foam::Istream&, Foam::sixDoFRigidBodyMotionState&)"
|
||||||
);
|
);
|
||||||
|
|
||||||
return is;
|
return is;
|
||||||
@ -74,21 +74,21 @@ Foam::Istream& Foam::operator>>
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const sixDofRigidBodyMotionState& sDofRBMS
|
const sixDoFRigidBodyMotionState& sDoFRBMS
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
os << token::SPACE << sDofRBMS.centreOfMass()
|
os << token::SPACE << sDoFRBMS.centreOfMass()
|
||||||
<< token::SPACE << sDofRBMS.Q()
|
<< token::SPACE << sDoFRBMS.Q()
|
||||||
<< token::SPACE << sDofRBMS.v()
|
<< token::SPACE << sDoFRBMS.v()
|
||||||
<< token::SPACE << sDofRBMS.a()
|
<< token::SPACE << sDoFRBMS.a()
|
||||||
<< token::SPACE << sDofRBMS.pi()
|
<< token::SPACE << sDoFRBMS.pi()
|
||||||
<< token::SPACE << sDofRBMS.tau();
|
<< token::SPACE << sDoFRBMS.tau();
|
||||||
|
|
||||||
// Check state of Ostream
|
// Check state of Ostream
|
||||||
os.check
|
os.check
|
||||||
(
|
(
|
||||||
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
|
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
|
||||||
"const Foam::sixDofRigidBodyMotionState&)"
|
"const Foam::sixDoFRigidBodyMotionState&)"
|
||||||
);
|
);
|
||||||
|
|
||||||
return os;
|
return os;
|
||||||
Reference in New Issue
Block a user