<!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: fractureEstimating.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>
<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('fracture_estimating_8cpp_source.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="headertitle">
<div class="title">fractureEstimating.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="fracture_estimating_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="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="generating_points_8h.html">generatingPoints.h</a>&quot;</span> </div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="input_8h.html">input.h</a>&quot;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="fracture_estimating_8h.html">fractureEstimating.h</a>&quot;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="insert_shape_8h.html">insertShape.h</a>&quot;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="math_functions_8h.html">mathFunctions.h</a>&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="domain_8h.html">domain.h</a>&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">/**********************************************************************/</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">/****************  Sort Families Radii Lists  *************************/</span></div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="fracture_estimating_8h.html#ae3e14f5bf8ea7b1470e64a74e0354947">   16</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="fracture_estimating_8cpp.html#ae3e14f5bf8ea7b1470e64a74e0354947">sortRadii</a>(std::vector&lt;Shape&gt; &amp;shapeFam) {   </div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; shapeFam.size(); i++) {</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;        std::sort(shapeFam[i].radiiList.begin(), </div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;            shapeFam[i].radiiList.end(     ), <a class="code" href="generating_points_8cpp.html#aa3af81bf42f3459e297870e04f2966c0">greaterThan</a>);</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;}</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">/**********************************************************************/</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">/***  Create Radii Lists for Shape Families When Using NPoly Option ***/</span></div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="fracture_estimating_8h.html#acb37fb0878da2fa7f0648216fb4189e4">   31</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="fracture_estimating_8cpp.html#acb37fb0878da2fa7f0648216fb4189e4">generateRadiiLists_nPolyOption</a>(std::vector&lt;Shape&gt; &amp;shapeFamilies, <span class="keywordtype">float</span> *<a class="code" href="input_8h.html#aeb1032cfdc6f748b280a4a0a59375d11">famProb</a>, std::mt19937_64 &amp;generator, <a class="code" href="class_distributions.html">Distributions</a> &amp;distributions) {</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;    std::cout &lt;&lt; <span class="stringliteral">&quot;\nBuilding radii lists for nPoly option...\n&quot;</span>;</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="keywordflow">if</span> (<a class="code" href="input_8h.html#aaf0d6444330f4a66638db81ca592e2a5">forceLargeFractures</a> == <span class="keyword">true</span>) {</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; shapeFamilies.size(); i++) {</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;            <span class="keywordtype">double</span> radius = <a class="code" href="insert_shape_8cpp.html#aa49097ed959c129cc9c8d11c6053ec71">getLargestFractureRadius</a>(shapeFamilies[i]);</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;            shapeFamilies[i].radiiList.push_back(radius);</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        }</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    }</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; shapeFamilies.size(); i++) {</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="keywordtype">int</span> amountToAdd;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="input_8h.html#aaf0d6444330f4a66638db81ca592e2a5">forceLargeFractures</a> == <span class="keyword">true</span>) {</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;            amountToAdd = std::ceil(famProb[i] * (<a class="code" href="input_8h.html#af336784d384b9e2ab2d990f7855ecdcf">nPoly</a> - shapeFamilies.size()));</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;        <span class="keywordflow">else</span> {</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;            amountToAdd = std::ceil(famProb[i] * <a class="code" href="input_8h.html#af336784d384b9e2ab2d990f7855ecdcf">nPoly</a>);</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;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <a class="code" href="fracture_estimating_8cpp.html#a140fd92d8397f94299e3b1df7fed9af4">addRadii</a>(amountToAdd, i, shapeFamilies[i], </div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;                generator, distributions);</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;}</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;<span class="comment">/**********************************************************************/</span></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="comment">/********************  Print Warining to User  ************************/</span></div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="fracture_estimating_8h.html#a614416ee97418d199ae89da90607406b">   64</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="fracture_estimating_8cpp.html#a614416ee97418d199ae89da90607406b">printGeneratingFracturesLessThanHWarning</a>(<span class="keywordtype">int</span> famIndex, <a class="code" href="struct_shape.html">Shape</a> &amp;shapeFam) {</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    std::cout &lt;&lt; <span class="stringliteral">&quot;\nWARNING: &quot;</span> &lt;&lt; <a class="code" href="insert_shape_8cpp.html#ae4fa66ac2a60ae519ee05168b44c9917">shapeType</a>(shapeFam) &lt;&lt; <span class="stringliteral">&quot; Family &quot;</span></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;              &lt;&lt; <a class="code" href="insert_shape_8cpp.html#a9b3f632508ac90991bd6ebee7bcfbc2f">getFamilyNumber</a>(famIndex, shapeFam.<a class="code" href="struct_shape.html#a766d04a69991e931ba2176a927c747cb">shapeFamily</a>)</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;              &lt;&lt; <span class="stringliteral">&quot; is attepting to populate fracture radii lists, however &quot;</span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;              &lt;&lt; <span class="stringliteral">&quot;many fractures are being generated with radii less than 3*h (Minimum radius). &quot;</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;              &lt;&lt; <span class="stringliteral">&quot;Consider adjusting distribution parameters.\n&quot;</span>;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;}</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="comment">/**********************************************************************/</span></div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="comment">/*********  Add Percentage More Radii To Radii Lists  *****************/</span></div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="fracture_estimating_8h.html#a26080c2634b53083b47b763b66bd4911">   82</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="fracture_estimating_8cpp.html#a26080c2634b53083b47b763b66bd4911">addRadiiToLists</a>(<span class="keywordtype">float</span> percent, std::vector&lt;Shape&gt; &amp;shapeFamilies, std::mt19937_64 &amp;generator, <a class="code" href="class_distributions.html">Distributions</a> &amp;distributions) {</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;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; shapeFamilies.size(); i++) {</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <span class="keywordtype">int</span> amountToAdd = std::ceil(shapeFamilies[i].radiiList.size() * percent);</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <a class="code" href="fracture_estimating_8cpp.html#a140fd92d8397f94299e3b1df7fed9af4">addRadii</a>(amountToAdd, i, shapeFamilies[i], generator, distributions);   </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;}</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;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="comment">/**********************************************************************/</span></div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="comment">/************  Add Radii To Shape Families Radii List  ****************/</span></div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="fracture_estimating_8h.html#a00c815b95d7e3d0cba9f4342903779e5">  100</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="fracture_estimating_8cpp.html#a140fd92d8397f94299e3b1df7fed9af4">addRadii</a>(<span class="keywordtype">int</span> amountToAdd, <span class="keywordtype">int</span> famIdx, <a class="code" href="struct_shape.html">Shape</a> &amp;shapeFam, std::mt19937_64 &amp;generator, <a class="code" href="class_distributions.html">Distributions</a> &amp;distributions) {</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;   </div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keywordtype">int</span> count = 0;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keywordtype">double</span> radius;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="keywordtype">double</span> minRadius = 3*<a class="code" href="input_8h.html#a8ee9be1b5aa75abae556de3088cba6d9">h</a>;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    std::uniform_real_distribution&lt;double&gt; uniformDist(0,1);</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keywordflow">switch</span> (shapeFam.<a class="code" href="struct_shape.html#a01b965e10318731a32fa68f0c87c9f20">distributionType</a>) {</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    </div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        <span class="keywordflow">case</span> 1: { <span class="comment">// Lognormal</span></div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;            std::lognormal_distribution&lt;double&gt; logDistribution(shapeFam.<a class="code" href="struct_shape.html#a0b4a5b43302221719982e9b5bbd9cbae">mean</a>, shapeFam.<a class="code" href="struct_shape.html#ad3faf14baf1d50b97a8ae243721213af">sd</a>);</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k = 0; k &lt; amountToAdd; k++) {</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;                count = 0;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;                <span class="keywordflow">do</span> {</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;                    radius = logDistribution(generator);</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;                    count++;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;                    <span class="keywordflow">if</span> (count % 1000 == 0) {</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;                        <a class="code" href="fracture_estimating_8cpp.html#a614416ee97418d199ae89da90607406b">printGeneratingFracturesLessThanHWarning</a>(famIdx, shapeFam); </div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;                    }</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;                } <span class="keywordflow">while</span> (radius &lt; minRadius);</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;                shapeFam.<a class="code" href="struct_shape.html#a306b721f9d89f6ee85260309dffc2d12">radiiList</a>.push_back(radius);</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;            }</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;            <span class="keywordflow">break</span>;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        }</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">case</span> 2: { <span class="comment">// Truncated power-law</span></div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k = 0; k &lt; amountToAdd; k++) {</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;                count = 0;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;                <span class="keywordflow">do</span> {</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;                    radius = <a class="code" href="generating_points_8cpp.html#a91e58d3a0d7a5e9d65cf15471f02fab0">truncatedPowerLaw</a>(uniformDist(generator), </div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;                             shapeFam.<a class="code" href="struct_shape.html#a59e4810d42b9b0cc47e6a50afea0741b">min</a>, shapeFam.<a class="code" href="struct_shape.html#ac674a8084da0711a93fb48d976467697">max</a>, shapeFam.<a class="code" href="struct_shape.html#a66a52f9200f362ec1e754c5211e6ba6c">alpha</a>);    </div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;                    count++;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;                    <span class="keywordflow">if</span> (count % 1000 == 0) {</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;                        <a class="code" href="fracture_estimating_8cpp.html#a614416ee97418d199ae89da90607406b">printGeneratingFracturesLessThanHWarning</a>(famIdx, shapeFam);</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;                    }</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;                } <span class="keywordflow">while</span> (radius &lt; minRadius);</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;                shapeFam.<a class="code" href="struct_shape.html#a306b721f9d89f6ee85260309dffc2d12">radiiList</a>.push_back(radius);</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;            }    </div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;            <span class="keywordflow">break</span>;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        }</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        <span class="keywordflow">case</span> 3: { <span class="comment">// Exponential </span></div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k = 0; k &lt; amountToAdd; k++) {</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                count = 0;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;                <span class="keywordflow">do</span> {</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;                    radius = distributions.<a class="code" href="class_distributions.html#aa67e69369161d7b2f6c4c94799f12bf4">expDist</a>-&gt;<a class="code" href="class_exp_dist.html#a6d4f5a28aa202431400586aa8c441fad">getValue</a>(shapeFam.<a class="code" href="struct_shape.html#a99702dd591a365a549aa5cc9537046a0">expLambda</a>,</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;                             shapeFam.<a class="code" href="struct_shape.html#a8e0f2b03f6533c0cccc58a5cd21cf0b1">minDistInput</a>, shapeFam.<a class="code" href="struct_shape.html#a55cd60fd2be84404c39dd2d98af113dd">maxDistInput</a>);</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;                    count++;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;                    <span class="keywordflow">if</span> (count % 1000 == 0) {</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;                        <a class="code" href="fracture_estimating_8cpp.html#a614416ee97418d199ae89da90607406b">printGeneratingFracturesLessThanHWarning</a>(famIdx, shapeFam);</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;                    }</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;                } <span class="keywordflow">while</span> (radius &lt; minRadius);                   </div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;                shapeFam.<a class="code" href="struct_shape.html#a306b721f9d89f6ee85260309dffc2d12">radiiList</a>.push_back(radius);    </div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;            }</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;            <span class="keywordflow">break</span>;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        }</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    }    </div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;}</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;<span class="comment">/**********************************************************************/</span></div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;<span class="comment">/********  Estimate Number of Fractures When P32 Option is Used  ******/</span></div><div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="fracture_estimating_8h.html#a7cf21b594fd24b2879af467e23bdac0a">  174</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="fracture_estimating_8cpp.html#a7cf21b594fd24b2879af467e23bdac0a">dryRun</a>(std::vector&lt;Shape&gt; &amp;shapeFamilies, <span class="keywordtype">float</span> *shapeProb, std::mt19937_64 &amp;generator, <a class="code" href="class_distributions.html">Distributions</a> &amp;distributions) { </div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    std::cout &lt;&lt; <span class="stringliteral">&quot;\nEstimating number of fractures per family for defined fracture intensities (P32)...\n&quot;</span>;</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    </div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    <span class="keywordtype">float</span> domVol = <a class="code" href="input_8h.html#a5cd62663cb067d79183d8de4dd0224db">domainSize</a>[0]*<a class="code" href="input_8h.html#a5cd62663cb067d79183d8de4dd0224db">domainSize</a>[1]*<a class="code" href="input_8h.html#a5cd62663cb067d79183d8de4dd0224db">domainSize</a>[2];    </div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    <span class="keywordtype">int</span> totalFamilies = shapeFamilies.size();</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    <span class="keywordtype">int</span> cdfSize = totalFamilies; <span class="comment">// This variable shrinks along with CDF when used with fracture intensity (P32) option</span></div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <span class="comment">// Create a copy of the family probablity</span></div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    <span class="comment">// Algoithms used in this function modify this array, </span></div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    <span class="comment">// we need to keep the original in its original state</span></div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;    <span class="keywordtype">float</span> *famProbability = <span class="keyword">new</span> <span class="keywordtype">float</span>[totalFamilies];</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    std::copy(shapeProb, shapeProb + totalFamilies, famProbability);</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <span class="comment">// Init uniform dist on [0,1)</span></div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    std::uniform_real_distribution&lt;double&gt; uniformDist(0,1);</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;   </div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    <span class="comment">/******  Convert famProb to CDF  *****/</span></div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    <span class="keywordtype">float</span> *CDF = <a class="code" href="math_functions_8cpp.html#a9422106ad945a110b0cf696050962556">createCDF</a>(famProbability, cdfSize);</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <span class="keywordtype">int</span> familyIndex; <span class="comment">// Holds index to shape family of fracture being generated</span></div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> forceLargeFractCount = 0;    </div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    <span class="keywordflow">while</span> (<a class="code" href="insert_shape_8cpp.html#a262d50919e2ca1c4e8b32ec027a52b57">p32Complete</a>(totalFamilies) == 0) {</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        </div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        <span class="comment">// Index to CDF array of current family being inserted </span></div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        <span class="keywordtype">int</span> cdfIdx;  </div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <span class="keywordtype">int</span> rejectCounter = 0;  </div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        </div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        <a class="code" href="struct_poly.html">Poly</a> newPoly;</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        </div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        <span class="keywordflow">if</span> ((forceLargeFractCount &lt; shapeFamilies.size()) &amp;&amp; <a class="code" href="input_8h.html#aaf0d6444330f4a66638db81ca592e2a5">forceLargeFractures</a> == <span class="keyword">true</span>) {</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;            <span class="keywordtype">double</span> radius = <a class="code" href="insert_shape_8cpp.html#aa49097ed959c129cc9c8d11c6053ec71">getLargestFractureRadius</a>(shapeFamilies[forceLargeFractCount]);</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;            familyIndex = forceLargeFractCount;</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;            cdfIdx = <a class="code" href="math_functions_8cpp.html#ad67ac7ecedfff7a737cd47a2f63b473a">cdfIdxFromFamNum</a>(CDF, <a class="code" href="input_8h.html#a9d32f63bd011a629cf644c120e07eda8">p32Status</a>, forceLargeFractCount);</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;            newPoly = <a class="code" href="insert_shape_8cpp.html#a4a4d307b0a091a6159358f312371ae95">generatePoly_withRadius</a>(radius, shapeFamilies[forceLargeFractCount], generator, distributions, familyIndex);</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;            forceLargeFractCount++;</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;        }</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;        <span class="keywordflow">else</span> {</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;            <span class="comment">// Choose a family based on probabiliyis AND their target p32 completion status</span></div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;            <span class="comment">// if a family has already met is fracture intinisty req. (p32) dont choose that family anymore</span></div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;            <span class="comment">// Choose a family based on probabiliyis AND their target p32 completion status</span></div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;            <span class="comment">// if a family has already met is fracture intinisty reqirement (p32) dont choose that family anymore</span></div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;            familyIndex = <a class="code" href="math_functions_8cpp.html#a2540d3ded7bd488a924ce2e4c2443261">indexFromProb_and_P32Status</a>(CDF, uniformDist(generator), totalFamilies, cdfSize, cdfIdx); </div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;            newPoly = <a class="code" href="insert_shape_8cpp.html#a4f91304a14fefba4d4f93f2f3e54dee4">generatePoly</a>(shapeFamilies[familyIndex], generator, distributions, familyIndex, <span class="keyword">false</span>);</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;        }</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;        <span class="comment">// Truncate poly if needed</span></div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;        <span class="comment">// Returns 1 if poly is outside of domain or truncated to less than 3 vertices</span></div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;        <span class="keywordtype">bool</span> reject = <span class="keyword">false</span>;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;        <span class="keywordflow">while</span> (<a class="code" href="domain_8cpp.html#aed3d77c17f33d2024704b479d0885332">domainTruncation</a>(newPoly, domainSize) == 1) {</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;            <span class="comment">// Poly is completely outside domain, or was truncated to </span></div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;            <span class="comment">// less than 3 vertices due to vertices being too close together</span></div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;            rejectCounter++; <span class="comment">// Counter for re-trying a new translation</span></div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;            <span class="comment">// Test if newPoly has reached its limit of insertion attempts</span></div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;            <span class="keywordflow">if</span> (rejectCounter &gt;= <a class="code" href="input_8h.html#ad29409829ae78f5f928f417a2a7b265b">rejectsPerFracture</a>) {</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                <span class="keyword">delete</span>[] newPoly.<a class="code" href="struct_poly.html#a2cb519bcf0553215de907c8fc878a255">vertices</a>; <span class="comment">// Created with new, need to manually deallocate</span></div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;                reject = <span class="keyword">true</span>;</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;                <span class="keywordflow">break</span>;; <span class="comment">// Reject poly, generate new polygon</span></div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;            }</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;            <span class="keywordflow">else</span> { <span class="comment">// Retranslate poly and try again, preserving normal, size, and shape</span></div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;                <a class="code" href="insert_shape_8cpp.html#afa95ede56e6ecb8918b61c5a2815d40d">reTranslatePoly</a>(newPoly, shapeFamilies[familyIndex], generator);</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;            }                           </div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        }</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        </div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;        <span class="keywordflow">if</span> (reject == <span class="keyword">true</span>) {</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;            <span class="comment">// Restart while loop</span></div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;            <span class="comment">// Generate new fracture</span></div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;            <span class="keywordflow">continue</span>; </div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;        }</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        <span class="comment">// Calculate poly&#39;s area</span></div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        newPoly.<a class="code" href="struct_poly.html#a26a509e53f5fe73722b1d82443ce1841">area</a> = <a class="code" href="math_functions_8cpp.html#a78276693aa55fab858a41366e5b4aa73">getArea</a>(newPoly);</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;        <span class="comment">// Update p32 (fracture intensity) per family if using P32 option</span></div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;        <span class="keywordflow">if</span> (shapeFamilies[familyIndex].layer == 0) {</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;            shapeFamilies[familyIndex].currentP32 += newPoly.<a class="code" href="struct_poly.html#a26a509e53f5fe73722b1d82443ce1841">area</a>*2/domVol;</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;        }</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        <span class="keywordflow">else</span> {</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;            shapeFamilies[familyIndex].currentP32 += newPoly.<a class="code" href="struct_poly.html#a26a509e53f5fe73722b1d82443ce1841">area</a>*2/<a class="code" href="input_8h.html#a8a68f69e78f6f9c011b7688ef3c48166">layerVol</a>[shapeFamilies[familyIndex].layer-1];</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;        }</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        <span class="comment">// Save radius for real DFN generation</span></div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        shapeFamilies[familyIndex].radiiList.push_back(newPoly.<a class="code" href="struct_poly.html#a2e10824b90d60b54522b7ce475ed2a17">xradius</a>);</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;        </div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;        <span class="comment">// If the last inserted pologon met the p32 reqirement, set that familiy to no longer</span></div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;        <span class="comment">// insert any more fractures. ajust the CDF and familiy probababilties</span></div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        <span class="keywordflow">if</span> (shapeFamilies[familyIndex].currentP32 &gt;= shapeFamilies[familyIndex].p32Target ) {</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;       </div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;            <a class="code" href="input_8h.html#a9d32f63bd011a629cf644c120e07eda8">p32Status</a>[familyIndex] = 1; <span class="comment">//mark family as having its p32 requirement met</span></div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;                        </div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;            <span class="comment">// Adjust CDF, PDF, and reduce their size by 1. Keep probabilities proportional. </span></div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;            <span class="comment">// Remove the completed families element in the CDF and famProb[] </span></div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;            <span class="comment">// Distribute the removed family probability evenly among the others and rebuild the CDF</span></div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;            <span class="comment">// familyIndex = index of family&#39;s probability</span></div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;            <span class="comment">// cdfIdx = index of the family&#39;s correspongding cdf, (index to elmt to remove)</span></div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;            <span class="keywordflow">if</span> (cdfSize &gt; 1 ){ <span class="comment">// If there are still more families to insert ( cdfSize = 0 means no more families to insert)</span></div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;                <a class="code" href="math_functions_8cpp.html#a55646cd87f15106134e9cb832492e1f6">adjustCDF_and_famProb</a>(CDF, famProbability, cdfSize, cdfIdx);</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;            }   </div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;        }</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        <span class="comment">// No need to save any polygons, </span></div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;        <span class="comment">// We are just simulating dfn with no rejections</span></div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;        <span class="comment">// to get an idea of how many fractures we will</span></div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;        <span class="comment">// need for each family</span></div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;        <span class="keyword">delete</span>[] newPoly.<a class="code" href="struct_poly.html#a2cb519bcf0553215de907c8fc878a255">vertices</a>;</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;               </div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;    } <span class="comment">// End while loop for inserting polyons</span></div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    <span class="comment">// Reset p32 to 0</span></div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; totalFamilies; i++) {</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;        <a class="code" href="input_8h.html#a9d32f63bd011a629cf644c120e07eda8">p32Status</a>[i] = 0;</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;        shapeFamilies[i].currentP32 = 0;</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    }</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;}</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;</div><div class="ttc" id="struct_shape_html_a306b721f9d89f6ee85260309dffc2d12"><div class="ttname"><a href="struct_shape.html#a306b721f9d89f6ee85260309dffc2d12">Shape::radiiList</a></div><div class="ttdeci">std::vector&lt; double &gt; radiiList</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00408">structures.h:408</a></div></div>
<div class="ttc" id="math_functions_8cpp_html_a55646cd87f15106134e9cb832492e1f6"><div class="ttname"><a href="math_functions_8cpp.html#a55646cd87f15106134e9cb832492e1f6">adjustCDF_and_famProb</a></div><div class="ttdeci">void adjustCDF_and_famProb(float *&amp;CDF, float *&amp;famProbability, int &amp;cdfSize, int idx2Remove)</div><div class="ttdef"><b>Definition:</b> <a href="math_functions_8cpp_source.html#l00269">mathFunctions.cpp:269</a></div></div>
<div class="ttc" id="input_8h_html"><div class="ttname"><a href="input_8h.html">input.h</a></div></div>
<div class="ttc" id="fracture_estimating_8cpp_html_a7cf21b594fd24b2879af467e23bdac0a"><div class="ttname"><a href="fracture_estimating_8cpp.html#a7cf21b594fd24b2879af467e23bdac0a">dryRun</a></div><div class="ttdeci">void dryRun(std::vector&lt; Shape &gt; &amp;shapeFamilies, float *shapeProb, std::mt19937_64 &amp;generator, Distributions &amp;distributions)</div><div class="ttdef"><b>Definition:</b> <a href="fracture_estimating_8cpp_source.html#l00174">fractureEstimating.cpp:174</a></div></div>
<div class="ttc" id="struct_shape_html_ac674a8084da0711a93fb48d976467697"><div class="ttname"><a href="struct_shape.html#ac674a8084da0711a93fb48d976467697">Shape::max</a></div><div class="ttdeci">float max</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00502">structures.h:502</a></div></div>
<div class="ttc" id="insert_shape_8cpp_html_a262d50919e2ca1c4e8b32ec027a52b57"><div class="ttname"><a href="insert_shape_8cpp.html#a262d50919e2ca1c4e8b32ec027a52b57">p32Complete</a></div><div class="ttdeci">bool p32Complete(int size)</div><div class="ttdef"><b>Definition:</b> <a href="insert_shape_8cpp_source.html#l00598">insertShape.cpp:598</a></div></div>
<div class="ttc" id="struct_poly_html"><div class="ttname"><a href="struct_poly.html">Poly</a></div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00012">structures.h:12</a></div></div>
<div class="ttc" id="input_8h_html_af336784d384b9e2ab2d990f7855ecdcf"><div class="ttname"><a href="input_8h.html#af336784d384b9e2ab2d990f7855ecdcf">nPoly</a></div><div class="ttdeci">unsigned int nPoly</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00015">readInput.cpp:15</a></div></div>
<div class="ttc" id="generating_points_8cpp_html_aa3af81bf42f3459e297870e04f2966c0"><div class="ttname"><a href="generating_points_8cpp.html#aa3af81bf42f3459e297870e04f2966c0">greaterThan</a></div><div class="ttdeci">bool greaterThan(float i, float j)</div><div class="ttdef"><b>Definition:</b> <a href="generating_points_8cpp_source.html#l00263">generatingPoints.cpp:263</a></div></div>
<div class="ttc" id="class_exp_dist_html_a6d4f5a28aa202431400586aa8c441fad"><div class="ttname"><a href="class_exp_dist.html#a6d4f5a28aa202431400586aa8c441fad">ExpDist::getValue</a></div><div class="ttdeci">double getValue(double lambda, double rv)</div><div class="ttdef"><b>Definition:</b> <a href="exp_dist_8cpp_source.html#l00046">expDist.cpp:46</a></div></div>
<div class="ttc" id="insert_shape_8cpp_html_ae4fa66ac2a60ae519ee05168b44c9917"><div class="ttname"><a href="insert_shape_8cpp.html#ae4fa66ac2a60ae519ee05168b44c9917">shapeType</a></div><div class="ttdeci">std::string shapeType(struct Shape &amp;shapeFam)</div><div class="ttdef"><b>Definition:</b> <a href="insert_shape_8cpp_source.html#l00700">insertShape.cpp:700</a></div></div>
<div class="ttc" id="generating_points_8cpp_html_a91e58d3a0d7a5e9d65cf15471f02fab0"><div class="ttname"><a href="generating_points_8cpp.html#a91e58d3a0d7a5e9d65cf15471f02fab0">truncatedPowerLaw</a></div><div class="ttdeci">float truncatedPowerLaw(float randomNum, float min, float max, float alpha)</div><div class="ttdef"><b>Definition:</b> <a href="generating_points_8cpp_source.html#l00208">generatingPoints.cpp:208</a></div></div>
<div class="ttc" id="math_functions_8cpp_html_a78276693aa55fab858a41366e5b4aa73"><div class="ttname"><a href="math_functions_8cpp.html#a78276693aa55fab858a41366e5b4aa73">getArea</a></div><div class="ttdeci">double getArea(struct Poly &amp;poly)</div><div class="ttdef"><b>Definition:</b> <a href="math_functions_8cpp_source.html#l00110">mathFunctions.cpp:110</a></div></div>
<div class="ttc" id="math_functions_8cpp_html_a9422106ad945a110b0cf696050962556"><div class="ttname"><a href="math_functions_8cpp.html#a9422106ad945a110b0cf696050962556">createCDF</a></div><div class="ttdeci">float * createCDF(float *famProb, int size)</div><div class="ttdef"><b>Definition:</b> <a href="math_functions_8cpp_source.html#l00244">mathFunctions.cpp:244</a></div></div>
<div class="ttc" id="struct_shape_html_ad3faf14baf1d50b97a8ae243721213af"><div class="ttname"><a href="struct_shape.html#ad3faf14baf1d50b97a8ae243721213af">Shape::sd</a></div><div class="ttdeci">float sd</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00486">structures.h:486</a></div></div>
<div class="ttc" id="struct_shape_html_a55cd60fd2be84404c39dd2d98af113dd"><div class="ttname"><a href="struct_shape.html#a55cd60fd2be84404c39dd2d98af113dd">Shape::maxDistInput</a></div><div class="ttdeci">double maxDistInput</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00463">structures.h:463</a></div></div>
<div class="ttc" id="math_functions_8h_html"><div class="ttname"><a href="math_functions_8h.html">mathFunctions.h</a></div></div>
<div class="ttc" id="input_8h_html_ad29409829ae78f5f928f417a2a7b265b"><div class="ttname"><a href="input_8h.html#ad29409829ae78f5f928f417a2a7b265b">rejectsPerFracture</a></div><div class="ttdeci">int rejectsPerFracture</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00439">readInput.cpp:439</a></div></div>
<div class="ttc" id="insert_shape_8cpp_html_a9b3f632508ac90991bd6ebee7bcfbc2f"><div class="ttname"><a href="insert_shape_8cpp.html#a9b3f632508ac90991bd6ebee7bcfbc2f">getFamilyNumber</a></div><div class="ttdeci">int getFamilyNumber(int familyIndex, int familyShape)</div><div class="ttdef"><b>Definition:</b> <a href="insert_shape_8cpp_source.html#l00688">insertShape.cpp:688</a></div></div>
<div class="ttc" id="fracture_estimating_8cpp_html_a26080c2634b53083b47b763b66bd4911"><div class="ttname"><a href="fracture_estimating_8cpp.html#a26080c2634b53083b47b763b66bd4911">addRadiiToLists</a></div><div class="ttdeci">void addRadiiToLists(float percent, std::vector&lt; Shape &gt; &amp;shapeFamilies, std::mt19937_64 &amp;generator, Distributions &amp;distributions)</div><div class="ttdef"><b>Definition:</b> <a href="fracture_estimating_8cpp_source.html#l00082">fractureEstimating.cpp:82</a></div></div>
<div class="ttc" id="math_functions_8cpp_html_ad67ac7ecedfff7a737cd47a2f63b473a"><div class="ttname"><a href="math_functions_8cpp.html#ad67ac7ecedfff7a737cd47a2f63b473a">cdfIdxFromFamNum</a></div><div class="ttdeci">int cdfIdxFromFamNum(float *CDF, bool *p32Status, int famIdx)</div><div class="ttdef"><b>Definition:</b> <a href="math_functions_8cpp_source.html#l00221">mathFunctions.cpp:221</a></div></div>
<div class="ttc" id="generating_points_8h_html"><div class="ttname"><a href="generating_points_8h.html">generatingPoints.h</a></div></div>
<div class="ttc" id="insert_shape_8cpp_html_a4a4d307b0a091a6159358f312371ae95"><div class="ttname"><a href="insert_shape_8cpp.html#a4a4d307b0a091a6159358f312371ae95">generatePoly_withRadius</a></div><div class="ttdeci">struct Poly generatePoly_withRadius(double radius, struct Shape &amp;shapeFam, std::mt19937_64 &amp;generator, Distributions &amp;distributions, int familyIndex)</div><div class="ttdef"><b>Definition:</b> <a href="insert_shape_8cpp_source.html#l00221">insertShape.cpp:221</a></div></div>
<div class="ttc" id="struct_poly_html_a2cb519bcf0553215de907c8fc878a255"><div class="ttname"><a href="struct_poly.html#a2cb519bcf0553215de907c8fc878a255">Poly::vertices</a></div><div class="ttdeci">double * vertices</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00070">structures.h:70</a></div></div>
<div class="ttc" id="input_8h_html_aaf0d6444330f4a66638db81ca592e2a5"><div class="ttname"><a href="input_8h.html#aaf0d6444330f4a66638db81ca592e2a5">forceLargeFractures</a></div><div class="ttdeci">bool forceLargeFractures</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00102">readInput.cpp:102</a></div></div>
<div class="ttc" id="insert_shape_8h_html"><div class="ttname"><a href="insert_shape_8h.html">insertShape.h</a></div></div>
<div class="ttc" id="struct_shape_html_a99702dd591a365a549aa5cc9537046a0"><div class="ttname"><a href="struct_shape.html#a99702dd591a365a549aa5cc9537046a0">Shape::expLambda</a></div><div class="ttdeci">float expLambda</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00470">structures.h:470</a></div></div>
<div class="ttc" id="struct_shape_html_a59e4810d42b9b0cc47e6a50afea0741b"><div class="ttname"><a href="struct_shape.html#a59e4810d42b9b0cc47e6a50afea0741b">Shape::min</a></div><div class="ttdeci">float min</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00499">structures.h:499</a></div></div>
<div class="ttc" id="fracture_estimating_8cpp_html_acb37fb0878da2fa7f0648216fb4189e4"><div class="ttname"><a href="fracture_estimating_8cpp.html#acb37fb0878da2fa7f0648216fb4189e4">generateRadiiLists_nPolyOption</a></div><div class="ttdeci">void generateRadiiLists_nPolyOption(std::vector&lt; Shape &gt; &amp;shapeFamilies, float *famProb, std::mt19937_64 &amp;generator, Distributions &amp;distributions)</div><div class="ttdef"><b>Definition:</b> <a href="fracture_estimating_8cpp_source.html#l00031">fractureEstimating.cpp:31</a></div></div>
<div class="ttc" id="struct_shape_html_a66a52f9200f362ec1e754c5211e6ba6c"><div class="ttname"><a href="struct_shape.html#a66a52f9200f362ec1e754c5211e6ba6c">Shape::alpha</a></div><div class="ttdeci">float alpha</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00505">structures.h:505</a></div></div>
<div class="ttc" id="input_8h_html_aeb1032cfdc6f748b280a4a0a59375d11"><div class="ttname"><a href="input_8h.html#aeb1032cfdc6f748b280a4a0a59375d11">famProb</a></div><div class="ttdeci">float * famProb</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00133">readInput.cpp:133</a></div></div>
<div class="ttc" id="struct_shape_html_a01b965e10318731a32fa68f0c87c9f20"><div class="ttname"><a href="struct_shape.html#a01b965e10318731a32fa68f0c87c9f20">Shape::distributionType</a></div><div class="ttdeci">short distributionType</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00396">structures.h:396</a></div></div>
<div class="ttc" id="domain_8cpp_html_aed3d77c17f33d2024704b479d0885332"><div class="ttname"><a href="domain_8cpp.html#aed3d77c17f33d2024704b479d0885332">domainTruncation</a></div><div class="ttdeci">bool domainTruncation(Poly &amp;newPoly, double *domainSize)</div><div class="ttdef"><b>Definition:</b> <a href="domain_8cpp_source.html#l00019">domain.cpp:19</a></div></div>
<div class="ttc" id="struct_shape_html_a0b4a5b43302221719982e9b5bbd9cbae"><div class="ttname"><a href="struct_shape.html#a0b4a5b43302221719982e9b5bbd9cbae">Shape::mean</a></div><div class="ttdeci">float mean</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00482">structures.h:482</a></div></div>
<div class="ttc" id="struct_poly_html_a2e10824b90d60b54522b7ce475ed2a17"><div class="ttname"><a href="struct_poly.html#a2e10824b90d60b54522b7ce475ed2a17">Poly::xradius</a></div><div class="ttdeci">double xradius</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00040">structures.h:40</a></div></div>
<div class="ttc" id="insert_shape_8cpp_html_afa95ede56e6ecb8918b61c5a2815d40d"><div class="ttname"><a href="insert_shape_8cpp.html#afa95ede56e6ecb8918b61c5a2815d40d">reTranslatePoly</a></div><div class="ttdeci">void reTranslatePoly(struct Poly &amp;newPoly, struct Shape &amp;shapeFam, std::mt19937_64 &amp;generator)</div><div class="ttdef"><b>Definition:</b> <a href="insert_shape_8cpp_source.html#l00455">insertShape.cpp:455</a></div></div>
<div class="ttc" id="insert_shape_8cpp_html_a4f91304a14fefba4d4f93f2f3e54dee4"><div class="ttname"><a href="insert_shape_8cpp.html#a4f91304a14fefba4d4f93f2f3e54dee4">generatePoly</a></div><div class="ttdeci">struct Poly generatePoly(struct Shape &amp;shapeFam, std::mt19937_64 &amp;generator, Distributions &amp;distributions, int familyIndex, bool useList)</div><div class="ttdef"><b>Definition:</b> <a href="insert_shape_8cpp_source.html#l00026">insertShape.cpp:26</a></div></div>
<div class="ttc" id="fracture_estimating_8cpp_html_a614416ee97418d199ae89da90607406b"><div class="ttname"><a href="fracture_estimating_8cpp.html#a614416ee97418d199ae89da90607406b">printGeneratingFracturesLessThanHWarning</a></div><div class="ttdeci">void printGeneratingFracturesLessThanHWarning(int famIndex, Shape &amp;shapeFam)</div><div class="ttdef"><b>Definition:</b> <a href="fracture_estimating_8cpp_source.html#l00064">fractureEstimating.cpp:64</a></div></div>
<div class="ttc" id="insert_shape_8cpp_html_aa49097ed959c129cc9c8d11c6053ec71"><div class="ttname"><a href="insert_shape_8cpp.html#aa49097ed959c129cc9c8d11c6053ec71">getLargestFractureRadius</a></div><div class="ttdeci">double getLargestFractureRadius(Shape &amp;shapeFam)</div><div class="ttdef"><b>Definition:</b> <a href="insert_shape_8cpp_source.html#l00717">insertShape.cpp:717</a></div></div>
<div class="ttc" id="domain_8h_html"><div class="ttname"><a href="domain_8h.html">domain.h</a></div></div>
<div class="ttc" id="input_8h_html_a9d32f63bd011a629cf644c120e07eda8"><div class="ttname"><a href="input_8h.html#a9d32f63bd011a629cf644c120e07eda8">p32Status</a></div><div class="ttdeci">bool * p32Status</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00468">readInput.cpp:468</a></div></div>
<div class="ttc" id="class_distributions_html"><div class="ttname"><a href="class_distributions.html">Distributions</a></div><div class="ttdef"><b>Definition:</b> <a href="distributions_8h_source.html#l00015">distributions.h:15</a></div></div>
<div class="ttc" id="struct_poly_html_a26a509e53f5fe73722b1d82443ce1841"><div class="ttname"><a href="struct_poly.html#a26a509e53f5fe73722b1d82443ce1841">Poly::area</a></div><div class="ttdeci">float area</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00033">structures.h:33</a></div></div>
<div class="ttc" id="fracture_estimating_8h_html"><div class="ttname"><a href="fracture_estimating_8h.html">fractureEstimating.h</a></div></div>
<div class="ttc" id="struct_shape_html_a766d04a69991e931ba2176a927c747cb"><div class="ttname"><a href="struct_shape.html#a766d04a69991e931ba2176a927c747cb">Shape::shapeFamily</a></div><div class="ttdeci">short shapeFamily</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00393">structures.h:393</a></div></div>
<div class="ttc" id="input_8h_html_a5cd62663cb067d79183d8de4dd0224db"><div class="ttname"><a href="input_8h.html#a5cd62663cb067d79183d8de4dd0224db">domainSize</a></div><div class="ttdeci">double domainSize[3]</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00018">readInput.cpp:18</a></div></div>
<div class="ttc" id="class_distributions_html_aa67e69369161d7b2f6c4c94799f12bf4"><div class="ttname"><a href="class_distributions.html#aa67e69369161d7b2f6c4c94799f12bf4">Distributions::expDist</a></div><div class="ttdeci">ExpDist * expDist</div><div class="ttdef"><b>Definition:</b> <a href="distributions_8h_source.html#l00020">distributions.h:20</a></div></div>
<div class="ttc" id="fracture_estimating_8cpp_html_a140fd92d8397f94299e3b1df7fed9af4"><div class="ttname"><a href="fracture_estimating_8cpp.html#a140fd92d8397f94299e3b1df7fed9af4">addRadii</a></div><div class="ttdeci">void addRadii(int amountToAdd, int famIdx, Shape &amp;shapeFam, std::mt19937_64 &amp;generator, Distributions &amp;distributions)</div><div class="ttdef"><b>Definition:</b> <a href="fracture_estimating_8cpp_source.html#l00100">fractureEstimating.cpp:100</a></div></div>
<div class="ttc" id="math_functions_8cpp_html_a2540d3ded7bd488a924ce2e4c2443261"><div class="ttname"><a href="math_functions_8cpp.html#a2540d3ded7bd488a924ce2e4c2443261">indexFromProb_and_P32Status</a></div><div class="ttdeci">int indexFromProb_and_P32Status(float *CDF, double roll, int famSize, int cdfSize, int &amp;cdfIdx)</div><div class="ttdef"><b>Definition:</b> <a href="math_functions_8cpp_source.html#l00187">mathFunctions.cpp:187</a></div></div>
<div class="ttc" id="input_8h_html_a8ee9be1b5aa75abae556de3088cba6d9"><div class="ttname"><a href="input_8h.html#a8ee9be1b5aa75abae556de3088cba6d9">h</a></div><div class="ttdeci">double h</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00021">readInput.cpp:21</a></div></div>
<div class="ttc" id="struct_shape_html"><div class="ttname"><a href="struct_shape.html">Shape</a></div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00390">structures.h:390</a></div></div>
<div class="ttc" id="fracture_estimating_8cpp_html_ae3e14f5bf8ea7b1470e64a74e0354947"><div class="ttname"><a href="fracture_estimating_8cpp.html#ae3e14f5bf8ea7b1470e64a74e0354947">sortRadii</a></div><div class="ttdeci">void sortRadii(std::vector&lt; Shape &gt; &amp;shapeFam)</div><div class="ttdef"><b>Definition:</b> <a href="fracture_estimating_8cpp_source.html#l00016">fractureEstimating.cpp:16</a></div></div>
<div class="ttc" id="struct_shape_html_a8e0f2b03f6533c0cccc58a5cd21cf0b1"><div class="ttname"><a href="struct_shape.html#a8e0f2b03f6533c0cccc58a5cd21cf0b1">Shape::minDistInput</a></div><div class="ttdeci">double minDistInput</div><div class="ttdef"><b>Definition:</b> <a href="structures_8h_source.html#l00457">structures.h:457</a></div></div>
<div class="ttc" id="input_8h_html_a8a68f69e78f6f9c011b7688ef3c48166"><div class="ttname"><a href="input_8h.html#a8a68f69e78f6f9c011b7688ef3c48166">layerVol</a></div><div class="ttdeci">float * layerVol</div><div class="ttdef"><b>Definition:</b> <a href="read_input_8cpp_source.html#l00447">readInput.cpp:447</a></div></div>
</div><!-- fragment --></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="fracture_estimating_8cpp.html">fractureEstimating.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>
