77 const word bodyType(
dict.lookup(
"type"));
79 dictionaryConstructorTable::iterator cstrIter =
80 dictionaryConstructorTablePtr_->find(bodyType);
82 if (cstrIter == dictionaryConstructorTablePtr_->end())
85 <<
"Unknown rigidBody type "
86 << bodyType <<
nl <<
nl
87 <<
"Valid rigidBody types are : " <<
endl
88 << dictionaryConstructorTablePtr_->sortedToc()
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 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 autoPtr< rigidBody > clone() const
Return clone of this rigidBody.
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 keyword definitions, which are a keyword followed by any number of values (e....
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 bool)
Return a word representation of a bool.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.