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