<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<title>PhasicFlow: utilities/particlesPhasicFlow/positionParticles/positionParticles.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname"><a href="www.github.com/PhasicFlow">PhasicFlow</a>
   &#160;<span id="projectnumber"><a href="www.github.com/PhasicFlow">v0.1</a></span>
   </div>
   <div id="projectbrief"><a href="https://cemf.ir">www.cemf.ir</a></div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('positionParticles_8cpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">positionParticles.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="positionParticles_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*------------------------------- phasicFlow ---------------------------------</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">      O        C enter of</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">     O O       E ngineering and</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">    O   O      M ultiscale modeling of</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">   OOOOOOO     F luid flow       </span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">------------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">  Copyright (C): www.cemf.ir</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">  email: hamid.r.norouzi AT gmail.com</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">------------------------------------------------------------------------------  </span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">Licence:</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">  This file is part of phasicFlow code. It is a free software for simulating </span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">  granular and multiphase flows. You can redistribute it and/or modify it under</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">  the terms of GNU General Public License v3 or any other later versions. </span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> </span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">  phasicFlow is distributed to help others in their research in the field of </span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">  granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">-----------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="positionParticles_8hpp.html">positionParticles.hpp</a>&quot;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="box_8hpp.html">box.hpp</a>&quot;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="cylinder_8hpp.html">cylinder.hpp</a>&quot;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="sphere_8hpp.html">sphere.hpp</a>&quot;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;cells.hpp&quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="contactSearchFunctions_8hpp.html">contactSearchFunctions.hpp</a>&quot;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="streams_8hpp.html">streams.hpp</a>&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classpFlow_1_1positionParticles.html#acaa0dff282b290a55e1ce664eefb0bbd">   31</a></span>&#160;<a class="code" href="classpFlow_1_1Vector.html">pFlow::realx3Vector</a> <a class="code" href="classpFlow_1_1positionParticles.html#acaa0dff282b290a55e1ce664eefb0bbd">pFlow::positionParticles::sortByMortonCode</a>(<a class="code" href="classpFlow_1_1Vector.html">realx3Vector</a>&amp; position)<span class="keyword">const</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keyword">struct </span><a class="code" href="structpFlow_1_1indexMorton.html">indexMorton</a></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    {</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        <span class="keywordtype">size_t</span> morton;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keywordtype">size_t</span> index;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    };</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160; </div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <a class="code" href="classpFlow_1_1triple.html">realx3</a> minP = <a class="code" href="namespacepFlow.html#aba2f2ccdd3d4a6b403a2c2d379198396">min</a>(<a class="code" href="classpFlow_1_1positionParticles.html#a843693a42017b1ec8c292940e210ca88">position</a>);</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <a class="code" href="classpFlow_1_1triple.html">realx3</a> maxP = <a class="code" href="namespacepFlow.html#ae14bf16748b3144baa1112f08c2a83b1">max</a>(<a class="code" href="classpFlow_1_1positionParticles.html#a843693a42017b1ec8c292940e210ca88">position</a>);</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <a class="code" href="namespacepFlow.html#a6192191c0e9c178a44ee1ac350fde476">real</a> cellsize = <a class="code" href="classpFlow_1_1positionParticles.html#a2a11f8c764338603f765f909cf36f250">maxDiameter</a>();</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <a class="code" href="classpFlow_1_1cells.html">cells&lt;size_t&gt;</a> allCells( <a class="code" href="classpFlow_1_1box.html">box</a>(minP, maxP), cellsize);</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160; </div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <a class="code" href="classpFlow_1_1Vector.html">Vector&lt;indexMorton&gt;</a> indMor(<a class="code" href="classpFlow_1_1positionParticles.html#a843693a42017b1ec8c292940e210ca88">position</a>.<a class="code" href="classpFlow_1_1Vector.html#a10efdf47ffedbdc720f71c2f72b98d98">size</a>(),<a class="code" href="structRESERVE.html">RESERVE</a>());</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    indMor.<a class="code" href="classpFlow_1_1Vector.html#a3e122a9f9c04a4e2dffdfabde2f1de50">clear</a>();</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160; </div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordtype">size_t</span> ind=0;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keywordflow">for</span>(<span class="keyword">const</span> <span class="keyword">auto</span>&amp; p:<a class="code" href="classpFlow_1_1positionParticles.html#a843693a42017b1ec8c292940e210ca88">position</a>)</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    {</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <span class="keyword">auto</span> cellInd = allCells.<a class="code" href="classpFlow_1_1cells.html#a6a5c6423585a7ad6ad55f6df56c459bd">pointIndex</a>(p);</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        indMor.push_back( </div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;            { <a class="code" href="namespacepFlow.html#af9e399d88da408c52c6c167b651766e5">xyzToMortonCode64</a>(cellInd.x(), cellInd.y(), cellInd.z()),</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;            ind++});</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    }</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <a class="code" href="streams_8hpp.html#a41fa3612202db2d335c330fb061e0054">INFORMATION</a>&lt;&lt;<span class="stringliteral">&quot;Performing morton sorting.&quot;</span>&lt;&lt;<a class="code" href="streams_8hpp.html#a18f2ecec3edb6662b3a89a41d3787584">endINFO</a>;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <a class="code" href="VectorFwd_8hpp.html#a7e83353786d5cf3406a036b434c7df25">std::sort</a>(</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        indMor.begin(),</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        indMor.end(),</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        []( <span class="keyword">const</span> <a class="code" href="structpFlow_1_1indexMorton.html">indexMorton</a> &amp;lhs, <span class="keyword">const</span> <a class="code" href="structpFlow_1_1indexMorton.html">indexMorton</a> &amp;rhs){</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;            return lhs.morton &lt; rhs.morton; } );</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <a class="code" href="classpFlow_1_1Vector.html">realx3Vector</a> sortedPos(<a class="code" href="classpFlow_1_1positionParticles.html#a843693a42017b1ec8c292940e210ca88">position</a>.<a class="code" href="classpFlow_1_1Vector.html#a234de5cb432c97fcb4b0f806bb86624e">capacity</a>(), <a class="code" href="structRESERVE.html">RESERVE</a>());</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    sortedPos.<a class="code" href="classpFlow_1_1Vector.html#a3e122a9f9c04a4e2dffdfabde2f1de50">clear</a>();</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160; </div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160; </div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <span class="keywordflow">for</span>(<span class="keyword">auto</span>&amp; ind:indMor)</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        sortedPos.push_back( <a class="code" href="classpFlow_1_1positionParticles.html#a843693a42017b1ec8c292940e210ca88">position</a>[ind.index] );</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    }</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160; </div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <span class="keywordflow">return</span> sortedPos;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;}</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160; </div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<a class="code" href="classpFlow_1_1positionParticles.html#a886e27b5a049d60738b9a2eae8323303">pFlow::positionParticles::positionParticles</a></div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classpFlow_1_1positionParticles.html#a886e27b5a049d60738b9a2eae8323303">   78</a></span>&#160;(</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keyword">const</span> <a class="code" href="classpFlow_1_1dictionary.html">dictionary</a>&amp; dict</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;)</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;{</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    maxNumberOfParticles_ = dict.<a class="code" href="classpFlow_1_1dictionary.html#a5585dc9a8b971fbfe2c99fdb75c5d647">getValOrSet</a>(<span class="stringliteral">&quot;maxNumberOfParticles&quot;</span>, <span class="keyword">static_cast&lt;</span><span class="keywordtype">size_t</span><span class="keyword">&gt;</span>(10000));</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    </div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    mortonSorting_ = dict.<a class="code" href="classpFlow_1_1dictionary.html#a5585dc9a8b971fbfe2c99fdb75c5d647">getValOrSet</a>(<span class="stringliteral">&quot;mortonSorting&quot;</span>, <a class="code" href="classpFlow_1_1Logical.html">Logical</a>(<span class="stringliteral">&quot;Yes&quot;</span>));</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordflow">if</span>( dict.<a class="code" href="classpFlow_1_1dictionary.html#ac17b017ed4e1be84fa2e9144946603e0">containsDictionay</a>(<span class="stringliteral">&quot;box&quot;</span>) ) </div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    {</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        region_ = makeUnique&lt;region&lt;box&gt;&gt;(dict.<a class="code" href="classpFlow_1_1dictionary.html#a630c840647a3ebefe33336cc25a8b15d">subDict</a>(<span class="stringliteral">&quot;box&quot;</span>));</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    }</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span>(dict.<a class="code" href="classpFlow_1_1dictionary.html#ac17b017ed4e1be84fa2e9144946603e0">containsDictionay</a>(<span class="stringliteral">&quot;cylinder&quot;</span>))</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    {</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        region_ = makeUnique&lt;region&lt;cylinder&gt;&gt;(dict.<a class="code" href="classpFlow_1_1dictionary.html#a630c840647a3ebefe33336cc25a8b15d">subDict</a>(<span class="stringliteral">&quot;cylinder&quot;</span>));</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    }</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span>(dict.<a class="code" href="classpFlow_1_1dictionary.html#ac17b017ed4e1be84fa2e9144946603e0">containsDictionay</a>(<span class="stringliteral">&quot;sphere&quot;</span>))</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    {</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        region_ = makeUnique&lt;region&lt;sphere&gt;&gt;(dict.<a class="code" href="classpFlow_1_1dictionary.html#a630c840647a3ebefe33336cc25a8b15d">subDict</a>(<span class="stringliteral">&quot;sphere&quot;</span>));</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    }</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;}</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160; </div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160; </div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="classpFlow_1_1positionParticles.html#adaf43bf7eef63499afd8a277636d8114">  101</a></span>&#160;<a class="code" href="classpFlow_1_1Vector.html">pFlow::realx3Vector</a> <a class="code" href="classpFlow_1_1positionParticles.html#adaf43bf7eef63499afd8a277636d8114">pFlow::positionParticles::getFinalPosition</a>()</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;{</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keywordflow">if</span>(mortonSorting_)</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    {</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="keywordflow">return</span> sortByMortonCode(position());</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    }</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    {</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <a class="code" href="classpFlow_1_1Vector.html">realx3Vector</a> vec(position().capacity(), <a class="code" href="structRESERVE.html">RESERVE</a>());</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        vec.assign( position().begin(), position().end());</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        </div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <span class="keywordflow">return</span> std::move(vec);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    }</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;}</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160; </div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<a class="code" href="classpFlow_1_1uniquePtr.html">pFlow::uniquePtr&lt;pFlow::positionParticles&gt;</a> </div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="classpFlow_1_1positionParticles.html#a87c69e797a0bb2d2636d1d1a5146a570">  117</a></span>&#160;    <a class="code" href="classpFlow_1_1positionParticles.html#a87c69e797a0bb2d2636d1d1a5146a570">pFlow::positionParticles::create</a>(<span class="keyword">const</span> <a class="code" href="classpFlow_1_1dictionary.html">dictionary</a> &amp; dict)</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;{</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160; </div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <a class="code" href="namespacepFlow.html#a0ebe792a293e8c717bddf60070c0fe99">word</a> method = dict.<a class="code" href="classpFlow_1_1dictionary.html#a523bcff98ab38f3c5961e56eeb0b1d47">getVal</a>&lt;<a class="code" href="namespacepFlow.html#a0ebe792a293e8c717bddf60070c0fe99">word</a>&gt;(<span class="stringliteral">&quot;method&quot;</span>);</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160; </div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="keywordflow">if</span>( dictionaryvCtorSelector_.search(method) )</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    {</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        <span class="keywordflow">return</span> dictionaryvCtorSelector_[method] (dict);</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    }</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    {</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <a class="code" href="namespacepFlow.html#a9c4454c5f18c8245eaaebf2b4832eab0">printKeys</a></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        ( </div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;            <a class="code" href="error_8hpp.html#adfe9ae1313e6913aca3f96d3eb67906e">fatalError</a> &lt;&lt; <span class="stringliteral">&quot;Ctor Selector &quot;</span>&lt;&lt; method &lt;&lt; <span class="stringliteral">&quot; dose not exist. \n&quot;</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;            &lt;&lt;<span class="stringliteral">&quot;Avaiable ones are: \n\n&quot;</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            ,</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;            dictionaryvCtorSelector_</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        );</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        <a class="code" href="error_8hpp.html#aad22a1cd3b45a97ac8cd195f06fe61fe">fatalExit</a>;</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    }</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclasspFlow_1_1dictionary_html_a5585dc9a8b971fbfe2c99fdb75c5d647"><div class="ttname"><a href="classpFlow_1_1dictionary.html#a5585dc9a8b971fbfe2c99fdb75c5d647">pFlow::dictionary::getValOrSet</a></div><div class="ttdeci">T getValOrSet(const word &amp;keyword, const T &amp;setVal) const</div><div class="ttdef"><b>Definition:</b> <a href="dictionary_8hpp_source.html#l00325">dictionary.hpp:325</a></div></div>
<div class="ttc" id="anamespacepFlow_html_a6192191c0e9c178a44ee1ac350fde476"><div class="ttname"><a href="namespacepFlow.html#a6192191c0e9c178a44ee1ac350fde476">pFlow::real</a></div><div class="ttdeci">float real</div><div class="ttdef"><b>Definition:</b> <a href="builtinTypes_8hpp_source.html#l00046">builtinTypes.hpp:46</a></div></div>
<div class="ttc" id="aerror_8hpp_html_aad22a1cd3b45a97ac8cd195f06fe61fe"><div class="ttname"><a href="error_8hpp.html#aad22a1cd3b45a97ac8cd195f06fe61fe">fatalExit</a></div><div class="ttdeci">#define fatalExit</div><div class="ttdef"><b>Definition:</b> <a href="error_8hpp_source.html#l00057">error.hpp:57</a></div></div>
<div class="ttc" id="aclasspFlow_1_1positionParticles_html_a87c69e797a0bb2d2636d1d1a5146a570"><div class="ttname"><a href="classpFlow_1_1positionParticles.html#a87c69e797a0bb2d2636d1d1a5146a570">pFlow::positionParticles::create</a></div><div class="ttdeci">static uniquePtr&lt; positionParticles &gt; create(const dictionary &amp;dict)</div><div class="ttdef"><b>Definition:</b> <a href="positionParticles_8cpp_source.html#l00117">positionParticles.cpp:117</a></div></div>
<div class="ttc" id="acontactSearchFunctions_8hpp_html"><div class="ttname"><a href="contactSearchFunctions_8hpp.html">contactSearchFunctions.hpp</a></div></div>
<div class="ttc" id="anamespacepFlow_html_a0ebe792a293e8c717bddf60070c0fe99"><div class="ttname"><a href="namespacepFlow.html#a0ebe792a293e8c717bddf60070c0fe99">pFlow::word</a></div><div class="ttdeci">std::string word</div><div class="ttdef"><b>Definition:</b> <a href="builtinTypes_8hpp_source.html#l00063">builtinTypes.hpp:63</a></div></div>
<div class="ttc" id="abox_8hpp_html"><div class="ttname"><a href="box_8hpp.html">box.hpp</a></div></div>
<div class="ttc" id="anamespacepFlow_html_a9c4454c5f18c8245eaaebf2b4832eab0"><div class="ttname"><a href="namespacepFlow.html#a9c4454c5f18c8245eaaebf2b4832eab0">pFlow::printKeys</a></div><div class="ttdeci">iOstream &amp; printKeys(iOstream &amp;os, const wordHashMap&lt; T &gt; &amp;m)</div></div>
<div class="ttc" id="aclasspFlow_1_1Vector_html_a10efdf47ffedbdc720f71c2f72b98d98"><div class="ttname"><a href="classpFlow_1_1Vector.html#a10efdf47ffedbdc720f71c2f72b98d98">pFlow::Vector::size</a></div><div class="ttdeci">auto size() const</div><div class="ttdef"><b>Definition:</b> <a href="Vector_8hpp_source.html#l00301">Vector.hpp:301</a></div></div>
<div class="ttc" id="astructpFlow_1_1indexMorton_html"><div class="ttname"><a href="structpFlow_1_1indexMorton.html">pFlow::indexMorton</a></div><div class="ttdef"><b>Definition:</b> <a href="mortonIndexing_8hpp_source.html#l00079">mortonIndexing.hpp:79</a></div></div>
<div class="ttc" id="aclasspFlow_1_1dictionary_html_ac17b017ed4e1be84fa2e9144946603e0"><div class="ttname"><a href="classpFlow_1_1dictionary.html#ac17b017ed4e1be84fa2e9144946603e0">pFlow::dictionary::containsDictionay</a></div><div class="ttdeci">bool containsDictionay(const word &amp;name) const</div><div class="ttdef"><b>Definition:</b> <a href="dictionary_8cpp_source.html#l00736">dictionary.cpp:736</a></div></div>
<div class="ttc" id="astructRESERVE_html"><div class="ttname"><a href="structRESERVE.html">RESERVE</a></div><div class="ttdef"><b>Definition:</b> <a href="Vector_8hpp_source.html#l00038">Vector.hpp:38</a></div></div>
<div class="ttc" id="aclasspFlow_1_1positionParticles_html_a886e27b5a049d60738b9a2eae8323303"><div class="ttname"><a href="classpFlow_1_1positionParticles.html#a886e27b5a049d60738b9a2eae8323303">pFlow::positionParticles::positionParticles</a></div><div class="ttdeci">positionParticles(const dictionary &amp;dict)</div><div class="ttdef"><b>Definition:</b> <a href="positionParticles_8cpp_source.html#l00078">positionParticles.cpp:78</a></div></div>
<div class="ttc" id="aclasspFlow_1_1Vector_html_a234de5cb432c97fcb4b0f806bb86624e"><div class="ttname"><a href="classpFlow_1_1Vector.html#a234de5cb432c97fcb4b0f806bb86624e">pFlow::Vector::capacity</a></div><div class="ttdeci">auto capacity() const</div><div class="ttdef"><b>Definition:</b> <a href="Vector_8hpp_source.html#l00306">Vector.hpp:306</a></div></div>
<div class="ttc" id="aclasspFlow_1_1positionParticles_html_a843693a42017b1ec8c292940e210ca88"><div class="ttname"><a href="classpFlow_1_1positionParticles.html#a843693a42017b1ec8c292940e210ca88">pFlow::positionParticles::position</a></div><div class="ttdeci">virtual const realx3Vector &amp; position() const =0</div></div>
<div class="ttc" id="aclasspFlow_1_1positionParticles_html_a2a11f8c764338603f765f909cf36f250"><div class="ttname"><a href="classpFlow_1_1positionParticles.html#a2a11f8c764338603f765f909cf36f250">pFlow::positionParticles::maxDiameter</a></div><div class="ttdeci">virtual real maxDiameter() const =0</div></div>
<div class="ttc" id="anamespacepFlow_html_af9e399d88da408c52c6c167b651766e5"><div class="ttname"><a href="namespacepFlow.html#af9e399d88da408c52c6c167b651766e5">pFlow::xyzToMortonCode64</a></div><div class="ttdeci">INLINE_FUNCTION_HD uint64_t xyzToMortonCode64(uint64_t x, uint64_t y, uint64_t z)</div><div class="ttdef"><b>Definition:</b> <a href="contactSearchFunctions_8hpp_source.html#l00042">contactSearchFunctions.hpp:42</a></div></div>
<div class="ttc" id="aerror_8hpp_html_adfe9ae1313e6913aca3f96d3eb67906e"><div class="ttname"><a href="error_8hpp.html#adfe9ae1313e6913aca3f96d3eb67906e">fatalError</a></div><div class="ttdeci">#define fatalError</div><div class="ttdef"><b>Definition:</b> <a href="error_8hpp_source.html#l00036">error.hpp:36</a></div></div>
<div class="ttc" id="aclasspFlow_1_1dictionary_html_a630c840647a3ebefe33336cc25a8b15d"><div class="ttname"><a href="classpFlow_1_1dictionary.html#a630c840647a3ebefe33336cc25a8b15d">pFlow::dictionary::subDict</a></div><div class="ttdeci">dictionary &amp; subDict(const word &amp;keyword)</div><div class="ttdef"><b>Definition:</b> <a href="dictionary_8cpp_source.html#l00547">dictionary.cpp:547</a></div></div>
<div class="ttc" id="astreams_8hpp_html"><div class="ttname"><a href="streams_8hpp.html">streams.hpp</a></div></div>
<div class="ttc" id="aVectorFwd_8hpp_html_a7e83353786d5cf3406a036b434c7df25"><div class="ttname"><a href="VectorFwd_8hpp.html#a7e83353786d5cf3406a036b434c7df25">sort</a></div><div class="ttdeci">void sort(Vector&lt; T, Allocator &gt; &amp;vec)</div></div>
<div class="ttc" id="asphere_8hpp_html"><div class="ttname"><a href="sphere_8hpp.html">sphere.hpp</a></div></div>
<div class="ttc" id="anamespacepFlow_html_ae14bf16748b3144baa1112f08c2a83b1"><div class="ttname"><a href="namespacepFlow.html#ae14bf16748b3144baa1112f08c2a83b1">pFlow::max</a></div><div class="ttdeci">T max(const Vector&lt; T, Allocator &gt; &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="VectorMath_8hpp_source.html#l00164">VectorMath.hpp:164</a></div></div>
<div class="ttc" id="aclasspFlow_1_1dictionary_html_a523bcff98ab38f3c5961e56eeb0b1d47"><div class="ttname"><a href="classpFlow_1_1dictionary.html#a523bcff98ab38f3c5961e56eeb0b1d47">pFlow::dictionary::getVal</a></div><div class="ttdeci">T getVal(const word &amp;keyword) const</div><div class="ttdef"><b>Definition:</b> <a href="dictionary_8hpp_source.html#l00309">dictionary.hpp:309</a></div></div>
<div class="ttc" id="aclasspFlow_1_1Vector_html_a3e122a9f9c04a4e2dffdfabde2f1de50"><div class="ttname"><a href="classpFlow_1_1Vector.html#a3e122a9f9c04a4e2dffdfabde2f1de50">pFlow::Vector::clear</a></div><div class="ttdeci">auto clear()</div><div class="ttdef"><b>Definition:</b> <a href="Vector_8hpp_source.html#l00248">Vector.hpp:248</a></div></div>
<div class="ttc" id="aclasspFlow_1_1Logical_html"><div class="ttname"><a href="classpFlow_1_1Logical.html">pFlow::Logical</a></div><div class="ttdef"><b>Definition:</b> <a href="Logical_8hpp_source.html#l00035">Logical.hpp:35</a></div></div>
<div class="ttc" id="aclasspFlow_1_1box_html"><div class="ttname"><a href="classpFlow_1_1box.html">pFlow::box</a></div><div class="ttdef"><b>Definition:</b> <a href="box_8hpp_source.html#l00032">box.hpp:32</a></div></div>
<div class="ttc" id="aclasspFlow_1_1uniquePtr_html"><div class="ttname"><a href="classpFlow_1_1uniquePtr.html">pFlow::uniquePtr</a></div><div class="ttdef"><b>Definition:</b> <a href="uniquePtr_8hpp_source.html#l00044">uniquePtr.hpp:44</a></div></div>
<div class="ttc" id="aclasspFlow_1_1positionParticles_html_adaf43bf7eef63499afd8a277636d8114"><div class="ttname"><a href="classpFlow_1_1positionParticles.html#adaf43bf7eef63499afd8a277636d8114">pFlow::positionParticles::getFinalPosition</a></div><div class="ttdeci">virtual realx3Vector getFinalPosition()</div><div class="ttdef"><b>Definition:</b> <a href="positionParticles_8cpp_source.html#l00101">positionParticles.cpp:101</a></div></div>
<div class="ttc" id="aclasspFlow_1_1positionParticles_html_acaa0dff282b290a55e1ce664eefb0bbd"><div class="ttname"><a href="classpFlow_1_1positionParticles.html#acaa0dff282b290a55e1ce664eefb0bbd">pFlow::positionParticles::sortByMortonCode</a></div><div class="ttdeci">realx3Vector sortByMortonCode(realx3Vector &amp;position) const</div><div class="ttdef"><b>Definition:</b> <a href="positionParticles_8cpp_source.html#l00031">positionParticles.cpp:31</a></div></div>
<div class="ttc" id="acylinder_8hpp_html"><div class="ttname"><a href="cylinder_8hpp.html">cylinder.hpp</a></div></div>
<div class="ttc" id="aclasspFlow_1_1cells_html"><div class="ttname"><a href="classpFlow_1_1cells.html">pFlow::cells</a></div><div class="ttdef"><b>Definition:</b> <a href="Interaction_2contactSearch_2cells_8hpp_source.html#l00032">cells.hpp:32</a></div></div>
<div class="ttc" id="aclasspFlow_1_1triple_html"><div class="ttname"><a href="classpFlow_1_1triple.html">pFlow::triple&lt; real &gt;</a></div></div>
<div class="ttc" id="aclasspFlow_1_1cells_html_a6a5c6423585a7ad6ad55f6df56c459bd"><div class="ttname"><a href="classpFlow_1_1cells.html#a6a5c6423585a7ad6ad55f6df56c459bd">pFlow::cells::pointIndex</a></div><div class="ttdeci">INLINE_FUNCTION_HD CellType pointIndex(const realx3 &amp;p) const</div><div class="ttdef"><b>Definition:</b> <a href="Interaction_2contactSearch_2cells_8hpp_source.html#l00158">cells.hpp:158</a></div></div>
<div class="ttc" id="aclasspFlow_1_1Vector_html"><div class="ttname"><a href="classpFlow_1_1Vector.html">pFlow::Vector&lt; realx3 &gt;</a></div></div>
<div class="ttc" id="astreams_8hpp_html_a18f2ecec3edb6662b3a89a41d3787584"><div class="ttname"><a href="streams_8hpp.html#a18f2ecec3edb6662b3a89a41d3787584">endINFO</a></div><div class="ttdeci">#define endINFO</div><div class="ttdef"><b>Definition:</b> <a href="streams_8hpp_source.html#l00038">streams.hpp:38</a></div></div>
<div class="ttc" id="apositionParticles_8hpp_html"><div class="ttname"><a href="positionParticles_8hpp.html">positionParticles.hpp</a></div></div>
<div class="ttc" id="anamespacepFlow_html_aba2f2ccdd3d4a6b403a2c2d379198396"><div class="ttname"><a href="namespacepFlow.html#aba2f2ccdd3d4a6b403a2c2d379198396">pFlow::min</a></div><div class="ttdeci">T min(const Vector&lt; T, Allocator &gt; &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="VectorMath_8hpp_source.html#l00138">VectorMath.hpp:138</a></div></div>
<div class="ttc" id="aclasspFlow_1_1dictionary_html"><div class="ttname"><a href="classpFlow_1_1dictionary.html">pFlow::dictionary</a></div><div class="ttdef"><b>Definition:</b> <a href="dictionary_8hpp_source.html#l00038">dictionary.hpp:38</a></div></div>
<div class="ttc" id="astreams_8hpp_html_a41fa3612202db2d335c330fb061e0054"><div class="ttname"><a href="streams_8hpp.html#a41fa3612202db2d335c330fb061e0054">INFORMATION</a></div><div class="ttdeci">#define INFORMATION</div><div class="ttdef"><b>Definition:</b> <a href="streams_8hpp_source.html#l00037">streams.hpp:37</a></div></div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_df38b2a5d584e0f6066b4518b95c638b.html">utilities</a></li><li class="navelem"><a class="el" href="dir_e8a3110d50afa743b849d63edd99c1b4.html">particlesPhasicFlow</a></li><li class="navelem"><a class="el" href="dir_f173282f05c0c49113faf78faa060b26.html">positionParticles</a></li><li class="navelem"><a class="el" href="positionParticles_8cpp.html">positionParticles.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>