95 return mergedBody(bodyID).name();
133 return mergedBody(bodyID).masterID();
159 if (!merged(mergedBodyID))
162 <<
"Body " << mergedBodyID <<
" has not been merged"
166 return mergedBodies_[mergedBodyIndex(mergedBodyID)];
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....
DynamicList< spatialTransform > X0_
Transform for external forces to the bodies reference frame.
const spatialVector & v(const label i) const
Return the spatial velocity of the bodies.
const Time & time_
Reference to time database.
label nBodies() const
Return the number of bodies in the model (bodies().size()).
DynamicList< spatialVector > a_
The spatial acceleration of the bodies.
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.
label master(label bodyID) const
Return the ID of the master body for a sub-body otherwise.
label nDoF_
The number of degrees of freedom of the model.
const spatialVector & a(const label i) const
Return the spatial acceleration of the bodies.
vector masterPoint(const label bodyID, const vector &p) const
PtrList< subBody > mergedBodies_
Bodies may be merged into existing bodies, the inertia of which is.
const subBody & mergedBody(label mergedBodyID) const
Return the merged body for the given body ID.
PtrList< rigidBody > bodies_
List of the bodies.
bool unitQuaternions_
True if any of the joints using quaternions.
const vector & g() const
Return the acceleration due to gravity.
vector g_
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 bodyID(const word &name) const
Return the ID of the body with the given name.
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 word & name(const label bodyID) const
Return the name of body with the given ID.
PtrList< joint > joints_
Each body it attached with a joint which are held on this list.
const PtrList< joint > & joints() const
Return the list of joints in the model.
HashTable< label > bodyIDs_
Lookup-table of the IDs of the bodies.
DynamicList< spatialVector > v_
The spatial velocity of the bodies.
const rigidBodyInertia & I(const label i) const
Return the inertia of body i.
bool merged(label bodyID) const
Return true if the body with given ID has been merged with a parent.
DynamicList< label > lambda_
List of indices of the parent of each body.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
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).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)