59 if (model_.unitQuaternions())
61 forAll (model_.joints(), i)
63 const label qi = model_.joints()[i].qIndex();
65 if (model_.joints()[i].unitQuaternion())
69 scalar magDv =
mag(dv);
79 normalise(model_.joints()[i].unitQuaternion(q0())*dQuat)
83 model_.joints()[i].unitQuaternion(quat, q());
#define forAll(list, i)
Loop across all elements in list.
Six degree of freedom motion for a rigid body.
void correctQuaternionJoints()
Correct the quaternion joints based on the current change in q.
virtual ~rigidBodySolver()
Destructor.
rigidBodySolver(rigidBodyMotion &body)
Creates a single block of cells from point coordinates, numbers of cells in each direction and an exp...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Quaternion class used to perform rotations in 3D space.
defineRunTimeSelectionTable(rigidBody, dictionary)
defineTypeNameAndDebug(cuboid, 0)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensioned< scalar > mag(const dimensioned< Type > &)
quaternion normalise(const quaternion &q)
Return the normalised (unit) quaternion of the given quaternion.
dimensionedScalar cos(const dimensionedScalar &ds)