72 const word bodyType(
dict.lookup(
"type"));
74 dictionaryConstructorTable::iterator cstrIter =
75 dictionaryConstructorTablePtr_->find(bodyType);
77 if (cstrIter == dictionaryConstructorTablePtr_->end())
80 <<
"Unknown rigidBody type "
81 << bodyType <<
nl <<
nl
82 <<
"Valid rigidBody types are : " <<
endl
83 << dictionaryConstructorTablePtr_->sortedToc()
122 <<
"Rigid body " <<
name() <<
" of type " <<
type()
123 <<
" does not support the calculation of sectional moments"
135 sectionMu0s(axis, distances);
146 sectionMu0s(axis, distances);
Macros for easy insertion into run-time selection tables.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static autoPtr< rigidBody > New(const word &name, const scalar &m, const vector &c, const symmTensor &Ic)
Select constructed from components.
virtual tmp< vectorField > sectionMu1s(const direction axis, const scalarField &distances) const
Return the first moments of the sections of the body between.
virtual void write(Ostream &) const
Write.
virtual bool massless() const
Return false as this body is not massless.
void merge(const subBody &)
Merge a body into this parent body.
rigidBody(const word &name, const scalar &m, const vector &c, const symmTensor &Ic)
Construct from mass, centre of mass and moment of inertia tensor.
virtual ~rigidBody()
Destructor.
virtual tmp< symmTensorField > sectionMu2s(const direction axis, const scalarField &distances) const
Return the second moments of the sections of the body between.
virtual autoPtr< rigidBody > clone() const
Return clone of this rigidBody.
virtual tmp< scalarField > sectionMu0s(const direction axis, const scalarField &distances) const
Return the zeroth moments of the sections of the body between.
This specialised rigidBody holds the original body after it has been merged into a master.
const spatialTransform & masterXT() const
Return the transform with respect to the master body.
const rigidBody & body() const
Return the original body from which this sub-body was constructed.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A class for managing temporary objects.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
rigidBodyInertia transform(const spatialTransform &X, const rigidBodyInertia &I)
Return (^BX_A)^* I ^AX_B.
defineRunTimeSelectionTable(rigidBody, dictionary)
addToRunTimeSelectionTable(rigidBody, cuboid, dictionary)
defineTypeNameAndDebug(cuboid, 0)
const dimensionedScalar c
Speed of light in a vacuum.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Specialisations of Field<T> for scalar, vector and tensor.