<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>dfnTrans: /Users/nataliia/Desktop/dfnGen-docs/Docs_PT/ParticleTracking_source/VelocityReconstruction.c File Reference</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>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</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>
<link href="../../doxygen.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">dfnTrans
   </div>
   <div id="projectbrief">Code for Particle Tracking simulations in 3D DFN</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<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>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</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('d2/d79/_velocity_reconstruction_8c.html','../../');});
/* @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="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">VelocityReconstruction.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;search.h&gt;</code><br />
<code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;math.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &quot;<a class="el" href="../../d0/d75/_func_def_8h_source.html">FuncDef.h</a>&quot;</code><br />
<code>#include &lt;unistd.h&gt;</code><br />
</div>
<p><a href="../../d2/d79/_velocity_reconstruction_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d36/structlb.html">lb</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d79/structmatr.html">matr</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d26/structinpfile.html">inpfile</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a6c0b7207a055a56ec2091b578dcab307"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d79/_velocity_reconstruction_8c.html#a6c0b7207a055a56ec2091b578dcab307">DarcyVelocity</a> ()</td></tr>
<tr class="separator:a6c0b7207a055a56ec2091b578dcab307"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae95808a34380ac01e823c78d8a708eb3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d79/_velocity_reconstruction_8c.html#ae95808a34380ac01e823c78d8a708eb3">OutputVelocities</a> ()</td></tr>
<tr class="separator:ae95808a34380ac01e823c78d8a708eb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9847c8edcfa5f9fd5426106a7477f935"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="../../d3/d79/structmatr.html">matr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d79/_velocity_reconstruction_8c.html#a9847c8edcfa5f9fd5426106a7477f935">MatrixProducts</a> (double normxarea[][2], int number)</td></tr>
<tr class="separator:a9847c8edcfa5f9fd5426106a7477f935"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc3803bef1f2fcc10f4f2a0ecc627b34"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="../../d3/d36/structlb.html">lb</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d79/_velocity_reconstruction_8c.html#acc3803bef1f2fcc10f4f2a0ecc627b34">DefineBoundaryAngle</a> (int i, unsigned int edge_1, unsigned int edge_2, int f1, int coorf)</td></tr>
<tr class="separator:acc3803bef1f2fcc10f4f2a0ecc627b34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3759fb98594fea9a5c180b9d2324e027"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d79/_velocity_reconstruction_8c.html#a3759fb98594fea9a5c180b9d2324e027">DefineAngle</a> (double u1, double u2, double v1, double v2)</td></tr>
<tr class="separator:a3759fb98594fea9a5c180b9d2324e027"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b5dc793aa9d2613949a5134c379e606"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d79/_velocity_reconstruction_8c.html#a4b5dc793aa9d2613949a5134c379e606">VelocityInteriorNode</a> (double normx_area[][2], int i, int number, unsigned int indj[<a class="el" href="../../d0/d29/main_8c.html#a9bbb8dd86b166646cdce87a545a36fa7">max_neighb</a>], int vi)</td></tr>
<tr class="separator:a4b5dc793aa9d2613949a5134c379e606"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb7186f480640c540eec15220968f12d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d79/_velocity_reconstruction_8c.html#adb7186f480640c540eec15220968f12d">VelocityExteriorNode</a> (double norm_xarea[][2], int i, int number, unsigned int indj[<a class="el" href="../../d0/d29/main_8c.html#a9bbb8dd86b166646cdce87a545a36fa7">max_neighb</a>], struct <a class="el" href="../../d3/d36/structlb.html">lb</a> lbound, int vi)</td></tr>
<tr class="separator:adb7186f480640c540eec15220968f12d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a638a294e89812e3847446ff830b717f9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d79/_velocity_reconstruction_8c.html#a638a294e89812e3847446ff830b717f9">BoundaryCells</a> ()</td></tr>
<tr class="separator:a638a294e89812e3847446ff830b717f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54da61c82947f6b18230d9d49a15d3b5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d79/_velocity_reconstruction_8c.html#a54da61c82947f6b18230d9d49a15d3b5">CornerVelocity</a> (int i, int m1, int m2, int m3, int s1, int s2, int s3)</td></tr>
<tr class="separator:a54da61c82947f6b18230d9d49a15d3b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5445e2c235239b89cc51146de36ca58f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d79/_velocity_reconstruction_8c.html#a5445e2c235239b89cc51146de36ca58f">XindexC</a> (int nodenum, int ii)</td></tr>
<tr class="separator:a5445e2c235239b89cc51146de36ca58f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11a6fda3ecb0ede2c4a9a8e96e23145d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d79/_velocity_reconstruction_8c.html#a11a6fda3ecb0ede2c4a9a8e96e23145d">YindexC</a> (int nodenum, int ii)</td></tr>
<tr class="separator:a11a6fda3ecb0ede2c4a9a8e96e23145d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0210252e558723368a0288b57b6136ea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d79/_velocity_reconstruction_8c.html#a0210252e558723368a0288b57b6136ea">HalfPolygonVelocity</a> (int i, int k, int fractn, int indc, unsigned int fractj[<a class="el" href="../../d0/d29/main_8c.html#a9bbb8dd86b166646cdce87a545a36fa7">max_neighb</a>])</td></tr>
<tr class="separator:a0210252e558723368a0288b57b6136ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a638a294e89812e3847446ff830b717f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a638a294e89812e3847446ff830b717f9">&#9670;&nbsp;</a></span>BoundaryCells()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void BoundaryCells </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The function checks velocities at boundary nodes and fixes pathological cases.</p>
<p>In the rare event, when two velocity vectors are directed towards each other along the same cell edge, a particle will be stuck there. To avoid this situation, one of velocities is redirected along the edge with node associated with lower pressure value. </p>

<p class="definition">Definition at line <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00531">531</a> of file <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html">VelocityReconstruction.c</a>.</p>

<p class="reference">References <a class="el" href="../../d0/d29/main_8c_source.html#l00042">cell</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00139">vertex::cells</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00118">vertex::coord_xy</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00771">CornerVelocity()</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00415">DefineAngle()</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00039">fracture</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00136">vertex::indnodes</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00030">ncells</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00040">node</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00167">element::node_ind</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00127">vertex::numneighb</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00002">pi</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00124">vertex::pressure</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00170">element::veloc_ind</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00130">vertex::velocity</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00922">XindexC()</a>, and <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00933">YindexC()</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00029">DarcyVelocity()</a>.</p>

</div>
</div>
<a id="a54da61c82947f6b18230d9d49a15d3b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54da61c82947f6b18230d9d49a15d3b5">&#9670;&nbsp;</a></span>CornerVelocity()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int CornerVelocity </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>m1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>m2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>m3</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>s1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>s2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>s3</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The Function identifies pathologycal cases at corner of fracture boundary. The angle between velocity on corner node and velocities/edges on surrounding boundary nodes are calculated. Then, if velocity is pointing outside of fracture, turns the velocity direction along the fracture edge. </p>

<p class="definition">Definition at line <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00771">771</a> of file <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html">VelocityReconstruction.c</a>.</p>

<p class="reference">References <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00118">vertex::coord_xy</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00415">DefineAngle()</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00040">node</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00002">pi</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00130">vertex::velocity</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00922">XindexC()</a>, and <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00933">YindexC()</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00531">BoundaryCells()</a>.</p>

</div>
</div>
<a id="a6c0b7207a055a56ec2091b578dcab307"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c0b7207a055a56ec2091b578dcab307">&#9670;&nbsp;</a></span>DarcyVelocity()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DarcyVelocity </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function performs Darcy's velocity reconstruction (main function of Darcy velocities reconstruction procedure) using linear least square algorithm. Flow solver provides flow fluxes on each edge of control volume cells. Velocity on each control volume cell center (each node) is reconstructed using flow fluxes.</p>
<p>Velocity of interior and interior-interface nodes is reconstructed according to Eq.5 (Painter,2011); exterior node' velocity according to Eq.7 (Painter, 2011)</p>
<p>Function makes a loop over all nodes and calls functions for velocity reconstruction depending of type of the node (external, internal, internal-interface, external interface) </p>

<p class="definition">Definition at line <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00029">29</a> of file <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html">VelocityReconstruction.c</a>.</p>

<p class="reference">References <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00531">BoundaryCells()</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00118">vertex::coord_xy</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00367">DefineBoundaryAngle()</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00028">fehm</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00112">vertex::fracture</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00039">fracture</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00944">HalfPolygonVelocity()</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00136">vertex::indnodes</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00032">max_neighb</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00029">nnodes</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00040">node</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00127">vertex::numneighb</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00027">pflotran</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00130">vertex::velocity</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00465">VelocityExteriorNode()</a>, and <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00426">VelocityInteriorNode()</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d0/d29/main_8c_source.html#l00066">main()</a>.</p>

</div>
</div>
<a id="a3759fb98594fea9a5c180b9d2324e027"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3759fb98594fea9a5c180b9d2324e027">&#9670;&nbsp;</a></span>DefineAngle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double DefineAngle </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>u1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>u2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>v1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>v2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function defines an angle between two edges of voronoy cell </p>

<p class="definition">Definition at line <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00415">415</a> of file <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html">VelocityReconstruction.c</a>.</p>

<p class="reference">References <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00011">lb::angle</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00531">BoundaryCells()</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00771">CornerVelocity()</a>, and <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00367">DefineBoundaryAngle()</a>.</p>

</div>
</div>
<a id="acc3803bef1f2fcc10f4f2a0ecc627b34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc3803bef1f2fcc10f4f2a0ecc627b34">&#9670;&nbsp;</a></span>DefineBoundaryAngle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="../../d3/d36/structlb.html">lb</a> DefineBoundaryAngle </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>edge_1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>edge_2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>f1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>coorf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The function defines angle between two edges of a boundary cell and return the result. The angle is used in flow velocity reconstruction on fracture edge. </p>

<p class="definition">Definition at line <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00367">367</a> of file <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html">VelocityReconstruction.c</a>.</p>

<p class="reference">References <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00011">lb::angle</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00118">vertex::coord_xy</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00415">DefineAngle()</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00039">fracture</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00136">vertex::indnodes</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00010">lb::length_b</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00040">node</a>, and <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00012">lb::norm</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00029">DarcyVelocity()</a>, and <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00944">HalfPolygonVelocity()</a>.</p>

</div>
</div>
<a id="a0210252e558723368a0288b57b6136ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0210252e558723368a0288b57b6136ea">&#9670;&nbsp;</a></span>HalfPolygonVelocity()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void HalfPolygonVelocity </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fractn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>indc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>fractj</em>[max_neighb]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Velocity reconstruction on an intersection node. In this case, the control volume cell is devided onto two polygons by intersection line. The velocity reconstruction is performed on each part of control volume cell at intersection. </p>

<p class="definition">Definition at line <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00944">944</a> of file <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html">VelocityReconstruction.c</a>.</p>

<p class="reference">References <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00151">vertex::area</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00042">cell</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00139">vertex::cells</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00118">vertex::coord_xy</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00367">DefineBoundaryAngle()</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00028">fehm</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00039">fracture</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00136">vertex::indnodes</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00032">max_neighb</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00040">node</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00027">pflotran</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00145">vertex::type</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00109">vertex::typeN</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00170">element::veloc_ind</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00465">VelocityExteriorNode()</a>, and <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00426">VelocityInteriorNode()</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00029">DarcyVelocity()</a>.</p>

</div>
</div>
<a id="a9847c8edcfa5f9fd5426106a7477f935"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9847c8edcfa5f9fd5426106a7477f935">&#9670;&nbsp;</a></span>MatrixProducts()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="../../d3/d79/structmatr.html">matr</a> MatrixProducts </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>normxarea</em>[][2], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>number</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function performs matrix dot product (GTG)-1 and returns the result. </p>

<p class="definition">Definition at line <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00318">318</a> of file <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html">VelocityReconstruction.c</a>.</p>

<p class="reference">References <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00017">matr::matinv</a>, and <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00016">matr::matrinvG</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00465">VelocityExteriorNode()</a>, and <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00426">VelocityInteriorNode()</a>.</p>

</div>
</div>
<a id="ae95808a34380ac01e823c78d8a708eb3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae95808a34380ac01e823c78d8a708eb3">&#9670;&nbsp;</a></span>OutputVelocities()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void OutputVelocities </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function is called to output velocities on nodes in the order of fractture IDs. The output can be used to visualise flow field of 2D reconstructed Darcy velocities in 3D simulation domain </p>

<p class="definition">Definition at line <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00253">253</a> of file <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html">VelocityReconstruction.c</a>.</p>

<p class="reference">References <a class="el" href="../../d0/d29/main_8c_source.html#l00039">fracture</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00043">maindir</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00031">nfract</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00029">nnodes</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00040">node</a>, and <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00130">vertex::velocity</a>.</p>

</div>
</div>
<a id="adb7186f480640c540eec15220968f12d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb7186f480640c540eec15220968f12d">&#9670;&nbsp;</a></span>VelocityExteriorNode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void VelocityExteriorNode </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>norm_xarea</em>[][2], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>indj</em>[max_neighb], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="../../d3/d36/structlb.html">lb</a>&#160;</td>
          <td class="paramname"><em>lbound</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>vi</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The function reconstructs Darcy velocity on exterior (boundary) node </p>

<p class="definition">Definition at line <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00465">465</a> of file <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html">VelocityReconstruction.c</a>.</p>

<p class="reference">References <a class="el" href="../../d0/d29/main_8c_source.html#l00047">density</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00148">vertex::flux</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00010">lb::length_b</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00017">matr::matinv</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00016">matr::matrinvG</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00318">MatrixProducts()</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00040">node</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00012">lb::norm</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00046">porosity</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00051">timeunit</a>, and <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00130">vertex::velocity</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00029">DarcyVelocity()</a>, and <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00944">HalfPolygonVelocity()</a>.</p>

</div>
</div>
<a id="a4b5dc793aa9d2613949a5134c379e606"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b5dc793aa9d2613949a5134c379e606">&#9670;&nbsp;</a></span>VelocityInteriorNode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void VelocityInteriorNode </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>normx_area</em>[][2], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>indj</em>[max_neighb], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>vi</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The function reconstructs Darcy velocity on interior cell center, at interior node </p>

<p class="definition">Definition at line <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00426">426</a> of file <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html">VelocityReconstruction.c</a>.</p>

<p class="reference">References <a class="el" href="../../d0/d29/main_8c_source.html#l00047">density</a>, <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00148">vertex::flux</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00017">matr::matinv</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00016">matr::matrinvG</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00318">MatrixProducts()</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00040">node</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00046">porosity</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00051">timeunit</a>, and <a class="el" href="../../d0/d75/_func_def_8h_source.html#l00130">vertex::velocity</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00029">DarcyVelocity()</a>, and <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00944">HalfPolygonVelocity()</a>.</p>

</div>
</div>
<a id="a5445e2c235239b89cc51146de36ca58f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5445e2c235239b89cc51146de36ca58f">&#9670;&nbsp;</a></span>XindexC()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XindexC </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nodenum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ii</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Functions returns the index of X coordination of intersection node (cells) </p>

<p class="definition">Definition at line <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00922">922</a> of file <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html">VelocityReconstruction.c</a>.</p>

<p class="reference">References <a class="el" href="../../d0/d29/main_8c_source.html#l00042">cell</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00039">fracture</a>, and <a class="el" href="../../d0/d29/main_8c_source.html#l00040">node</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d6/d2c/_tracking_part_8c_source.html#l02013">AcrossIntersection()</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00531">BoundaryCells()</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00771">CornerVelocity()</a>, and <a class="el" href="../../d6/d2c/_tracking_part_8c_source.html#l01949">InOutFlowCell()</a>.</p>

</div>
</div>
<a id="a11a6fda3ecb0ede2c4a9a8e96e23145d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11a6fda3ecb0ede2c4a9a8e96e23145d">&#9670;&nbsp;</a></span>YindexC()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int YindexC </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nodenum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ii</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Functions returns the index of Y coordination of intersection node (cells) </p>

<p class="definition">Definition at line <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00933">933</a> of file <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html">VelocityReconstruction.c</a>.</p>

<p class="reference">References <a class="el" href="../../d0/d29/main_8c_source.html#l00042">cell</a>, <a class="el" href="../../d0/d29/main_8c_source.html#l00039">fracture</a>, and <a class="el" href="../../d0/d29/main_8c_source.html#l00040">node</a>.</p>

<p class="reference">Referenced by <a class="el" href="../../d6/d2c/_tracking_part_8c_source.html#l02013">AcrossIntersection()</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00531">BoundaryCells()</a>, <a class="el" href="../../d2/d79/_velocity_reconstruction_8c_source.html#l00771">CornerVelocity()</a>, and <a class="el" href="../../d6/d2c/_tracking_part_8c_source.html#l01949">InOutFlowCell()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_f80ddb2df819b297fd9c7beccba09984.html">Docs_PT</a></li><li class="navelem"><a class="el" href="../../dir_966eb28a5fc4cd2ac9e3086fcb212f97.html">ParticleTracking_source</a></li><li class="navelem"><a class="el" href="../../d2/d79/_velocity_reconstruction_8c.html">VelocityReconstruction.c</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.15 </li>
  </ul>
</div>
</body>
</html>
