<metaname="description"content="PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.">
<!-- iframe showing the search results (closed by default) -->
<divid="MSearchResultsWindow">
<iframesrc="javascript:void(0)"frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<divclass="header">
<divclass="headertitle">
<divclass="title">iIstream.hpp</div></div>
</div><!--header-->
<divclass="contents">
<ahref="iIstream_8hpp.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">/*------------------------------- phasicFlow ---------------------------------</span></div>
<divclass="line"><aname="l00002"></a><spanclass="lineno"> 2</span> <spanclass="comment"> O C enter of</span></div>
<divclass="line"><aname="l00003"></a><spanclass="lineno"> 3</span> <spanclass="comment"> O O E ngineering and</span></div>
<divclass="line"><aname="l00004"></a><spanclass="lineno"> 4</span> <spanclass="comment"> O O M ultiscale modeling of</span></div>
<divclass="line"><aname="l00005"></a><spanclass="lineno"> 5</span> <spanclass="comment"> OOOOOOO F luid flow </span></div>
<divclass="line"><aname="l00011"></a><spanclass="lineno"> 11</span> <spanclass="comment"> This file is part of phasicFlow code. It is a free software for simulating </span></div>
<divclass="line"><aname="l00012"></a><spanclass="lineno"> 12</span> <spanclass="comment"> granular and multiphase flows. You can redistribute it and/or modify it under</span></div>
<divclass="line"><aname="l00013"></a><spanclass="lineno"> 13</span> <spanclass="comment"> the terms of GNU General Public License v3 or any other later versions. </span></div>
<divclass="line"><aname="l00015"></a><spanclass="lineno"> 15</span> <spanclass="comment"> phasicFlow is distributed to help others in their research in the field of </span></div>
<divclass="line"><aname="l00016"></a><spanclass="lineno"> 16</span> <spanclass="comment"> granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the</span></div>
<divclass="line"><aname="l00017"></a><spanclass="lineno"> 17</span> <spanclass="comment"> implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></div>
<divclass="line"><aname="l00150"></a><spanclass="lineno"> 150</span> <spanclass="keyword">virtual</span><spanclass="keywordtype">bool</span><aclass="code"href="classpFlow_1_1iIstream.html#a5f238bd4e73ce3b43b8a737a8f30ab78">findToken</a>( <spanclass="keyword">const</span><aclass="code"href="namespacepFlow.html#a0ebe792a293e8c717bddf60070c0fe99">word</a>& w );</div>
<divclass="line"><aname="l00180"></a><spanclass="lineno"> 180</span>  T <aclass="code"href="classpFlow_1_1iIstream.html#a214b65eedf74268aed639e4d9b36fe08">lookupData</a>(<spanclass="keyword">const</span><aclass="code"href="namespacepFlow.html#a0ebe792a293e8c717bddf60070c0fe99">word</a>& keyword);</div>
<divclass="line"><aname="l00231"></a><spanclass="lineno"><aclass="line"href="namespacepFlow.html#adf5c68d6f815713f7a8f07a759533c78"> 231</a></span> <spanclass="keyword">inline</span><aclass="code"href="classpFlow_1_1iIstream.html">iIstream</a>&<aclass="code"href="namespacepFlow.html#a85ed561d066dae339196cd058783674f">operator>></a>(<aclass="code"href="classpFlow_1_1iIstream.html">iIstream</a>& is, <aclass="code"href="namespacepFlow.html#a49fae89ec4b26e330967b8737c3aa8b5">iIstreamManip</a> f)</div>
<divclass="line"><aname="l00237"></a><spanclass="lineno"><aclass="line"href="namespacepFlow.html#acf059ee65a85ee2ddc79502d3c24756b"> 237</a></span> <spanclass="keyword">inline</span><aclass="code"href="classpFlow_1_1iIstream.html">iIstream</a>&<aclass="code"href="namespacepFlow.html#a85ed561d066dae339196cd058783674f">operator>></a>(<aclass="code"href="classpFlow_1_1iIstream.html">iIstream</a>& is, <aclass="code"href="namespacepFlow.html#a5d347707d37593bf1a09bbe0a3ebd0c1">IOstreamManip</a> f)</div>
<divclass="line"><aname="l00244"></a><spanclass="lineno"> 244</span> <spanclass="comment">// read operation for basic types it gets from the token stream</span></div>
<divclass="line"><aname="l00245"></a><spanclass="lineno"> 245</span> <spanclass="keyword">inline</span> iIstream&<aclass="code"href="namespacepFlow.html#a85ed561d066dae339196cd058783674f">operator>></a>( iIstream& is, <aclass="code"href="namespacepFlow.html#a0ebe792a293e8c717bddf60070c0fe99">word</a>& w);</div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_aecfc9cc0a499c7d44de6a7562bcfea3f"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#aecfc9cc0a499c7d44de6a7562bcfea3f">pFlow::iIstream::readBegin</a></div><divclass="ttdeci">bool readBegin(const char *funcName)</div><divclass="ttdoc">Begin read of data chunk, starts with '('.</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00238">iIstream.cpp:238</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_ae74a624bbb0665ed381b67cbda681031"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#ae74a624bbb0665ed381b67cbda681031">pFlow::iIstream::findTokenAndNextSilent</a></div><divclass="ttdeci">virtual bool findTokenAndNextSilent(const word &w, word &nextW, int32 limitLine=100)</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00203">iIstream.cpp:203</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a6b741dd8443f554f5de5b98897f2eb77"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a6b741dd8443f554f5de5b98897f2eb77">pFlow::iIstream::lookupDataOrSet</a></div><divclass="ttdeci">T lookupDataOrSet(const word &keyword, const T &setVal)</div><divclass="ttdoc">lookup for keyword and data; set to setVal if lookup fails.</div><divclass="ttdef"><b>Definition:</b><ahref="iIstreamI_8hpp_source.html#l00068">iIstreamI.hpp:68</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_ac35c0ab7b3a6a0cdcf8c2bd2bf24de11"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#ac35c0ab7b3a6a0cdcf8c2bd2bf24de11">pFlow::iIstream::read</a></div><divclass="ttdeci">virtual iIstream & read(token &)=0</div><divclass="ttdoc">Return next token from stream.</div></div>
<divclass="ttc"id="aclasspFlow_1_1token_html"><divclass="ttname"><ahref="classpFlow_1_1token.html">pFlow::token</a></div><divclass="ttdoc">Token class based on OpenFOAM stream, with some modifications/simplifications to be tailored to our n...</div><divclass="ttdef"><b>Definition:</b><ahref="token_8hpp_source.html#l00044">token.hpp:44</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_ac221d9c727af08306836b43e9f250d1d"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#ac221d9c727af08306836b43e9f250d1d">pFlow::iIstream::readString</a></div><divclass="ttdeci">virtual iIstream & readString(word &)=0</div><divclass="ttdoc">Read a string.</div></div>
<divclass="ttc"id="anamespacepFlow_html_abd01e8e67e3d94cab04ecaaf4f85ac1b"><divclass="ttname"><ahref="namespacepFlow.html#abd01e8e67e3d94cab04ecaaf4f85ac1b">pFlow::uint32</a></div><divclass="ttdeci">unsigned int uint32</div><divclass="ttdef"><b>Definition:</b><ahref="builtinTypes_8hpp_source.html#l00056">builtinTypes.hpp:56</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a8d82c951160ac1444ee2a2d9ae1ecb11"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a8d82c951160ac1444ee2a2d9ae1ecb11">pFlow::iIstream::readEnd</a></div><divclass="ttdeci">bool readEnd(const char *funcName)</div><divclass="ttdoc">End read of data chunk, ends with ')' return true or FatalIOError.</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00258">iIstream.cpp:258</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_aca8c209dd4920ea633336742d8a874e0"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#aca8c209dd4920ea633336742d8a874e0">pFlow::iIstream::readEndStatement</a></div><divclass="ttdeci">char readEndStatement(const char *funcName)</div><divclass="ttdoc">End statement character ;.</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00359">iIstream.cpp:359</a></div></div>
<divclass="ttc"id="anamespacepFlow_html_a94809bdb48183ff3ef62935d56f5c1e0"><divclass="ttname"><ahref="namespacepFlow.html#a94809bdb48183ff3ef62935d56f5c1e0">pFlow::int64</a></div><divclass="ttdeci">long long int int64</div><divclass="ttdef"><b>Definition:</b><ahref="builtinTypes_8hpp_source.html#l00052">builtinTypes.hpp:52</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_afb1243cec5833e96e8446abed4e3656c"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#afb1243cec5833e96e8446abed4e3656c">pFlow::iIstream::findKeywordAndVal</a></div><divclass="ttdeci">bool findKeywordAndVal(const word &keyword, T &val, bool checkEndStatement=true)</div><divclass="ttdoc">find a pair of keyword and data terminated by ; keyword data; return false if keyword does not exist ...</div><divclass="ttdef"><b>Definition:</b><ahref="iIstreamI_8hpp_source.html#l00024">iIstreamI.hpp:24</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a6492693f26c93565e98d42c8eae7b902"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a6492693f26c93565e98d42c8eae7b902">pFlow::iIstream::findTokenSilent</a></div><divclass="ttdeci">virtual bool findTokenSilent(const word &w, int32 limitLine=100)</div><divclass="ttdoc">search for all tokesn and find the first word token that matchs</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00123">iIstream.cpp:123</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_afde1855233ba897f4bb342285f94fc87"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#afde1855233ba897f4bb342285f94fc87">pFlow::iIstream::findTokenResume</a></div><divclass="ttdeci">virtual bool findTokenResume(const word &w)</div><divclass="ttdoc">search for all tokesn after the current file position and find the first word token tbat matchs w</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00090">iIstream.cpp:90</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1token_html_ad20897c5c8bd47f5d4005989bead0e55"><divclass="ttname"><ahref="classpFlow_1_1token.html#ad20897c5c8bd47f5d4005989bead0e55">pFlow::token::reset</a></div><divclass="ttdeci">void reset()</div><divclass="ttdoc">Reset token to UNDEFINED and clear any allocated storage.</div><divclass="ttdef"><b>Definition:</b><ahref="tokenI_8hpp_source.html#l00263">tokenI.hpp:263</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_acbf88ac063eb4598338671e603f36332"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#acbf88ac063eb4598338671e603f36332">pFlow::iIstream::rewind</a></div><divclass="ttdeci">virtual void rewind()=0</div><divclass="ttdoc">Rewind the stream so that it may be read again.</div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a20e125024de459038323293b8529a99e"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a20e125024de459038323293b8529a99e">pFlow::iIstream::findTokenResumeSilent</a></div><divclass="ttdeci">virtual bool findTokenResumeSilent(const word &w, int32 limitLine=100)</div><divclass="ttdoc">search for all tokesn after the current file position and find the first word token tbat matchs w</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00129">iIstream.cpp:129</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html">pFlow::iIstream</a></div><divclass="ttdoc">Interface class for any input stream</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8hpp_source.html#l00037">iIstream.hpp:37</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a2fa0de349bf86cba54424c4a512e1e49"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a2fa0de349bf86cba54424c4a512e1e49">pFlow::iIstream::getBack</a></div><divclass="ttdeci">bool getBack(token &tok)</div><divclass="ttdoc">Get the put back token if there is one and return true.</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00045">iIstream.cpp:45</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a2240995351ba90efed8943099847069e"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a2240995351ba90efed8943099847069e">pFlow::iIstream::nextData</a></div><divclass="ttdeci">bool nextData(const word &keyword, T &data)</div><divclass="ttdoc">read the data next to keword keyword data; check the keyword is correct or not</div><divclass="ttdef"><b>Definition:</b><ahref="iIstreamI_8hpp_source.html#l00081">iIstreamI.hpp:81</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_adb9b1a5ac1aacc94b9998439303acfa7"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#adb9b1a5ac1aacc94b9998439303acfa7">pFlow::iIstream::readBeginList</a></div><divclass="ttdeci">char readBeginList(const char *funcName)</div><divclass="ttdoc">Begin read of list data, starts with '(' or '{' return starting delimiter or FatalIOError.</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00315">iIstream.cpp:315</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_afd40ff1d1c90dafaef1e905997b197c5"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#afd40ff1d1c90dafaef1e905997b197c5">pFlow::iIstream::putBack_</a></div><divclass="ttdeci">bool putBack_</div><divclass="ttdoc">Has a token been put back on the stream?</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8hpp_source.html#l00045">iIstream.hpp:45</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_aeecefbf648ad32c20134e67c4fa35597"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#aeecefbf648ad32c20134e67c4fa35597">pFlow::iIstream::putBack</a></div><divclass="ttdeci">void putBack(const token &tok)</div><divclass="ttdoc">Put back token Only a single put back is permitted.</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00023">iIstream.cpp:23</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a734799e36d009aecd57d246eb3aeb421"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a734799e36d009aecd57d246eb3aeb421">pFlow::iIstream::findTokenAndNext</a></div><divclass="ttdeci">virtual bool findTokenAndNext(const word &w, word &nextW, bool checkEndStatement=true)</div><divclass="ttdoc">search for all tokens and find the first word token and also next word token chekck if it is eneded w...</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00157">iIstream.cpp:157</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_ac40c323341736604b5bf6a67f39bce85"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#ac40c323341736604b5bf6a67f39bce85">pFlow::iIstream::operator()</a></div><divclass="ttdeci">iIstream & operator()() const</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00377">iIstream.cpp:377</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a13fa5dc14b25a1e1414e26d4d6473c7f"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a13fa5dc14b25a1e1414e26d4d6473c7f">pFlow::iIstream::resetPutBack</a></div><divclass="ttdeci">void resetPutBack()</div><divclass="ttdoc">reset the put back token;</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8hpp_source.html#l00089">iIstream.hpp:89</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_ad850abaf1a42310d4b3cc931863ca92f"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#ad850abaf1a42310d4b3cc931863ca92f">pFlow::iIstream::tell</a></div><divclass="ttdeci">virtual size_t tell()=0</div><divclass="ttdoc">Return current position indicator.</div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a214b65eedf74268aed639e4d9b36fe08"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a214b65eedf74268aed639e4d9b36fe08">pFlow::iIstream::lookupData</a></div><divclass="ttdeci">T lookupData(const word &keyword)</div><divclass="ttdoc">lookup for keyword and data; fatalExit if fails</div><divclass="ttdef"><b>Definition:</b><ahref="iIstreamI_8hpp_source.html#l00052">iIstreamI.hpp:52</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a82106c627eb5a496726f0829a62e38bb"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a82106c627eb5a496726f0829a62e38bb">pFlow::iIstream::readBeginSquare</a></div><divclass="ttdeci">bool readBeginSquare(const char *funcName)</div><divclass="ttdoc">Begin read of data chunk, starts with '('.</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00277">iIstream.cpp:277</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a43def3417e296e9f41ef52206eb2d54b"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a43def3417e296e9f41ef52206eb2d54b">pFlow::iIstream::putBackToken_</a></div><divclass="ttdeci">token putBackToken_</div><divclass="ttdoc">The last token put back on the stream.</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8hpp_source.html#l00048">iIstream.hpp:48</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a3fbb1d26a1c975ed5be8df0056c863dd"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a3fbb1d26a1c975ed5be8df0056c863dd">pFlow::iIstream::readEndList</a></div><divclass="ttdeci">char readEndList(const char *funcName)</div><divclass="ttdoc">End read of list data, ends with ')' or '}' return closing delimiter or FatalIOError.</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00336">iIstream.cpp:336</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a3eed5b1b1ab31fd1da5cfd752ca09ad9"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a3eed5b1b1ab31fd1da5cfd752ca09ad9">pFlow::iIstream::findBinaryBlockStart</a></div><divclass="ttdeci">virtual size_t findBinaryBlockStart()</div><divclass="ttdoc">It seek for a character sequence that indicates the start of a binary block char sequence is 255 255 ...</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00078">iIstream.cpp:78</a></div></div>
<divclass="ttc"id="anamespacepFlow_html_aeefdb2888fa3c58f2454ef004419e6a5"><divclass="ttname"><ahref="namespacepFlow.html#aeefdb2888fa3c58f2454ef004419e6a5">pFlow::uint64</a></div><divclass="ttdeci">unsigned long long int uint64</div><divclass="ttdef"><b>Definition:</b><ahref="builtinTypes_8hpp_source.html#l00058">builtinTypes.hpp:58</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a5f238bd4e73ce3b43b8a737a8f30ab78"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a5f238bd4e73ce3b43b8a737a8f30ab78">pFlow::iIstream::findToken</a></div><divclass="ttdeci">virtual bool findToken(const word &w)</div><divclass="ttdoc">search for all tokesn and find the first word token tbat matchs w</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00084">iIstream.cpp:84</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1IOstream_html"><divclass="ttname"><ahref="classpFlow_1_1IOstream.html">pFlow::IOstream</a></div><divclass="ttdoc">A base calss for input/output streams.</div><divclass="ttdef"><b>Definition:</b><ahref="IOstream_8hpp_source.html#l00047">IOstream.hpp:47</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a17598aa2666f2552b651085a5c6dfb23"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a17598aa2666f2552b651085a5c6dfb23">pFlow::iIstream::readEndSquare</a></div><divclass="ttdeci">bool readEndSquare(const char *funcName)</div><divclass="ttdoc">Begin read of data chunk, starts with '('.</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00296">iIstream.cpp:296</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iIstream_html_a0b2651d76dbb5d411250017f8fbe1649"><divclass="ttname"><ahref="classpFlow_1_1iIstream.html#a0b2651d76dbb5d411250017f8fbe1649">pFlow::iIstream::peekBack</a></div><divclass="ttdeci">bool peekBack(token &tok)</div><divclass="ttdoc">Peek at the put back token without removing it.</div><divclass="ttdef"><b>Definition:</b><ahref="iIstream_8cpp_source.html#l00064">iIstream.cpp:64</a></div></div>