Go to the documentation of this file.
39 return bodies_.size();
72 return unitQuaternions_;
95 return mergedBody(bodyID).name();
99 return bodies_[bodyID].name();
133 return mergedBody(bodyID).masterID();
145 return -1 - mergedBodyIndex;
152 return -1 - mergedBodyID;
159 if (!merged(mergedBodyID))
162 <<
"Body " << mergedBodyID <<
" has not been merged"
166 return mergedBodies_[mergedBodyIndex(mergedBodyID)];
172 return bodyIDs_[
name];
186 mergedBody(bodyID).masterXT().
inv()
207 X0_[master(bodyID)].E().
T(),
208 masterPoint(bodyID,
p)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
label nBodies() const
Return the number of bodies in the model (bodies().size())
bool merged(label bodyID) const
Return true if the body with given ID has been merged with a parent.
static constexpr const zero Zero
Global zero (0)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
const rigidBodyInertia & I(const label i) const
Return the inertia of body i.
label mergedBodyIndex(const label mergedBodyID) const
Return the index of the merged body in the mergedBody list.
const spatialVector & v(const label i) const
Return the spatial velocity of the bodies.
const PtrList< joint > & joints() const
Return the list of joints in the model.
const spatialVector & a(const label i) const
Return the spatial acceleration of the bodies.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
word name(const complex &c)
Return string representation of complex.
const Time & time() const
Return the time.
label mergedBodyID(const label mergedBodyIndex) const
Return the merged body ID for the given merged body index.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
label master(label bodyID) const
Return the ID of the master body for a sub-body otherwise.
label bodyID(const word &name) const
Return the ID of the body with the given name.
errorManip< error > abort(error &err)
const DynamicList< label > & lambda() const
List of indices of the parent of each body.
const Time & time_
Reference to time database.
const word & name(const label bodyID) const
Return the name of body with the given ID.
vector masterPoint(const label bodyID, const vector &p) const
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool unitQuaternions() const
Return true if any of the joints using quaternions.
const subBody & mergedBody(label mergedBodyID) const
Return the merged body for the given body ID.
const vector & g() const
Return the acceleration due to gravity.
SpatialVector< scalar > spatialVector
SpatialVector of scalars.
label nDoF() const
Return the number of degrees of freedom of the model.
PtrList< rigidBody > bodies() const
Return the list of the bodies in the model.