42 #ifndef RBD_rigidBodyRestraint_H
43 #define RBD_rigidBodyRestraint_H
61 class rigidBodyModelState;
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Base class for defining restraints for rigid-body dynamics.
virtual autoPtr< restraint > clone() const =0
Construct and return a clone.
restraint(const word &name, const dictionary &dict, const rigidBodyModel &model)
Construct from the dict dictionary and Time.
virtual void restrain(scalarField &tau, Field< spatialVector > &fx, const rigidBodyModelState &state) const =0
Accumulate the retraint internal joint forces into the tau field and.
word name_
Name of the restraint.
static autoPtr< restraint > New(const word &name, const dictionary &dict, const rigidBodyModel &model)
Select constructed from the dict dictionary and Time.
label bodyIndex_
Index of the body the restraint is applied to.
virtual bool read(const dictionary &dict)
Update properties from given dictionary.
virtual ~restraint()
Destructor.
dictionary coeffs_
Restraint model specific coefficient dictionary.
const dictionary & coeffDict() const
Return access to coeffs.
TypeName("restraint")
Runtime type information.
declareRunTimeSelectionTable(autoPtr, restraint, dictionary,(const word &name, const dictionary &dict, const rigidBodyModel &model),(name, dict, model))
label masterBodyIndex_
Index of the master body the restraint is applied to.
point bodyPoint(const point &p) const
Transform the given point on the restrained body to the global frame.
const word & name() const
Return the name.
spatialVector bodyPointVelocity(const point &p) const
Transform the velocity of the given point on the restrained body.
virtual void write(Ostream &) const =0
Write.
const rigidBodyModel & model_
Reference to the model.
Holds the motion state of rigid-body model.
Basic rigid-body model representing a system of rigid-bodies connected by 1-6 DoF joints.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keyword definitions, which are a keyword followed by any number of values (e....
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Macros to ease declaration of run-time selection tables.