<!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.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>DFNgen: clusterGroups.cpp 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">
  $(document).ready(initResizable);
</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">DFNgen
   &#160;<span id="projectnumber">2.0</span>
   </div>
   <div id="projectbrief">DFN Model Generator</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</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">
$(document).ready(function(){initNavTree('cluster_groups_8cpp.html','');});
</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="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">clusterGroups.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;vector&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
<code>#include &quot;<a class="el" href="cluster_groups_8h_source.html">clusterGroups.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="structures_8h_source.html">structures.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="input_8h_source.html">input.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="math_functions_8h_source.html">mathFunctions.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for clusterGroups.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="cluster_groups_8cpp__incl.png" border="0" usemap="#cluster_groups_8cpp" alt=""/></div>
<map name="cluster_groups_8cpp" id="cluster_groups_8cpp">
<area shape="rect" id="node4" href="cluster_groups_8h.html" title="clusterGroups.h" alt="" coords="126,80,242,107"/>
<area shape="rect" id="node5" href="structures_8h.html" title="structures.h" alt="" coords="156,155,247,181"/>
<area shape="rect" id="node7" href="input_8h.html" title="input.h" alt="" coords="318,80,380,107"/>
<area shape="rect" id="node10" href="math_functions_8h.html" title="mathFunctions.h" alt="" coords="406,80,526,107"/>
</map>
</div>
</div>
<p><a href="cluster_groups_8cpp_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="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa3f6bef1533919464df1f55a65fcbad3"><td class="memItemLeft" align="right" valign="top">std::vector&lt; unsigned int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cluster_groups_8cpp.html#aa3f6bef1533919464df1f55a65fcbad3">getCluster</a> (<a class="el" href="struct_stats.html">Stats</a> &amp;pstats)</td></tr>
<tr class="separator:aa3f6bef1533919464df1f55a65fcbad3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec8105442589e759b8b36e3f927440b3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cluster_groups_8cpp.html#aec8105442589e759b8b36e3f927440b3">facesMatch</a> (bool *facesOption, bool *faces)</td></tr>
<tr class="separator:aec8105442589e759b8b36e3f927440b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a379930b3782e888c9ccdf5a8106b3434"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cluster_groups_8cpp.html#a379930b3782e888c9ccdf5a8106b3434">assignGroup</a> (<a class="el" href="struct_poly.html">Poly</a> &amp;newPoly, <a class="el" href="struct_stats.html">Stats</a> &amp;pstats, int newPolyIndex)</td></tr>
<tr class="separator:a379930b3782e888c9ccdf5a8106b3434"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa67c48c94718510ec7bd5590f09d090c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cluster_groups_8cpp.html#aa67c48c94718510ec7bd5590f09d090c">updateGroups</a> (<a class="el" href="struct_poly.html">Poly</a> &amp;newPoly, std::vector&lt; <a class="el" href="struct_poly.html">Poly</a> &gt; &amp;acceptedPoly, std::vector&lt; unsigned int &gt; &amp;encounteredGroups, <a class="el" href="struct_stats.html">Stats</a> &amp;pstats, int newPolyIndex)</td></tr>
<tr class="separator:aa67c48c94718510ec7bd5590f09d090c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a379930b3782e888c9ccdf5a8106b3434"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a379930b3782e888c9ccdf5a8106b3434">&sect;&nbsp;</a></span>assignGroup()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void assignGroup </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_poly.html">Poly</a> &amp;&#160;</td>
          <td class="paramname"><em>newPoly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_stats.html">Stats</a> &amp;&#160;</td>
          <td class="paramname"><em>pstats</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>newPolyIndex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Assigns a new polygon/fracture to a new cluster group number. Assumes 'newPoly' does not intersect with any other fractures. Arg 1: New polygon Arg 2: Program stats structure Arg 3: Index of 'newPoly' in the 'acceptedPoly' array (array of all accepted polys) </p>

<p>Definition at line <a class="el" href="cluster_groups_8cpp_source.html#l00137">137</a> of file <a class="el" href="cluster_groups_8cpp_source.html">clusterGroups.cpp</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="cluster_groups_8cpp_a379930b3782e888c9ccdf5a8106b3434_cgraph.png" border="0" usemap="#cluster_groups_8cpp_a379930b3782e888c9ccdf5a8106b3434_cgraph" alt=""/></div>
<map name="cluster_groups_8cpp_a379930b3782e888c9ccdf5a8106b3434_cgraph" id="cluster_groups_8cpp_a379930b3782e888c9ccdf5a8106b3434_cgraph">
<area shape="rect" id="node2" href="math_functions_8h.html#aaf4979ac027751a7358291353a23b387" title="OR" alt="" coords="152,5,195,32"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="cluster_groups_8cpp_a379930b3782e888c9ccdf5a8106b3434_icgraph.png" border="0" usemap="#cluster_groups_8cpp_a379930b3782e888c9ccdf5a8106b3434_icgraph" alt=""/></div>
<map name="cluster_groups_8cpp_a379930b3782e888c9ccdf5a8106b3434_icgraph" id="cluster_groups_8cpp_a379930b3782e888c9ccdf5a8106b3434_icgraph">
<area shape="rect" id="node2" href="computational_geometry_8h.html#aff243280740a51cada5c0dd94021fb66" title="intersectionChecking" alt="" coords="153,117,298,143"/>
<area shape="rect" id="node3" href="_d_f_nmain_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627" title="main" alt="" coords="565,117,616,143"/>
<area shape="rect" id="node4" href="insert_user_ell_8cpp.html#a9841b356b0460e297748d6648c301558" title="insertUserEll" alt="" coords="383,41,481,67"/>
<area shape="rect" id="node5" href="insert_user_ell_by_coord_8cpp.html#a49e6b0be012ed44c6ef83ea66ed6dd86" title="insertUserEllByCoord" alt="" coords="357,91,507,118"/>
<area shape="rect" id="node6" href="insert_user_rects_8cpp.html#af69365c2e0148366aabe6751ffc54a79" title="insertUserRects" alt="" coords="373,142,491,169"/>
<area shape="rect" id="node7" href="insert_user_rects_by_coord_8cpp.html#a244f461634679dc91d08da3e183f9b8c" title="insertUserRectsByCoord" alt="" coords="347,193,517,219"/>
<area shape="rect" id="node8" href="remove_fractures_8h.html#a016a4a3e0104523549279e6f6cf6c6d8" title="removeFractures" alt="" coords="371,243,493,270"/>
</map>
</div>

</div>
</div>
<a id="aec8105442589e759b8b36e3f927440b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec8105442589e759b8b36e3f927440b3">&sect;&nbsp;</a></span>facesMatch()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool facesMatch </td>
          <td>(</td>
          <td class="paramtype">bool *&#160;</td>
          <td class="paramname"><em>facesOption</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool *&#160;</td>
          <td class="paramname"><em>faces</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Compares the user's faces option to a fracture cluster Arg 1: Boundary faces user input option array ('boundaryFaces' in input file) Arg 2: Fracture cluter's boundary faces array. Similar to 'boundaryFaces' input option, but denotes which faces the fracture cluster connects to. Return: 0 - If faces meet user's facesOption requirements 1 - If faces do not meet requirements </p>

<p>Definition at line <a class="el" href="cluster_groups_8cpp_source.html#l00115">115</a> of file <a class="el" href="cluster_groups_8cpp_source.html">clusterGroups.cpp</a>.</p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="cluster_groups_8cpp_aec8105442589e759b8b36e3f927440b3_icgraph.png" border="0" usemap="#cluster_groups_8cpp_aec8105442589e759b8b36e3f927440b3_icgraph" alt=""/></div>
<map name="cluster_groups_8cpp_aec8105442589e759b8b36e3f927440b3_icgraph" id="cluster_groups_8cpp_aec8105442589e759b8b36e3f927440b3_icgraph">
<area shape="rect" id="node2" href="cluster_groups_8h.html#aa3f6bef1533919464df1f55a65fcbad3" title="getCluster" alt="" coords="144,5,227,32"/>
<area shape="rect" id="node3" href="_d_f_nmain_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627" title="main" alt="" coords="275,5,325,32"/>
</map>
</div>

</div>
</div>
<a id="aa3f6bef1533919464df1f55a65fcbad3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa3f6bef1533919464df1f55a65fcbad3">&sect;&nbsp;</a></span>getCluster()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;unsigned int&gt; getCluster </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_stats.html">Stats</a> &amp;&#160;</td>
          <td class="paramname"><em>pstats</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Uses boundaryFaces input option to get the wanted fracture cluster before writing output files.</p>
<p>NOTE: 'boundaryFaces' array is a global variable</p>
<p>Arg 1: Program statistics structure Return: Array (std vsector) of indices to fractures which remained after isolated and non-matching boundary faces fracture removal. </p>

<p>Definition at line <a class="el" href="cluster_groups_8cpp_source.html#l00045">45</a> of file <a class="el" href="cluster_groups_8cpp_source.html">clusterGroups.cpp</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="cluster_groups_8cpp_aa3f6bef1533919464df1f55a65fcbad3_cgraph.png" border="0" usemap="#cluster_groups_8cpp_aa3f6bef1533919464df1f55a65fcbad3_cgraph" alt=""/></div>
<map name="cluster_groups_8cpp_aa3f6bef1533919464df1f55a65fcbad3_cgraph" id="cluster_groups_8cpp_aa3f6bef1533919464df1f55a65fcbad3_cgraph">
<area shape="rect" id="node2" href="cluster_groups_8cpp.html#aec8105442589e759b8b36e3f927440b3" title="facesMatch" alt="" coords="136,5,227,32"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="cluster_groups_8cpp_aa3f6bef1533919464df1f55a65fcbad3_icgraph.png" border="0" usemap="#cluster_groups_8cpp_aa3f6bef1533919464df1f55a65fcbad3_icgraph" alt=""/></div>
<map name="cluster_groups_8cpp_aa3f6bef1533919464df1f55a65fcbad3_icgraph" id="cluster_groups_8cpp_aa3f6bef1533919464df1f55a65fcbad3_icgraph">
<area shape="rect" id="node2" href="_d_f_nmain_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627" title="main" alt="" coords="136,5,187,32"/>
</map>
</div>

</div>
</div>
<a id="aa67c48c94718510ec7bd5590f09d090c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa67c48c94718510ec7bd5590f09d090c">&sect;&nbsp;</a></span>updateGroups()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void updateGroups </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_poly.html">Poly</a> &amp;&#160;</td>
          <td class="paramname"><em>newPoly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; <a class="el" href="struct_poly.html">Poly</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>acceptedPoly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; unsigned int &gt; &amp;&#160;</td>
          <td class="paramname"><em>encounteredGroups</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_stats.html">Stats</a> &amp;&#160;</td>
          <td class="paramname"><em>pstats</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>newPolyIndex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Updates fracture cluster group data for the addition of 'newPoly'.</p>
<p>If 'newPoly' did not bridge any clusters together, 'newPoly' is added to the cluster of the first polygon it intersected with. The cluster groups boundary connectivity data is updated, clusters fracture count is incremented, and 'newPoly' is added to the list of polygons.</p>
<p>If 'newPoly' bridged two or more clusters, the function also merges the multiple cluster groups into a single group. 'newPoly' is first added to group of the first fracture it intersected with. Then, any remaining cluster groups 'newPoly' intersected with will have their group number changed to match that of 'newPolys' group number (see struct <a class="el" href="struct_fracture_groups.html">FractureGroups</a>). Inside the <a class="el" href="struct_group_data.html">GroupData</a> structure, all polygons will have their group number updated to the new group number. Once polygons and struct <a class="el" href="struct_fracture_groups.html">FractureGroups</a> have been updated, the <a class="el" href="struct_fracture_groups.html">FractureGroups</a> corresponding <a class="el" href="struct_group_data.html">GroupData</a> structure will have its valid bit set to false. (This is more efficient than deleting the <a class="el" href="struct_group_data.html">GroupData</a> element from its array, which causes memory re-allocation and copying).</p>
<p>The <a class="el" href="struct_group_data.html">GroupData</a> structure contains information about it's corresponding <a class="el" href="struct_fracture_groups.html">FractureGroups</a> structure (see <a class="el" href="struct_group_data.html">GroupData</a>). To access the cooresponding <a class="el" href="struct_group_data.html">GroupData</a> structure from a cluster group number, the index to the <a class="el" href="struct_group_data.html">GroupData</a> array within the <a class="el" href="struct_stats.html">Stats</a> structure (pstats variable) will be the the cluster group number subtracted by 1. e.g. If you need to access the <a class="el" href="struct_group_data.html">GroupData</a> structure for cluster group 10, it will be the variable: pstats.groupData[10-1] To access the corresponding <a class="el" href="struct_fracture_groups.html">FractureGroups</a> structure for a cluster group number, you must search the <a class="el" href="struct_fracture_groups.html">FractureGroups</a> structure array and search for ALL matching group numbers (pstats.fractGroup[i].groupNum).</p>
<p>Arg 1: Reference to new polygon Arg 2: Array of all accepted polygons Arg 3: Array of group numbers for any other bridged fracture cluster groups Arg 4: Program statistics structure (contains fracture cluster data) Arg 5: Index of 'newPoly' once placed into the array of all accepted polygons (arg 2) </p>

<p>Definition at line <a class="el" href="cluster_groups_8cpp_source.html#l00192">192</a> of file <a class="el" href="cluster_groups_8cpp_source.html">clusterGroups.cpp</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="cluster_groups_8cpp_aa67c48c94718510ec7bd5590f09d090c_cgraph.png" border="0" usemap="#cluster_groups_8cpp_aa67c48c94718510ec7bd5590f09d090c_cgraph" alt=""/></div>
<map name="cluster_groups_8cpp_aa67c48c94718510ec7bd5590f09d090c_cgraph" id="cluster_groups_8cpp_aa67c48c94718510ec7bd5590f09d090c_cgraph">
<area shape="rect" id="node2" href="math_functions_8h.html#aaf4979ac027751a7358291353a23b387" title="OR" alt="" coords="160,5,203,32"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="cluster_groups_8cpp_aa67c48c94718510ec7bd5590f09d090c_icgraph.png" border="0" usemap="#cluster_groups_8cpp_aa67c48c94718510ec7bd5590f09d090c_icgraph" alt=""/></div>
<map name="cluster_groups_8cpp_aa67c48c94718510ec7bd5590f09d090c_icgraph" id="cluster_groups_8cpp_aa67c48c94718510ec7bd5590f09d090c_icgraph">
<area shape="rect" id="node2" href="computational_geometry_8h.html#aff243280740a51cada5c0dd94021fb66" title="intersectionChecking" alt="" coords="161,117,306,143"/>
<area shape="rect" id="node3" href="_d_f_nmain_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627" title="main" alt="" coords="573,117,624,143"/>
<area shape="rect" id="node4" href="insert_user_ell_8cpp.html#a9841b356b0460e297748d6648c301558" title="insertUserEll" alt="" coords="391,41,489,67"/>
<area shape="rect" id="node5" href="insert_user_ell_by_coord_8cpp.html#a49e6b0be012ed44c6ef83ea66ed6dd86" title="insertUserEllByCoord" alt="" coords="365,91,515,118"/>
<area shape="rect" id="node6" href="insert_user_rects_8cpp.html#af69365c2e0148366aabe6751ffc54a79" title="insertUserRects" alt="" coords="381,142,499,169"/>
<area shape="rect" id="node7" href="insert_user_rects_by_coord_8cpp.html#a244f461634679dc91d08da3e183f9b8c" title="insertUserRectsByCoord" alt="" coords="355,193,525,219"/>
<area shape="rect" id="node8" href="remove_fractures_8h.html#a016a4a3e0104523549279e6f6cf6c6d8" title="removeFractures" alt="" coords="379,243,501,270"/>
</map>
</div>

</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="cluster_groups_8cpp.html">clusterGroups.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.12 </li>
  </ul>
</div>
</body>
</html>
