33 dict.lookup(
"mass") >> mass_;
34 dict.lookup(
"momentOfInertia") >> momentOfInertia_;
35 aRelax_ =
dict.lookupOrDefault<scalar>(
"accelerationRelaxation", 1.0);
36 aDamp_ =
dict.lookupOrDefault<scalar>(
"accelerationDamping", 1.0);
37 report_ =
dict.lookupOrDefault<
Switch>(
"report",
false);
51 motionState_.write(os);
53 writeEntry(os,
"centreOfMass", initialCentreOfMass_);
54 writeEntry(os,
"initialOrientation", initialQ_);
56 writeEntry(os,
"momentOfInertia", momentOfInertia_);
57 writeEntry(os,
"accelerationRelaxation", aRelax_);
61 if (!restraints_.empty())
68 word restraintType = restraints_[rI].type();
73 writeEntry(os,
"sixDoFRigidBodyMotionRestraint", restraintType);
75 restraints_[rI].write(os);
83 if (!constraints_.empty())
90 word constraintType = constraints_[rI].type();
95 writeEntry(os,
"sixDoFRigidBodyMotionConstraint", constraintType);
97 constraints_[rI].sixDoFRigidBodyMotionConstraint::write(os);
99 constraints_[rI].write(os);
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
#define forAll(list, i)
Loop across all elements in list.
virtual const fileName & name() const
Return the name of the stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A list of keyword definitions, which are a keyword followed by any number of values (e....
void addConstraints(const dictionary &dict)
Add restraints to the motion, public to allow external.
void write(Ostream &) const
Write.
bool read(const dictionary &dict)
Read coefficients dictionary and update system parameters,.
void addRestraints(const dictionary &dict)
Add restraints to the motion, public to allow external.
A class for handling words, derived from string.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Ostream & indent(Ostream &os)
Indent stream.