<!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"/>
<meta name="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.">
<title>PhasicFlow: src/Integration/integration/integration.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" >
 <tbody>
 <tr>
    <td id="projectlogo"><a href="https://github.com/PhasicFlow"><img alt="Logo" src="phasicFlow_logo.png"></a></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>
<tr>
  <td id="projectbrief">
    <a href="https://https://cemf.ir">www.cemf.ir</a>
  </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('integration_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">integration.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="integration_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="integration_8hpp.html">integration.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="pointStructure_8hpp.html">pointStructure.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="repository_8hpp.html">repository.hpp</a>&quot;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<a class="code" href="classpFlow_1_1integration.html#af65ab3c37a54039dda3a3946f6d0004e">pFlow::integration::integration</a></div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="classpFlow_1_1integration.html#af65ab3c37a54039dda3a3946f6d0004e">   26</a></span>&#160;(</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="keyword">const</span> <a class="code" href="namespacepFlow.html#a0ebe792a293e8c717bddf60070c0fe99">word</a>&amp; <a class="code" href="namespacepFlow.html#a16a2137651b2c6b8ea4a8daf1d89ff61">baseName</a>,</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <a class="code" href="classpFlow_1_1pointStructure.html">pointStructure</a>&amp; <a class="code" href="setPointStructure_8hpp.html#a385e32971df44b131e4498181a949a91">pStruct</a>,</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    <span class="keyword">const</span> <a class="code" href="namespacepFlow.html#a0ebe792a293e8c717bddf60070c0fe99">word</a>&amp;,</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keyword">const</span> <a class="code" href="classpFlow_1_1Field.html">realx3Field_D</a>&amp;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;)</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;:</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    owner_(*<a class="code" href="setPointStructure_8hpp.html#a385e32971df44b131e4498181a949a91">pStruct</a>.owner()),</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    pStruct_(<a class="code" href="setPointStructure_8hpp.html#a385e32971df44b131e4498181a949a91">pStruct</a>),</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    baseName_(<a class="code" href="namespacepFlow.html#a16a2137651b2c6b8ea4a8daf1d89ff61">baseName</a>) </div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;{}</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_1uniquePtr.html">pFlow::uniquePtr&lt;pFlow::integration&gt;</a> </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <a class="code" href="classpFlow_1_1integration.html#a293e861f8b422eca2e189e4e28d73fc9">pFlow::integration::create</a></div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classpFlow_1_1integration.html#a293e861f8b422eca2e189e4e28d73fc9">   41</a></span>&#160;(</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        <span class="keyword">const</span> <a class="code" href="namespacepFlow.html#a0ebe792a293e8c717bddf60070c0fe99">word</a>&amp; <a class="code" href="namespacepFlow.html#a16a2137651b2c6b8ea4a8daf1d89ff61">baseName</a>,</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <a class="code" href="classpFlow_1_1pointStructure.html">pointStructure</a>&amp; <a class="code" href="setPointStructure_8hpp.html#a385e32971df44b131e4498181a949a91">pStruct</a>,</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <span class="keyword">const</span> <a class="code" href="namespacepFlow.html#a0ebe792a293e8c717bddf60070c0fe99">word</a>&amp; method,</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <span class="keyword">const</span> <a class="code" href="classpFlow_1_1Field.html">realx3Field_D</a>&amp; initialValField</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;)</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="keywordflow">if</span>( wordvCtorSelector_.search(method) )</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    {</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <span class="keywordflow">return</span> wordvCtorSelector_[method] (<a class="code" href="namespacepFlow.html#a16a2137651b2c6b8ea4a8daf1d89ff61">baseName</a>, <a class="code" href="setPointStructure_8hpp.html#a385e32971df44b131e4498181a949a91">pStruct</a>, method, initialValField);</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    }</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    {</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <a class="code" href="namespacepFlow.html#a9c4454c5f18c8245eaaebf2b4832eab0">printKeys</a></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;            <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="l00057"></a><span class="lineno">   57</span>&#160;            &lt;&lt;<span class="stringliteral">&quot;Avaiable ones are: \n\n&quot;</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;            ,</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;            wordvCtorSelector_</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        );</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <a class="code" href="error_8hpp.html#aad22a1cd3b45a97ac8cd195f06fe61fe">fatalExit</a>;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    }</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<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="ttdoc">Fatal exit.</div><div class="ttdef"><b>Definition:</b> <a href="error_8hpp_source.html#l00098">error.hpp:98</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#l00064">builtinTypes.hpp:64</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_1Field_html"><div class="ttname"><a href="classpFlow_1_1Field.html">pFlow::Field&lt; realx3 &gt;</a></div></div>
<div class="ttc" id="anamespacepFlow_html_a16a2137651b2c6b8ea4a8daf1d89ff61"><div class="ttname"><a href="namespacepFlow.html#a16a2137651b2c6b8ea4a8daf1d89ff61">pFlow::baseName</a></div><div class="ttdeci">word baseName(const word &amp;w, char sep='.')</div><div class="ttdoc">Find the base in a group separated by &quot;.&quot; and return it.</div><div class="ttdef"><b>Definition:</b> <a href="bTypesFunctions_8cpp_source.html#l00185">bTypesFunctions.cpp:185</a></div></div>
<div class="ttc" id="arepository_8hpp_html"><div class="ttname"><a href="repository_8hpp.html">repository.hpp</a></div></div>
<div class="ttc" id="aclasspFlow_1_1pointStructure_html"><div class="ttname"><a href="classpFlow_1_1pointStructure.html">pFlow::pointStructure</a></div><div class="ttdef"><b>Definition:</b> <a href="pointStructure_8hpp_source.html#l00034">pointStructure.hpp:34</a></div></div>
<div class="ttc" id="aclasspFlow_1_1integration_html_af65ab3c37a54039dda3a3946f6d0004e"><div class="ttname"><a href="classpFlow_1_1integration.html#af65ab3c37a54039dda3a3946f6d0004e">pFlow::integration::integration</a></div><div class="ttdeci">integration(const word &amp;baseName, pointStructure &amp;pStruct, const word &amp;method, const realx3Field_D &amp;initialValField)</div><div class="ttdoc">Construct from components.</div><div class="ttdef"><b>Definition:</b> <a href="integration_8cpp_source.html#l00026">integration.cpp:26</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="ttdoc">Report a fatal error and exit the applicaiton.</div><div class="ttdef"><b>Definition:</b> <a href="error_8hpp_source.html#l00070">error.hpp:70</a></div></div>
<div class="ttc" id="asetPointStructure_8hpp_html_a385e32971df44b131e4498181a949a91"><div class="ttname"><a href="setPointStructure_8hpp.html#a385e32971df44b131e4498181a949a91">pStruct</a></div><div class="ttdeci">auto &amp; pStruct</div><div class="ttdef"><b>Definition:</b> <a href="setPointStructure_8hpp_source.html#l00024">setPointStructure.hpp:24</a></div></div>
<div class="ttc" id="aclasspFlow_1_1uniquePtr_html"><div class="ttname"><a href="classpFlow_1_1uniquePtr.html">pFlow::uniquePtr&lt; pFlow::integration &gt;</a></div></div>
<div class="ttc" id="aintegration_8hpp_html"><div class="ttname"><a href="integration_8hpp.html">integration.hpp</a></div></div>
<div class="ttc" id="aclasspFlow_1_1integration_html_a293e861f8b422eca2e189e4e28d73fc9"><div class="ttname"><a href="classpFlow_1_1integration.html#a293e861f8b422eca2e189e4e28d73fc9">pFlow::integration::create</a></div><div class="ttdeci">static uniquePtr&lt; integration &gt; create(const word &amp;baseName, pointStructure &amp;pStruct, const word &amp;method, const realx3Field_D &amp;initialValField)</div><div class="ttdoc">Create the polymorphic object based on inputs.</div><div class="ttdef"><b>Definition:</b> <a href="integration_8cpp_source.html#l00041">integration.cpp:41</a></div></div>
<div class="ttc" id="apointStructure_8hpp_html"><div class="ttname"><a href="pointStructure_8hpp.html">pointStructure.hpp</a></div></div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_5ff0557589c78f704a7131791f9a8bc6.html">Integration</a></li><li class="navelem"><a class="el" href="dir_9daf74e2c0ea3a5224ae5f85b94b8627.html">integration</a></li><li class="navelem"><a class="el" href="integration_8cpp.html">integration.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>