33 dict.
lookup(
"mass") >> mass_;
34 dict.
lookup(
"momentOfInertia") >> momentOfInertia_;
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();
70 os <<
indent << restraints_[rI].name() << nl
73 writeEntry(os,
"sixDoFRigidBodyMotionRestraint", restraintType);
75 restraints_[rI].write(os);
83 if (!constraints_.empty())
90 word constraintType = constraints_[rI].type();
92 os <<
indent << constraints_[rI].name() << nl
95 writeEntry(os,
"sixDoFRigidBodyMotionConstraint", constraintType);
97 constraints_[rI].sixDoFRigidBodyMotionConstraint::write(os);
99 constraints_[rI].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,.
#define forAll(list, i)
Loop across all elements in list.
Ostream & indent(Ostream &os)
Indent stream.
void write(Ostream &) const
Write.
A list of keyword definitions, which are a keyword followed by any number of values (e...
void write(dictionary &dict) const
Write to dictionary.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
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 string.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
void addRestraints(const dictionary &dict)
Add restraints to the motion, public to allow external.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.