Go to the documentation of this file.
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);
55 motionState_.write(os);
57 os.
writeEntry(
"centreOfMass", initialCentreOfMass_);
58 os.
writeEntry(
"initialOrientation", initialQ_);
60 os.
writeEntry(
"momentOfInertia", momentOfInertia_);
61 os.
writeEntry(
"accelerationRelaxation", aRelax_);
65 if (!restraints_.empty())
71 const word& restraintType(restraints_[rI].
type());
75 os.
writeEntry(
"sixDoFRigidBodyMotionRestraint", restraintType);
77 restraints_[rI].
write(os);
85 if (!constraints_.empty())
91 const word& constraintType(constraints_[rI].
type());
95 os.
writeEntry(
"sixDoFRigidBodyMotionConstraint", constraintType);
97 constraints_[rI].sixDoFRigidBodyMotionConstraint::write(os);
99 constraints_[rI].
write(os);
107 if (!solver_.empty())
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
A class for handling words, derived from Foam::string.
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.
#define forAll(list, i)
Loop across all elements in list.
void write(Ostream &) const
Write.
void addConstraints(const dictionary &dict)
Add restraints to the motion, public to allow external.
word name(const complex &c)
Return string representation of complex.
bool read(const dictionary &dict)
Read coefficients dictionary and update system parameters,.
virtual Ostream & endBlock()
Write end block group.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
Ostream & indent(Ostream &os)
Indent stream.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...