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)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
spatialVector v
The constrained joint velocity.
const Time & time_
Reference to time database.
label nBodies() const
Return the number of bodies in the model (bodies().size())
const Time & time() const
Return the time.
label mergedBodyID(const label mergedBodyIndex) const
Return the merged body ID for the given merged body index.
bool unitQuaternions() const
Return true if any of the joints using quaternions.
vector masterPoint(const label bodyID, const vector &p) const
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.
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.
label mergedBodyIndex(const label mergedBodyID) const
Return the index of the merged body in the mergedBody list.
const DynamicList< label > & lambda() const
List of indices of the parent of each body.
const PtrList< joint > & joints() const
Return the list of joints in the model.
bool merged(label bodyID) const
Return true if the body with given ID has been merged with a parent.
const STLpoint & a() const
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
splitCell * master() const
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
SpatialVector< scalar > spatialVector
SpatialVector of scalars.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.