<ahref="v__compute_8hh.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">// Voro++, a 3D cell-based Voronoi library</span></div>
<divclass="line"><aname="l00008"></a><spanclass="lineno"> 8</span> <spanclass="comment"> * \brief Header file for the voro_compute template and related classes. */</span></div>
<divclass="line"><aname="l00013"></a><spanclass="lineno"> 13</span> <spanclass="preprocessor">#include "<aclass="code"href="config_8hh.html"title="Master configuration file for setting various compile-time options.">config.hh</a>"</span></div>
<divclass="line"><aname="l00014"></a><spanclass="lineno"> 14</span> <spanclass="preprocessor">#include "<aclass="code"href="worklist_8hh.html"title="Header file for setting constants used in the block worklists that are used during cell computation...">worklist.hh</a>"</span></div>
<divclass="line"><aname="l00015"></a><spanclass="lineno"> 15</span> <spanclass="preprocessor">#include "<aclass="code"href="cell_8hh.html"title="Header file for the voronoicell and related classes.">cell.hh</a>"</span></div>
<divclass="line"><aname="l00019"></a><spanclass="lineno"> 19</span> <spanclass="comment">/** \brief Structure for holding information about a particle.</span></div>
<divclass="line"><aname="l00021"></a><spanclass="lineno"> 21</span> <spanclass="comment"> * This small structure holds information about a single particle, and is used</span></div>
<divclass="line"><aname="l00022"></a><spanclass="lineno"> 22</span> <spanclass="comment"> * by several of the routines in the voro_compute template for passing</span></div>
<divclass="line"><aname="l00023"></a><spanclass="lineno"> 23</span> <spanclass="comment"> * information by reference between functions. */</span></div>
<divclass="line"><aname="l00024"></a><spanclass="lineno"><aclass="code"href="structvoro_1_1particle__record.html"> 24</a></span> <spanclass="keyword">struct </span><aclass="code"href="structvoro_1_1particle__record.html"title="Structure for holding information about a particle.">particle_record</a> {<spanclass="comment"></span></div>
<divclass="line"><aname="l00025"></a><spanclass="lineno"> 25</span> <spanclass="comment"> /** The index of the block that the particle is within. */</span></div>
<divclass="line"><aname="l00027"></a><spanclass="lineno"> 27</span> <spanclass="comment"> /** The number of particle within its block. */</span></div>
<divclass="line"><aname="l00039"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1voro__compute.html"> 39</a></span> <spanclass="keyword">class </span><aclass="code"href="classvoro_1_1voro__compute.html"title="Template for carrying out Voronoi cell computations.">voro_compute</a> {</div>
<divclass="line"><aname="l00041"></a><spanclass="lineno"> 41</span> <spanclass="comment"> /** A reference to the container class on which to carry out*/</span></div>
<divclass="line"><aname="l00043"></a><spanclass="lineno"> 43</span> <spanclass="comment"> /** The size of an internal computational block in the x</span></div>
<divclass="line"><aname="l00046"></a><spanclass="lineno"> 46</span> <spanclass="comment"> /** The size of an internal computational block in the y</span></div>
<divclass="line"><aname="l00049"></a><spanclass="lineno"> 49</span> <spanclass="comment"> /** The size of an internal computational block in the z</span></div>
<divclass="line"><aname="l00052"></a><spanclass="lineno"> 52</span> <spanclass="comment"> /** The inverse box length in the x direction, set to</span></div>
<divclass="line"><aname="l00055"></a><spanclass="lineno"> 55</span> <spanclass="comment"> /** The inverse box length in the y direction, set to</span></div>
<divclass="line"><aname="l00058"></a><spanclass="lineno"> 58</span> <spanclass="comment"> /** The inverse box length in the z direction, set to</span></div>
<divclass="line"><aname="l00061"></a><spanclass="lineno"> 61</span> <spanclass="comment"> /** The number of boxes in the x direction for the searching mask. */</span></div>
<divclass="line"><aname="l00063"></a><spanclass="lineno"> 63</span> <spanclass="comment"> /** The number of boxes in the y direction for the searching mask. */</span></div>
<divclass="line"><aname="l00065"></a><spanclass="lineno"> 65</span> <spanclass="comment"> /** The number of boxes in the z direction for the searching mask. */</span></div>
<divclass="line"><aname="l00067"></a><spanclass="lineno"> 67</span> <spanclass="comment"> /** A constant, set to the value of hx multiplied by hy, which</span></div>
<divclass="line"><aname="l00068"></a><spanclass="lineno"> 68</span> <spanclass="comment"> * is used in the routines which step through mask boxes in</span></div>
<divclass="line"><aname="l00071"></a><spanclass="lineno"> 71</span> <spanclass="comment"> /** A constant, set to the value of hx*hy*hz, which is used in</span></div>
<divclass="line"><aname="l00072"></a><spanclass="lineno"> 72</span> <spanclass="comment"> * the routines which step through mask boxes in sequence. */</span></div>
<divclass="line"><aname="l00074"></a><spanclass="lineno"> 74</span> <spanclass="comment"> /** The number of floating point entries to store for each</span></div>
<divclass="line"><aname="l00077"></a><spanclass="lineno"> 77</span> <spanclass="comment"> /** This array holds the numerical IDs of each particle in each</span></div>
<divclass="line"><aname="l00080"></a><spanclass="lineno"> 80</span> <spanclass="comment"> /** A two dimensional array holding particle positions. For the</span></div>
<divclass="line"><aname="l00081"></a><spanclass="lineno"> 81</span> <spanclass="comment"> * derived container_poly class, this also holds particle</span></div>
<divclass="line"><aname="l00084"></a><spanclass="lineno"> 84</span> <spanclass="comment"> /** An array holding the number of particles within each</span></div>
<divclass="line"><aname="l00085"></a><spanclass="lineno"> 85</span> <spanclass="comment"> * computational box of the container. */</span></div>
<divclass="line"><aname="l00088"></a><spanclass="lineno"> 88</span> <spanclass="comment"> /** The class destructor frees the dynamically allocated memory</span></div>
<divclass="line"><aname="l00089"></a><spanclass="lineno"> 89</span> <spanclass="comment"> * for the mask and queue. */</span></div>
<divclass="line"><aname="l00096"></a><spanclass="lineno"> 96</span> <spanclass="keywordtype">void</span><aclass="code"href="classvoro_1_1voro__compute.html#aa0b01474a0cf0b230b736e7352404d8d">find_voronoi_cell</a>(<spanclass="keywordtype">double</span> x,<spanclass="keywordtype">double</span> y,<spanclass="keywordtype">double</span> z,<spanclass="keywordtype">int</span> ci,<spanclass="keywordtype">int</span> cj,<spanclass="keywordtype">int</span> ck,<spanclass="keywordtype">int</span> ijk,<aclass="code"href="structvoro_1_1particle__record.html"title="Structure for holding information about a particle.">particle_record</a>&w,<spanclass="keywordtype">double</span>&mrs);</div>
<divclass="line"><aname="l00098"></a><spanclass="lineno"> 98</span> <spanclass="comment"> /** A constant set to boxx*boxx+boxy*boxy+boxz*boxz, which is</span></div>
<divclass="line"><aname="l00099"></a><spanclass="lineno"> 99</span> <spanclass="comment"> * frequently used in the computation. */</span></div>
<divclass="line"><aname="l00101"></a><spanclass="lineno"> 101</span> <spanclass="comment"> /** This sets the current value being used to mark tested blocks</span></div>
<divclass="line"><aname="l00102"></a><spanclass="lineno"> 102</span> <spanclass="comment"> * in the mask. */</span></div>
<divclass="line"><aname="l00104"></a><spanclass="lineno"> 104</span> <spanclass="comment"> /** The current size of the search list. */</span></div>
<divclass="line"><aname="l00106"></a><spanclass="lineno"> 106</span> <spanclass="comment"> /** A pointer to the array of worklists. */</span></div>
<divclass="line"><aname="l00108"></a><spanclass="lineno"> 108</span> <spanclass="comment"> /** An pointer to the array holding the minimum distances</span></div>
<divclass="line"><aname="l00109"></a><spanclass="lineno"> 109</span> <spanclass="comment"> * associated with the worklists. */</span></div>
<divclass="line"><aname="l00111"></a><spanclass="lineno"> 111</span> <spanclass="comment"> /** This array is used during the cell computation to determine</span></div>
<divclass="line"><aname="l00112"></a><spanclass="lineno"> 112</span> <spanclass="comment"> * which blocks have been considered. */</span></div>
<divclass="line"><aname="l00114"></a><spanclass="lineno"> 114</span> <spanclass="comment"> /** An array is used to store the queue of blocks to test</span></div>
<divclass="line"><aname="l00115"></a><spanclass="lineno"> 115</span> <spanclass="comment"> * during the Voronoi cell computation. */</span></div>
<divclass="line"><aname="l00117"></a><spanclass="lineno"> 117</span> <spanclass="comment"> /** A pointer to the end of the queue array, used to determine</span></div>
<divclass="line"><aname="l00118"></a><spanclass="lineno"> 118</span> <spanclass="comment"> * when the queue is full. */</span></div>
<divclass="line"><aname="l00138"></a><spanclass="lineno"> 138</span> <spanclass="keyword">inline</span><spanclass="keywordtype">void</span> scan_all(<spanclass="keywordtype">int</span> ijk,<spanclass="keywordtype">double</span> x,<spanclass="keywordtype">double</span> y,<spanclass="keywordtype">double</span> z,<spanclass="keywordtype">int</span> di,<spanclass="keywordtype">int</span> dj,<spanclass="keywordtype">int</span> dk,<aclass="code"href="structvoro_1_1particle__record.html"title="Structure for holding information about a particle.">particle_record</a>&w,<spanclass="keywordtype">double</span>&mrs);</div>
<divclass="line"><aname="l00140"></a><spanclass="lineno"> 140</span> <spanclass="comment"> /** Resets the mask in cases where the mask counter wraps</span></div>