<a href="cell_8hh.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// Voro++, a 3D cell-based Voronoi library</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * \brief Header file for the voronoicell and related classes. */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment">/** \brief A class representing a single Voronoi cell.</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * This class represents a single Voronoi cell, as a collection of vertices</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> * that are connected by edges. The class contains routines for initializing</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> * the Voronoi cell to be simple shapes such as a box, tetrahedron, or octahedron.</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> * It the contains routines for recomputing the cell based on cutting it</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> * by a plane, which forms the key routine for the Voronoi cell computation.</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> * It contains numerous routine for computing statistics about the Voronoi cell,</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> * and it can output the cell in several formats.</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"> * This class is not intended for direct use, but forms the base of the</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment"> * voronoicell and voronoicell_neighbor classes, which extend it based on</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment"> * whether neighboring particle ID information needs to be tracked. */</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="code" href="classvoro_1_1voronoicell__base.html"> 33</a></span> <span class="keyword">class </span><a class="code" href="classvoro_1_1voronoicell__base.html" title="A class representing a single Voronoi cell.">voronoicell_base</a> {</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment"> /** This holds the current size of the arrays ed and nu, which</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment"> * hold the vertex information. If more vertices are created</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment"> * than can fit in this array, then it is dynamically extended</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment"> * using the add_memory_vertices routine. */</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="comment"> /** This holds the current maximum allowed order of a vertex,</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="comment"> * which sets the size of the mem, mep, and mec arrays. If a</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="comment"> * vertex is created with more vertices than this, the arrays</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment"> * are dynamically extended using the add_memory_vorder routine.</span></div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="comment"> /** This sets the size of the main delete stack. */</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="comment"> /** This sets the size of the auxiliary delete stack. */</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment"> /** This sets the total number of vertices in the current cell.</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="comment"> /** This is the index of particular point in the cell, which is</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="comment"> * used to start the tracing routines for plane intersection</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment"> * and cutting. These routines will work starting from any</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="comment"> * point, but it's often most efficient to start from the last</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="comment"> * point considered, since in many cases, the cell construction</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="comment"> * algorithm may consider many planes with similar vectors</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="comment"> /** This is a two dimensional array that holds information</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="comment"> * about the edge connections of the vertices that make up the</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="comment"> * cell. The two dimensional array is not allocated in the</span></div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="comment"> * usual method. To account for the fact the different vertices</span></div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="comment"> * have different orders, and thus require different amounts of</span></div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="comment"> * storage, the elements of ed[i] point to one-dimensional</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="comment"> * arrays in the mep[] array of different sizes.</span></div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment"> * More specifically, if vertex i has order m, then ed[i]</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment"> * points to a one-dimensional array in mep[m] that has 2*m+1</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="comment"> * entries. The first m elements hold the neighboring edges, so</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="comment"> * that the jth edge of vertex i is held in ed[i][j]. The next</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="comment"> * m elements hold a table of relations which is redundant but</span></div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="comment"> * helps speed up the computation. It satisfies the relation</span></div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="comment"> * ed[ed[i][j]][ed[i][m+j]]=i. The final entry holds a back</span></div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="comment"> * pointer, so that ed[i+2*m]=i. The back pointers are used</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="comment"> * when rearranging the memory. */</span></div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="comment"> /** This array holds the order of the vertices in the Voronoi</span></div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="comment"> * cell. This array is dynamically allocated, with its current</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="comment"> * size held by current_vertices. */</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="comment"> /** This in an array with size 3*current_vertices for holding</span></div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="comment"> * the positions of the vertices. */</span></div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="comment"> /** Outputs the cell in POV-Ray format, using cylinders for edges</span></div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="comment"> * and spheres for vertices, to a given file.</span></div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="comment"> * \param[in] (x,y,z) a displacement to add to the cell's</span></div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment"> * \param[in] filename the name of the file to write to. */</span></div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment"> /** Outputs the cell in POV-Ray format as a mesh2 object to a</span></div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment"> * given file.</span></div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="comment"> * \param[in] (x,y,z) a displacement to add to the cell's</span></div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="comment"> * \param[in] filename the name of the file to write to. */</span></div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment"> /** Outputs the cell in Gnuplot format a given file.</span></div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="comment"> * \param[in] (x,y,z) a displacement to add to the cell's</span></div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="comment"> * \param[in] filename the name of the file to write to. */</span></div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <span class="comment"> /** Outputs a list of the number of sides of each face.</span></div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="comment"> * \param[in] fp the file handle to write to. */</span></div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span> <span class="comment"> /** Outputs a list of the perimeters of each face.</span></div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span> <span class="comment"> * \param[in] fp the file handle to write to. */</span></div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> <span class="comment"> /** Outputs a list of the perimeters of each face.</span></div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span> <span class="comment"> * \param[in] fp the file handle to write to. */</span></div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span> <span class="comment"> /** Outputs a custom string of information about the Voronoi</span></div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span> <span class="comment"> * cell to a file. It assumes the cell is at (0,0,0) and has a</span></div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span> <span class="comment"> * the default_radius associated with it.</span></div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span> <span class="comment"> * \param[in] format the custom format string to use.</span></div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span> <span class="comment"> * \param[in] fp the file handle to write to. */</span></div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span> <span class="comment"> /** Returns a list of IDs of neighboring particles</span></div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span> <span class="comment"> * corresponding to each face.</span></div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span> <span class="comment"> * \param[out] v a reference to a vector in which to return the</span></div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span> <span class="comment"> * results. If no neighbor information is</span></div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span> <span class="comment"> * available, a blank vector is returned. */</span></div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span> <span class="comment"> /** This is a virtual function that is overridden by a routine</span></div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span> <span class="comment"> * to print a list of IDs of neighboring particles</span></div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span> <span class="comment"> * corresponding to each face. By default, when no neighbor</span></div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span> <span class="comment"> * information is available, the routine does nothing.</span></div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span> <span class="comment"> * \param[in] fp the file handle to write to. */</span></div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span> <span class="comment"> /** This a virtual function that is overridden by a routine to</span></div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span> <span class="comment"> * print the neighboring particle IDs for a given vertex. By</span></div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span> <span class="comment"> * default, when no neighbor information is available, the</span></div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span> <span class="comment"> * routine does nothing.</span></div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span> <span class="comment"> * \param[in] i the vertex to consider. */</span></div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span> <span class="comment"> /** This is a simple inline function for picking out the index</span></div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span> <span class="comment"> * of the next edge counterclockwise at the current vertex.</span></div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span> <span class="comment"> * \param[in] a the index of an edge of the current vertex.</span></div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span> <span class="comment"> * \param[in] p the number of the vertex.</span></div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span> <span class="comment"> * \return 0 if a=nu[p]-1, or a+1 otherwise. */</span></div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span> <span class="comment"> /** This is a simple inline function for picking out the index</span></div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span> <span class="comment"> * of the next edge clockwise from the current vertex.</span></div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span> <span class="comment"> * \param[in] a the index of an edge of the current vertex.</span></div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span> <span class="comment"> * \param[in] p the number of the vertex.</span></div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span> <span class="comment"> * \return nu[p]-1 if a=0, or a-1 otherwise. */</span></div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span> <span class="comment"> /** This a one dimensional array that holds the current sizes</span></div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span> <span class="comment"> * of the memory allocations for them mep array.*/</span></div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span> <span class="comment"> /** This is a one dimensional array that holds the current</span></div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span> <span class="comment"> * number of vertices of order p that are stored in the mep[p]</span></div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span> <span class="comment"> /** This is a two dimensional array for holding the information</span></div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span> <span class="comment"> * about the edges of the Voronoi cell. mep[p] is a</span></div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span> <span class="comment"> * one-dimensional array for holding the edge information about</span></div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span> <span class="comment"> * all vertices of order p, with each vertex holding 2*p+1</span></div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span> <span class="comment"> * integers of information. The total number of vertices held</span></div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span> <span class="comment"> * on mep[p] is stored in mem[p]. If the space runs out, the</span></div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span> <span class="comment"> * code allocates more using the add_memory() routine. */</span></div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span> <span class="comment"> /** This is the delete stack, used to store the vertices which</span></div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span> <span class="comment"> * are going to be deleted during the plane cutting procedure.</span></div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span> <span class="comment"> /** This is the auxiliary delete stack, which has size set by</span></div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span> <span class="comment"> /** This stores the current memory allocation for the marginal</span></div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span> <span class="comment"> /** This stores the total number of marginal points which are</span></div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span> <span class="comment"> * currently in the buffer. */</span></div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span> <span class="comment"> /** This array contains a list of the marginal points, and also</span></div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span> <span class="comment"> * the outcomes of the marginal tests. */</span></div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span> <span class="comment"> /** The x coordinate of the normal vector to the test plane. */</span></div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span> <span class="comment"> /** The y coordinate of the normal vector to the test plane. */</span></div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span> <span class="comment"> /** The z coordinate of the normal vector to the test plane. */</span></div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span> <span class="comment"> /** The magnitude of the normal vector to the test plane. */</span></div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classvoro_1_1voronoicell.html" title="Extension of the voronoicell_base class to represent a Voronoi cell without neighbor information...">voronoicell</a>;</div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classvoro_1_1voronoicell__neighbor.html" title="Extension of the voronoicell_base class to represent a Voronoi cell with neighbor information...">voronoicell_neighbor</a>;</div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span> <span class="comment">/** \brief Extension of the voronoicell_base class to represent a Voronoi</span></div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span> <span class="comment"> * This class is an extension of the voronoicell_base class, in cases when</span></div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span> <span class="comment"> * is not necessary to track the IDs of neighboring particles associated</span></div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span> <span class="comment"> * with each face of the Voronoi cell. */</span></div>
<div class="line"><a name="l00300"></a><span class="lineno"><a class="code" href="classvoro_1_1voronoicell.html"> 300</a></span> <span class="keyword">class </span><a class="code" href="classvoro_1_1voronoicell.html" title="Extension of the voronoicell_base class to represent a Voronoi cell without neighbor information...">voronoicell</a> : <span class="keyword">public</span> <a class="code" href="classvoro_1_1voronoicell__base.html" title="A class representing a single Voronoi cell.">voronoicell_base</a> {</div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span> <span class="comment"> /** Copies the information from another voronoicell class into</span></div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span> <span class="comment"> * this class, extending memory allocation if necessary.</span></div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span> <span class="comment"> * \param[in] c the class to copy. */</span></div>
<div class="line"><a name="l00306"></a><span class="lineno"><a class="code" href="classvoro_1_1voronoicell.html#a00ff7480ad31fbf06dcca83cb0683e68"> 306</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classvoro_1_1voronoicell.html#a00ff7480ad31fbf06dcca83cb0683e68">operator=</a>(<a class="code" href="classvoro_1_1voronoicell.html" title="Extension of the voronoicell_base class to represent a Voronoi cell without neighbor information...">voronoicell</a> &c) {</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <a class="code" href="classvoro_1_1voronoicell__base.html" title="A class representing a single Voronoi cell.">voronoicell_base</a>* vb((<a class="code" href="classvoro_1_1voronoicell__base.html" title="A class representing a single Voronoi cell.">voronoicell_base</a>*) &c);</div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span> <span class="comment"> /** Cuts a Voronoi cell using by the plane corresponding to the</span></div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span> <span class="comment"> * perpendicular bisector of a particle.</span></div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span> <span class="comment"> * \param[in] (x,y,z) the position of the particle.</span></div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span> <span class="comment"> * \param[in] rsq the modulus squared of the vector.</span></div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span> <span class="comment"> * \param[in] p_id the plane ID, ignored for this case where no</span></div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span> <span class="comment"> /** Cuts a Voronoi cell using by the plane corresponding to the</span></div>
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span> <span class="comment"> * perpendicular bisector of a particle.</span></div>
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span> <span class="comment"> * \param[in] (x,y,z) the position of the particle.</span></div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span> <span class="comment"> * \param[in] p_id the plane ID, ignored for this case where no</span></div>
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span> <span class="comment"> /** Cuts a Voronoi cell using by the plane corresponding to the</span></div>
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span> <span class="comment"> * perpendicular bisector of a particle.</span></div>
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span> <span class="comment"> * \param[in] (x,y,z) the position of the particle.</span></div>
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span> <span class="comment"> * \param[in] rsq the modulus squared of the vector.</span></div>
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span> <span class="comment"> * \return False if the plane cut deleted the cell entirely,</span></div>
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span> <span class="comment"> /** Cuts a Voronoi cell using by the plane corresponding to the</span></div>
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span> <span class="comment"> * perpendicular bisector of a particle.</span></div>
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span> <span class="comment"> * \param[in] (x,y,z) the position of the particle.</span></div>
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span> <span class="comment"> * \return False if the plane cut deleted the cell entirely,</span></div>
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span> <span class="comment"> /** Initializes the Voronoi cell to be rectangular box with the</span></div>
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span> <span class="comment"> * given dimensions.</span></div>
<div class="line"><a name="l00352"></a><span class="lineno"> 352</span> <span class="comment"> * \param[in] (xmin,xmax) the minimum and maximum x coordinates.</span></div>
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span> <span class="comment"> * \param[in] (ymin,ymax) the minimum and maximum y coordinates.</span></div>
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span> <span class="comment"> * \param[in] (zmin,zmax) the minimum and maximum z coordinates. */</span></div>
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span> <span class="comment"> /** Initializes the cell to be an octahedron with vertices at</span></div>
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span> <span class="comment"> * \param[in] l a parameter setting the size of the octahedron.</span></div>
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span> <span class="comment"> /** Initializes the cell to be a tetrahedron.</span></div>
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span> <span class="comment"> * \param[in] (x0,y0,z0) the coordinates of the first vertex.</span></div>
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span> <span class="comment"> * \param[in] (x1,y1,z1) the coordinates of the second vertex.</span></div>
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span> <span class="comment"> * \param[in] (x2,y2,z2) the coordinates of the third vertex.</span></div>
<div class="line"><a name="l00369"></a><span class="lineno"> 369</span> <span class="comment"> * \param[in] (x3,y3,z3) the coordinates of the fourth vertex.</span></div>
<div class="line"><a name="l00396"></a><span class="lineno"> 396</span> <span class="comment">/** \brief Extension of the voronoicell_base class to represent a Voronoi cell</span></div>
<div class="line"><a name="l00397"></a><span class="lineno"> 397</span> <span class="comment"> * with neighbor information.</span></div>
<div class="line"><a name="l00399"></a><span class="lineno"> 399</span> <span class="comment"> * This class is an extension of the voronoicell_base class, in cases when the</span></div>
<div class="line"><a name="l00400"></a><span class="lineno"> 400</span> <span class="comment"> * IDs of neighboring particles associated with each face of the Voronoi cell.</span></div>
<div class="line"><a name="l00401"></a><span class="lineno"> 401</span> <span class="comment"> * It contains additional data structures mne and ne for storing this</span></div>
<div class="line"><a name="l00403"></a><span class="lineno"><a class="code" href="classvoro_1_1voronoicell__neighbor.html"> 403</a></span> <span class="keyword">class </span><a class="code" href="classvoro_1_1voronoicell__neighbor.html" title="Extension of the voronoicell_base class to represent a Voronoi cell with neighbor information...">voronoicell_neighbor</a> : <span class="keyword">public</span> <a class="code" href="classvoro_1_1voronoicell__base.html" title="A class representing a single Voronoi cell.">voronoicell_base</a> {</div>
<div class="line"><a name="l00406"></a><span class="lineno"> 406</span> <span class="comment"> /** This two dimensional array holds the neighbor information</span></div>
<div class="line"><a name="l00407"></a><span class="lineno"> 407</span> <span class="comment"> * associated with each vertex. mne[p] is a one dimensional</span></div>
<div class="line"><a name="l00408"></a><span class="lineno"> 408</span> <span class="comment"> * array which holds all of the neighbor information for</span></div>
<div class="line"><a name="l00409"></a><span class="lineno"> 409</span> <span class="comment"> * vertices of order p. */</span></div>
<div class="line"><a name="l00411"></a><span class="lineno"> 411</span> <span class="comment"> /** This is a two dimensional array that holds the neighbor</span></div>
<div class="line"><a name="l00412"></a><span class="lineno"> 412</span> <span class="comment"> * information associated with each vertex. ne[i] points to a</span></div>
<div class="line"><a name="l00414"></a><span class="lineno"> 414</span> <span class="comment"> * neighbor information associated with the jth edge of vertex</span></div>
<div class="line"><a name="l00415"></a><span class="lineno"> 415</span> <span class="comment"> * i. It is set to the ID number of the plane that made the</span></div>
<div class="line"><a name="l00416"></a><span class="lineno"> 416</span> <span class="comment"> * face that is clockwise from the jth edge. */</span></div>
<div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  <span class="keywordtype">void</span> <a class="code" href="classvoro_1_1voronoicell__neighbor.html#ac6036ae44845e301da1e3656e0e98403">operator=</a>(<a class="code" href="classvoro_1_1voronoicell.html" title="Extension of the voronoicell_base class to represent a Voronoi cell without neighbor information...">voronoicell</a> &c);</div>
<div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  <span class="keywordtype">void</span> <a class="code" href="classvoro_1_1voronoicell__neighbor.html#ac6036ae44845e301da1e3656e0e98403">operator=</a>(<a class="code" href="classvoro_1_1voronoicell__neighbor.html" title="Extension of the voronoicell_base class to represent a Voronoi cell with neighbor information...">voronoicell_neighbor</a> &c);<span class="comment"></span></div>
<div class="line"><a name="l00422"></a><span class="lineno"> 422</span> <span class="comment"> /** Cuts the Voronoi cell by a particle whose center is at a</span></div>
<div class="line"><a name="l00423"></a><span class="lineno"> 423</span> <span class="comment"> * separation of (x,y,z) from the cell center. The value of rsq</span></div>
<div class="line"><a name="l00424"></a><span class="lineno"> 424</span> <span class="comment"> * should be initially set to \f$x^2+y^2+z^2\f$.</span></div>
<div class="line"><a name="l00425"></a><span class="lineno"> 425</span> <span class="comment"> * \param[in] (x,y,z) the normal vector to the plane.</span></div>
<div class="line"><a name="l00426"></a><span class="lineno"> 426</span> <span class="comment"> * \param[in] rsq the distance along this vector of the plane.</span></div>
<div class="line"><a name="l00427"></a><span class="lineno"> 427</span> <span class="comment"> * \param[in] p_id the plane ID (for neighbor tracking only).</span></div>
<div class="line"><a name="l00428"></a><span class="lineno"> 428</span> <span class="comment"> * \return False if the plane cut deleted the cell entirely,</span></div>
<div class="line"><a name="l00433"></a><span class="lineno"> 433</span> <span class="comment"> /** This routine calculates the modulus squared of the vector</span></div>
<div class="line"><a name="l00434"></a><span class="lineno"> 434</span> <span class="comment"> * before passing it to the main nplane() routine with full</span></div>
<div class="line"><a name="l00444"></a><span class="lineno"> 444</span> <span class="comment"> /** This version of the plane routine just makes up the plane</span></div>
<div class="line"><a name="l00445"></a><span class="lineno"> 445</span> <span class="comment"> * ID to be zero. It will only be referenced if neighbor</span></div>
<div class="line"><a name="l00446"></a><span class="lineno"> 446</span> <span class="comment"> * tracking is enabled.</span></div>
<div class="line"><a name="l00447"></a><span class="lineno"> 447</span> <span class="comment"> * \param[in] (x,y,z) the vector to cut the cell by.</span></div>
<div class="line"><a name="l00448"></a><span class="lineno"> 448</span> <span class="comment"> * \param[in] rsq the modulus squared of the vector.</span></div>
<div class="line"><a name="l00449"></a><span class="lineno"> 449</span> <span class="comment"> * \return False if the plane cut deleted the cell entirely,</span></div>
<div class="line"><a name="l00454"></a><span class="lineno"> 454</span> <span class="comment"> /** Cuts a Voronoi cell using the influence of a particle at</span></div>
<div class="line"><a name="l00455"></a><span class="lineno"> 455</span> <span class="comment"> * (x,y,z), first calculating the modulus squared of this</span></div>
<div class="line"><a name="l00456"></a><span class="lineno"> 456</span> <span class="comment"> * vector before passing it to the main nplane() routine. Zero</span></div>
<div class="line"><a name="l00457"></a><span class="lineno"> 457</span> <span class="comment"> * is supplied as the plane ID, which will be ignored unless</span></div>