Go to the documentation of this file.
32 auto motionModel = dict.
getVal<
word>(
"motionModel");
34 if(motionModel !=
"rotatingAxisMotion")
37 " motionModel should be rotatingAxisMotion, but found "
38 << motionModel <<
endl;
42 auto& motionInfo = dict.
subDict(
"rotatingAxisMotionInfo");
45 axis_.reserve(axisNames.size()+1);
52 for(
auto& aName: axisNames)
54 auto& axDict = motionInfo.subDict(aName);
56 if(
auto axPtr = makeUnique<rotatingAxis>(axDict); axPtr)
58 axis_.push_back(axPtr());
59 axisName_.push_back(aName);
64 "could not read rotating axis from "<< axDict.globalName()<<
endl;
71 if( !axisName_.search(
"none") )
81 axisName_.push_back(
"none");
85 numAxis_ = axis_.size();
95 dict.
add(
"motionModel",
"rotatingAxisMotion");
102 auto& axDict = motionInfo.subDictOrCreate(axisName_[i]);
103 if( !axis_.hostVectorAll()[i].write(axDict))
106 " error in writing axis "<< axisName_[i] <<
" to dicrionary "
107 << motionInfo.globalName()<<
endl;
123 if(! readDictionary(dict) )
138 if( !motionInfo.
read(is) )
145 if( !readDictionary(motionInfo) )
return false;
158 if( !writeDictionary(motionInfo))
163 if( !motionInfo.
write(os) )
166 " error in writing dictionray to file. \n";
const char * motionModelFile__
FUNCTION_H bool write(iOstream &os) const
virtual bool write(iOstream &os) const
FUNCTION_H rotatingAxisMotion()
virtual bool read(iIstream &is)
dictionary & subDictOrCreate(const word &keyword)
bool add(const word &keyword, const float &v)
iOstream & endl(iOstream &os)
bool writeDictionary(dictionary &dict) const
wordList dictionaryKeywords() const
#define fatalErrorInFunction
#define ForAll(i, container)
FUNCTION_H bool read(iIstream &is)
virtual const word & name() const
dictionary & subDict(const word &keyword)
T getVal(const word &keyword) const
bool readDictionary(const dictionary &dict)
#define ioErrorInFile(fileName, lineNumber)