<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">Logical.cpp</div></div>
</div><!--header-->
<divclass="contents">
<ahref="Logical_8cpp.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="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="l00030"></a><spanclass="lineno"> 30</span> <aclass="code"href="error_8hpp.html#aca9aa547c8441e4410a65a2ce7c21554">fatalErrorInFunction</a><<<spanclass="stringliteral">" invalid input for Logical: "</span><< l <<<aclass="code"href="namespacepFlow.html#aba8f0c455a3fdb4b05ad33a25b13b189">endl</a>;</div>
<divclass="line"><aname="l00043"></a><spanclass="lineno"> 43</span> <spanclass="keyword">auto</span> Ul = <aclass="code"href="namespacepFlow.html#a85d082a1fd1aa0dd5be3e779502475a7">toUpper</a>(l);</div>
<divclass="line"><aname="l00045"></a><spanclass="lineno"> 45</span> <spanclass="keywordflow">for</span> (<spanclass="keywordtype">int</span> i = 0; i < 4; ++i)</div>
<divclass="line"><aname="l00072"></a><spanclass="lineno"> 72</span> <<<spanclass="stringliteral">"Bad token - could not get Logical value"</span>;</div>
<divclass="line"><aname="l00079"></a><spanclass="lineno"> 79</span>  w = t.<aclass="code"href="classpFlow_1_1token.html#aa81aefc6aea3503b1eb4aefbafc8d0bc">stringToken</a>();</div>
<divclass="line"><aname="l00083"></a><spanclass="lineno"> 83</span>  w = t.<aclass="code"href="classpFlow_1_1token.html#a8658f0b0a04ffdb6e74c5af4ca27edf1">wordToken</a>();</div>
<divclass="line"><aname="l00111"></a><spanclass="lineno"><aclass="line"href="namespacepFlow.html#a3317c6444777cc7927e1fab71586c38c"> 111</a></span> <aclass="code"href="namespacepFlow.html#a85ed561d066dae339196cd058783674f">pFlow::operator>></a>(<aclass="code"href="classpFlow_1_1iIstream.html">iIstream</a>& is, <aclass="code"href="classpFlow_1_1Logical.html">Logical</a>& L)</div>
<divclass="ttc"id="aclasspFlow_1_1Logical_html_a511f818d2eebfd7be4cac008de48bc8c"><divclass="ttname"><ahref="classpFlow_1_1Logical.html#a511f818d2eebfd7be4cac008de48bc8c">pFlow::Logical::evaluteWord</a></div><divclass="ttdeci">static bool evaluteWord(const word &l, bool &b, int &yesNoSet)</div><divclass="ttdef"><b>Definition:</b><ahref="Logical_8cpp_source.html#l00041">Logical.cpp:41</a></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_1token_html_aa81aefc6aea3503b1eb4aefbafc8d0bc"><divclass="ttname"><ahref="classpFlow_1_1token.html#aa81aefc6aea3503b1eb4aefbafc8d0bc">pFlow::token::stringToken</a></div><divclass="ttdeci">const word & stringToken() const</div><divclass="ttdoc">Return const reference to the string contents.</div><divclass="ttdef"><b>Definition:</b><ahref="tokenI_8hpp_source.html#l00642">tokenI.hpp:642</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1token_html_abdcc7f96f487faadc7769afcf58fe992"><divclass="ttname"><ahref="classpFlow_1_1token.html#abdcc7f96f487faadc7769afcf58fe992">pFlow::token::good</a></div><divclass="ttdeci">bool good() const</div><divclass="ttdoc">True if token is not UNDEFINED or ERROR.</div><divclass="ttdef"><b>Definition:</b><ahref="tokenI_8hpp_source.html#l00390">tokenI.hpp:390</a></div></div>
<divclass="ttc"id="anamespacepFlow_html_a85d082a1fd1aa0dd5be3e779502475a7"><divclass="ttname"><ahref="namespacepFlow.html#a85d082a1fd1aa0dd5be3e779502475a7">pFlow::toUpper</a></div><divclass="ttdeci">word toUpper(const word &inStr)</div><divclass="ttdoc">convert a word to all caps</div><divclass="ttdef"><b>Definition:</b><ahref="bTypesFunctions_8cpp_source.html#l00043">bTypesFunctions.cpp:43</a></div></div>
<divclass="ttc"id="anamespacepFlow_html_aba8f0c455a3fdb4b05ad33a25b13b189"><divclass="ttname"><ahref="namespacepFlow.html#aba8f0c455a3fdb4b05ad33a25b13b189">pFlow::endl</a></div><divclass="ttdeci">iOstream & endl(iOstream &os)</div><divclass="ttdoc">Add newline and flush stream.</div><divclass="ttdef"><b>Definition:</b><ahref="iOstream_8hpp_source.html#l00341">iOstream.hpp:341</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1IOstream_html_a367eb3425fc4e8270e2aa961df8ac8a5"><divclass="ttname"><ahref="classpFlow_1_1IOstream.html#a367eb3425fc4e8270e2aa961df8ac8a5">pFlow::IOstream::check</a></div><divclass="ttdeci">virtual bool check(const char *operation) const</div><divclass="ttdoc">Check IOstream status for given operation.</div><divclass="ttdef"><b>Definition:</b><ahref="IOstream_8cpp_source.html#l00042">IOstream.cpp:42</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="aerror_8hpp_html_aca9aa547c8441e4410a65a2ce7c21554"><divclass="ttname"><ahref="error_8hpp.html#aca9aa547c8441e4410a65a2ce7c21554">fatalErrorInFunction</a></div><divclass="ttdeci">#define fatalErrorInFunction</div><divclass="ttdoc">Report a fatal error and function name and exit the application.</div><divclass="ttdef"><b>Definition:</b><ahref="error_8hpp_source.html#l00077">error.hpp:77</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1IOstream_html_a638b33dd25b3cd8ea7e846f04fd6a6a3"><divclass="ttname"><ahref="classpFlow_1_1IOstream.html#a638b33dd25b3cd8ea7e846f04fd6a6a3">pFlow::IOstream::setBad</a></div><divclass="ttdeci">void setBad()</div><divclass="ttdoc">Set stream to be bad.</div><divclass="ttdef"><b>Definition:</b><ahref="IOstream_8hpp_source.html#l00274">IOstream.hpp:274</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1IOstream_html_ac9b54653d0ec63ee05f64a185437b335"><divclass="ttname"><ahref="classpFlow_1_1IOstream.html#ac9b54653d0ec63ee05f64a185437b335">pFlow::IOstream::name</a></div><divclass="ttdeci">virtual const word & name() const</div><divclass="ttdoc">Return the name of the stream.</div><divclass="ttdef"><b>Definition:</b><ahref="IOstream_8cpp_source.html#l00031">IOstream.cpp:31</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1Logical_html"><divclass="ttname"><ahref="classpFlow_1_1Logical.html">pFlow::Logical</a></div><divclass="ttdoc">Holds a bool value and converts strings to bool.</div><divclass="ttdef"><b>Definition:</b><ahref="Logical_8hpp_source.html#l00039">Logical.hpp:39</a></div></div>
<divclass="ttc"id="aerror_8hpp_html_a83efa053dfcfcef04cc0e721c0314ff3"><divclass="ttname"><ahref="error_8hpp.html#a83efa053dfcfcef04cc0e721c0314ff3">ioErrorInFile</a></div><divclass="ttdeci">#define ioErrorInFile(fileName, lineNumber)</div><divclass="ttdoc">Report an error in file operation with supplied fileName and lineNumber.</div><divclass="ttdef"><b>Definition:</b><ahref="error_8hpp_source.html#l00087">error.hpp:87</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1IOstream_html_a607efe5fb94edbe4cfa890c4907e76c3"><divclass="ttname"><ahref="classpFlow_1_1IOstream.html#a607efe5fb94edbe4cfa890c4907e76c3">pFlow::IOstream::lineNumber</a></div><divclass="ttdeci">int32 lineNumber() const</div><divclass="ttdoc">Const access to the current stream line number.</div><divclass="ttdef"><b>Definition:</b><ahref="IOstream_8hpp_source.html#l00223">IOstream.hpp:223</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1Logical_html_a557853380b14ede18eb1782e21047c73"><divclass="ttname"><ahref="classpFlow_1_1Logical.html#a557853380b14ede18eb1782e21047c73">pFlow::Logical::yesNoSet_</a></div><divclass="ttdeci">int yesNoSet_</div><divclass="ttdoc">Set numbe of of Yes or No.</div><divclass="ttdef"><b>Definition:</b><ahref="Logical_8hpp_source.html#l00047">Logical.hpp:47</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1iOstream_html"><divclass="ttname"><ahref="classpFlow_1_1iOstream.html">pFlow::iOstream</a></div><divclass="ttdoc">Interface class for any output stream.</div><divclass="ttdef"><b>Definition:</b><ahref="iOstream_8hpp_source.html#l00059">iOstream.hpp:59</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1token_html_a8658f0b0a04ffdb6e74c5af4ca27edf1"><divclass="ttname"><ahref="classpFlow_1_1token.html#a8658f0b0a04ffdb6e74c5af4ca27edf1">pFlow::token::wordToken</a></div><divclass="ttdeci">const word & wordToken() const</div><divclass="ttdoc">Return const reference to the word contents.</div><divclass="ttdef"><b>Definition:</b><ahref="tokenI_8hpp_source.html#l00618">tokenI.hpp:618</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1token_html_abc9dc0708ec1aae2309621664fa8e5a4"><divclass="ttname"><ahref="classpFlow_1_1token.html#abc9dc0708ec1aae2309621664fa8e5a4">pFlow::token::isString</a></div><divclass="ttdeci">bool isString() const</div><divclass="ttdoc">Token is STRING, VARIABLE or VERBATIM string.</div><divclass="ttdef"><b>Definition:</b><ahref="tokenI_8hpp_source.html#l00633">tokenI.hpp:633</a></div></div>
<divclass="ttc"id="aclasspFlow_1_1token_html_ace6d5ecd2736d19990a7c12e0fe5a745"><divclass="ttname"><ahref="classpFlow_1_1token.html#ace6d5ecd2736d19990a7c12e0fe5a745">pFlow::token::isWord</a></div><divclass="ttdeci">bool isWord() const</div><divclass="ttdoc">Token is word or DIRECTIVE word.</div><divclass="ttdef"><b>Definition:</b><ahref="tokenI_8hpp_source.html#l00602">tokenI.hpp:602</a></div></div>