39 #ifndef RBD_rigidBody_H 40 #define RBD_rigidBody_H 59 inline Ostream&
operator<<(Ostream&,
const rigidBody&);
static autoPtr< rigidBody > New(const word &name, const scalar &m, const vector &c, const symmTensor &Ic)
Select constructed from components.
Ostream & operator<<(Ostream &, const rigidBody &)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual void write(Ostream &) const
Write.
const word & name() const
Return name.
void merge(const subBody &)
Merge a body into this parent body.
const symmTensor & Ic() const
Return the inertia tensor of the rigid-body about the centre of mass.
friend Ostream & operator<<(Ostream &, const rigidBody &)
scalar m() const
Return the mass of the rigid-body.
virtual autoPtr< rigidBody > clone() const
Return clone of this rigidBody.
const vector & c() const
Return the centre of mass of the rigid-body.
A class for handling words, derived from Foam::string.
virtual bool massless() const
Return false as this body is not massless.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
rigidBody(const word &name, const scalar &m, const vector &c, const symmTensor &Ic)
Construct from mass, centre of mass and moment of inertia tensor.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Macros to ease declaration of run-time selection tables.
declareRunTimeSelectionTable(autoPtr, rigidBody, dictionary,(const word &name, const dictionary &dict),(name, dict))
virtual ~rigidBody()
Destructor.
TypeName("rigidBody")
Runtime type information.