44 #ifndef RBD_rigidBodyRestraint_H 45 #define RBD_rigidBodyRestraint_H 169 const rigidBodyModelState& state
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 restraint internal joint forces into the tau field and.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
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.
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 Foam::string.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
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.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
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.