37 dict.readEntry(
"mass", mass_);
38 dict.readEntry(
"momentOfInertia", momentOfInertia_);
39 aRelax_ =
dict.getOrDefault<scalar>(
"accelerationRelaxation", 1);
40 aDamp_ =
dict.getOrDefault<scalar>(
"accelerationDamping", 1);
41 report_ =
dict.getOrDefault<
Switch>(
"report",
false);
42 updateConstraints_ =
dict.getOrDefault(
"updateConstraints",
false);
56 motionState_.write(
os);
67 if (!restraints_.empty())
73 const word& restraintType(restraints_[rI].
type());
77 os.
writeEntry(
"sixDoFRigidBodyMotionRestraint", restraintType);
87 if (!constraints_.empty())
93 const word& constraintType(constraints_[rI].
type());
97 os.
writeEntry(
"sixDoFRigidBodyMotionConstraint", constraintType);
99 constraints_[rI].sixDoFRigidBodyMotionConstraint::write(
os);
void addConstraints(const dictionary &dict)
Add restraints to the motion, public to allow external.
bool read(const dictionary &dict)
Read coefficients dictionary and update system parameters,.
Ostream & indent(Ostream &os)
Indent stream.
void write(Ostream &) const
Write.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
#define forAll(list, i)
Loop across all elements in list.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
virtual Ostream & endBlock()
Write end block group.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
void addRestraints(const dictionary &dict)
Add restraints to the motion, public to allow external.