145 if (!
merged(mergedBodyID))
148 <<
"Body " << mergedBodyID <<
" has not been merged" const subBody & mergedBody(label mergedBodyID) const
Return the merged body for the given body ID.
const rigidBodyInertia & I(const label i) const
Return the inertia of body i.
DynamicList< spatialTransform > X0_
Transform for external forces to the bodies reference frame.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const spatialVector & v(const label i) const
Return the spatial velocity of the bodies.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
label nBodies() const
Return the number of bodies in the model (bodies().size())
label mergedBodyID(const label mergedBodyIndex) const
Return the merged body ID for the given merged body index.
const word & name() const
Return the body name.
label master(label bodyID) const
Return the ID of the master body for a sub-body otherwise.
HashTable< label, word > bodyIDs_
Lookup-table of the IDs of the bodies.
DynamicList< spatialVector > v_
The spatial velocity of the bodies.
PtrList< joint > joints_
Each body it attached with a joint which are held on this list.
PtrList< rigidBody > bodies_
List of the bodies.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
This specialised rigidBody holds the original body after it has been merged into a master...
A class for handling words, derived from string.
SpatialVector< scalar > spatialVector
SpatialVector of scalars.
label mergedBodyIndex(const label mergedBodyID) const
Return the index of the merged body in the mergedBody list.
label nDoF_
The number of degrees of freedom of the model.
const word & name(const label bodyID) const
Return the name of body with the given ID.
const PtrList< joint > & joints() const
Return the list of joints in the model.
bool unitQuaternions() const
Return true if any of the joints using quaternions.
errorManip< error > abort(error &err)
DynamicList< label > lambda_
List of indices of the parent of each body.
label masterID() const
Return the master body Id.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
label nDoF() const
Return the number of degrees of freedom of the model.
const vector & g() const
Return the acceleration due to gravity.
PtrList< rigidBody > bodies() const
Return the list of the bodies in the model.
bool unitQuaternions_
True if any of the joints using quaternions.
PtrList< subBody > mergedBodies_
Bodies may be merged into existing bodies, the inertia of which is.
const DynamicList< label > & lambda() const
List of indices of the parent of each body.
label bodyID(const word &name) const
Return the ID of the body with the given name.
vector masterPoint(const label bodyID, const vector &p) const
bool merged(label bodyID) const
Return true if the body with given ID has been merged with a parent.
vector g_
Acceleration due to gravity.
This class represents the linear and angular inertia of a rigid body by the mass, centre of mass and ...