<a href="container__prd_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 container_periodic_base and related classes. */</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include "<a class="code" href="config_8hh.html" title="Master configuration file for setting various compile-time options.">config.hh</a>"</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include "<a class="code" href="common_8hh.html" title="Header file for the small helper functions.">common.hh</a>"</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include "<a class="code" href="v__base_8hh.html" title="Header file for the base Voronoi container class.">v_base.hh</a>"</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include "<a class="code" href="cell_8hh.html" title="Header file for the voronoicell and related classes.">cell.hh</a>"</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include "<a class="code" href="c__loops_8hh.html" title="Header file for the loop classes.">c_loops.hh</a>"</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "<a class="code" href="v__compute_8hh.html" title="Header file for the voro_compute template and related classes.">v_compute.hh</a>"</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include "<a class="code" href="unitcell_8hh.html" title="Header file for the unitcell class.">unitcell.hh</a>"</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include "<a class="code" href="rad__option_8hh.html" title="Header file for the classes encapsulating functionality for the regular and radical Voronoi tessellat...">rad_option.hh</a>"</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment">/** \brief Class for representing a particle system in a 3D periodic</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"> * This class represents a particle system in a three-dimensional</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment"> * non-orthogonal periodic domain. The domain is defined by three periodicity</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment"> * vectors (bx,0,0), (bxy,by,0), and (bxz,byz,bz) that represent a</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment"> * parallelepiped. Internally, the class stores particles in the box 0<x<bx,</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment"> * 0<y<by, 0<z<bz, and constructs periodic images of particles that displaced</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment"> * by the three periodicity vectors when they are necessary for the</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment"> * computation. The internal memory structure for this class is significantly</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment"> * different from the container_base class in order to handle the dynamic</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment"> * construction of these periodic images.</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="comment"> * The class is derived from the unitcell class, which encapsulates information</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="comment"> * about the domain geometry, and the voro_base class, which encapsulates</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="comment"> * information about the underlying computational grid. */</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="code" href="classvoro_1_1container__periodic__base.html"> 43</a></span> <span class="keyword">class </span><a class="code" href="classvoro_1_1container__periodic__base.html" title="Class for representing a particle system in a 3D periodic non-orthogonal periodic domain...">container_periodic_base</a> : <span class="keyword">public</span> <a class="code" href="classvoro_1_1unitcell.html" title="Class for computation of the unit Voronoi cell associated with a 3D non-rectangular periodic domain...">unitcell</a>, <span class="keyword">public</span> <a class="code" href="classvoro_1_1voro__base.html" title="Class containing data structures common across all particle container classes.">voro_base</a> {</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="comment"> /** The lower y index (inclusive) of the primary domain within</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="comment"> /** The lower z index (inclusive) of the primary domain within</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment"> /** The upper y index (exclusive) of the primary domain within</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="comment"> /** The upper z index (exclusive) of the primary domain within</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="comment"> /** The total size of the block structure (including images) in</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="comment"> * the y direction. */</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="comment"> /** The total size of the block structure (including images) in</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="comment"> * the z direction. */</span></div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="comment"> /** This array holds the numerical IDs of each particle in each</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="comment"> /** This array holds the number of particles within each</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="comment"> * computational box of the container. */</span></div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="comment"> /** This array holds the maximum amount of particle memory for</span></div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="comment"> * each computational box of the container. If the number of</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="comment"> * particles in a particular box ever approaches this limit,</span></div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment"> * more is allocated using the add_particle_memory() function.</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="comment"> /** An array holding information about periodic image</span></div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="comment"> * construction at a given location. */</span></div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="comment"> /** The initial amount of memory to allocate for particles</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="comment"> * for each block. */</span></div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="comment"> /** The amount of memory in the array structure for each</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="comment"> * particle. This is set to 3 when the basic class is</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="comment"> * initialized, so that the array holds (x,y,z) positions. If</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="comment"> * the container class is initialized as part of the derived</span></div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="comment"> * class container_poly, then this is set to 4, to also hold</span></div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment"> /** Prints all particles in the container, including those that</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment"> * have been constructed in image blocks. */</span></div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment"> /** Initializes the Voronoi cell prior to a compute_cell</span></div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="comment"> * operation for a specific particle being carried out by a</span></div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="comment"> * voro_compute class. The cell is initialized to be the</span></div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="comment"> * pre-computed unit Voronoi cell based on planes formed by</span></div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment"> * periodic images of the particle.</span></div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment"> * \param[in,out] c a reference to a voronoicell object.</span></div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment"> * \param[in] ijk the block that the particle is within.</span></div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="comment"> * \param[in] q the index of the particle within its block.</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="comment"> * \param[in] (ci,cj,ck) the coordinates of the block in the</span></div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment"> * \param[out] (i,j,k) the coordinates of the test block</span></div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="comment"> * relative to the voro_compute</span></div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="comment"> * \param[out] (x,y,z) the position of the particle.</span></div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="comment"> * \param[out] disp a block displacement used internally by the</span></div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="comment"> /** Initializes parameters for a find_voronoi_cell call within</span></div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="comment"> * the voro_compute template.</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="comment"> * \param[in] (ci,cj,ck) the coordinates of the test block in</span></div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> <span class="comment"> * \param[in] ijk the index of the test block</span></div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span> <span class="comment"> * \param[out] (i,j,k) the coordinates of the test block</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span> <span class="comment"> * relative to the voro_compute</span></div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <span class="comment"> /** Returns the position of a particle currently being computed</span></div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="comment"> * relative to the computational block that it is within. It is</span></div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span> <span class="comment"> * used to select the optimal worklist entry to use.</span></div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span> <span class="comment"> * \param[in] (x,y,z) the position of the particle.</span></div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span> <span class="comment"> * \param[in] (ci,cj,ck) the block that the particle is within.</span></div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span> <span class="comment"> * \param[out] (fx,fy,fz) the position relative to the block.</span></div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <span class="comment"> /** Calculates the index of block in the container structure</span></div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span> <span class="comment"> * corresponding to given coordinates.</span></div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span> <span class="comment"> * \param[in] (ci,cj,ck) the coordinates of the original block</span></div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span> <span class="comment"> * in the current computation, relative</span></div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span> <span class="comment"> * to the container coordinate system.</span></div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span> <span class="comment"> * \param[in] (ei,ej,ek) the displacement of the current block</span></div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span> <span class="comment"> * from the original block.</span></div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span> <span class="comment"> /** Creates particles within an image block by copying them</span></div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span> <span class="comment"> * from the primary domain and shifting them. If the given</span></div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span> <span class="comment"> * block is aligned with the primary domain in the z-direction,</span></div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span> <span class="comment"> * the routine calls the simpler create_side_image routine</span></div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span> <span class="comment"> * where the image block may comprise of particles from up to</span></div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span> <span class="comment"> * two primary blocks. Otherwise is calls the more complex</span></div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span> <span class="comment"> * create_vertical_image where the image block may comprise of</span></div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span> <span class="comment"> * particles from up to four primary blocks.</span></div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span> <span class="comment"> * \param[in] (di,dj,dk) the coordinates of the image block to</span></div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span> <span class="comment">/** \brief Extension of the container_periodic_base class for computing regular</span></div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span> <span class="comment"> * This class is an extension of the container_periodic_base that has routines</span></div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span> <span class="comment"> * specifically for computing the regular Voronoi tessellation with no</span></div>
<div class="line"><a name="l00212"></a><span class="lineno"><a class="code" href="classvoro_1_1container__periodic.html"> 212</a></span> <span class="keyword">class </span><a class="code" href="classvoro_1_1container__periodic.html" title="Extension of the container_periodic_base class for computing regular Voronoi tessellations.">container_periodic</a> : <span class="keyword">public</span> <a class="code" href="classvoro_1_1container__periodic__base.html" title="Class for representing a particle system in a 3D periodic non-orthogonal periodic domain...">container_periodic_base</a>, <span class="keyword">public</span> <a class="code" href="classvoro_1_1radius__mono.html" title="Class containing all of the routines that are specific to computing the regular Voronoi tessellation...">radius_mono</a> {</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="keywordtype">void</span> <a class="code" href="classvoro_1_1container__periodic.html#afa9abf680a0dc08650ada11a2eff0be6">put</a>(<a class="code" href="classvoro_1_1particle__order.html" title="A class for storing ordering information when particles are added to a container.">particle_order</a> &vo,<span class="keywordtype">int</span> n,<span class="keywordtype">double</span> x,<span class="keywordtype">double</span> y,<span class="keywordtype">double</span> z);</div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="keywordtype">void</span> <span class="keyword">import</span>(<a class="code" href="classvoro_1_1particle__order.html" title="A class for storing ordering information when particles are added to a container.">particle_order</a> &vo,FILE *fp=stdin);<span class="comment"></span></div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span> <span class="comment"> /** Imports a list of particles from an open file stream into</span></div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span> <span class="comment"> * the container. Entries of four numbers (Particle ID, x</span></div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span> <span class="comment"> * position, y position, z position) are searched for. If the</span></div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span> <span class="comment"> * file cannot be successfully read, then the routine causes a</span></div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span> <span class="comment"> * \param[in] filename the name of the file to open and read</span></div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span> <span class="comment"> /** Imports a list of particles from an open file stream into</span></div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span> <span class="comment"> * the container. Entries of four numbers (Particle ID, x</span></div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span> <span class="comment"> * position, y position, z position) are searched for. In</span></div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span> <span class="comment"> * addition, the order in which particles are read is saved</span></div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span> <span class="comment"> * into an ordering class. If the file cannot be successfully</span></div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span> <span class="comment"> * read, then the routine causes a fatal error.</span></div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span> <span class="comment"> * \param[in,out] vo the ordering class to use.</span></div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span> <span class="comment"> * \param[in] filename the name of the file to open and read</span></div>
<div class="line"><a name="l00243"></a><span class="lineno"><a class="code" href="classvoro_1_1container__periodic.html#ae586c7cf716fa84e91e9f801f5ac8a50"> 243</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <span class="keyword">import</span>(<a class="code" href="classvoro_1_1particle__order.html" title="A class for storing ordering information when particles are added to a container.">particle_order</a> &vo,<span class="keyword">const</span> <span class="keywordtype">char</span>* filename) {</div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span> <span class="comment"> /** Dumps particle IDs and positions to a file.</span></div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span> <span class="comment"> * \param[in] vl the loop class to use.</span></div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span> <span class="comment"> * \param[in] fp a file handle to write to. */</span></div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span> <span class="comment"> /** Dumps all of the particle IDs and positions to a file.</span></div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span> <span class="comment"> * \param[in] fp a file handle to write to. */</span></div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <a class="code" href="classvoro_1_1c__loop__all__periodic.html" title="A class for looping over all particles in a container_periodic or container_periodic_poly class...">c_loop_all_periodic</a> vl(*<span class="keyword">this</span>);</div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span> <span class="comment"> /** Dumps all of the particle IDs and positions to a file.</span></div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span> <span class="comment"> * \param[in] filename the name of the file to write to. */</span></div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span> <span class="comment"> * \param[in] vl the loop class to use.</span></div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span> <span class="comment"> * \param[in] fp a file handle to write to. */</span></div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  <a class="code" href="classvoro_1_1c__loop__all__periodic.html" title="A class for looping over all particles in a container_periodic or container_periodic_poly class...">c_loop_all_periodic</a> vl(*<span class="keyword">this</span>);</div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span> <span class="comment"> /** Dumps all particle positions in POV-Ray format.</span></div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span> <span class="comment"> * \param[in] filename the name of the file to write to. */</span></div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span> <span class="comment"> * \param[in] vl the loop class to use.</span></div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span> <span class="comment"> * \param[in] fp a file handle to write to. */</span></div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</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> c;<span class="keywordtype">double</span> *pp;</div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span> <span class="comment"> /** Computes all Voronoi cells and saves the output in gnuplot</span></div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  <a class="code" href="classvoro_1_1c__loop__all__periodic.html" title="A class for looping over all particles in a container_periodic or container_periodic_poly class...">c_loop_all_periodic</a> vl(*<span class="keyword">this</span>);</div>
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span> <span class="comment"> /** Compute all Voronoi cells and saves the output in gnuplot</span></div>
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span> <span class="comment"> * \param[in] filename the name of the file to write to. */</span></div>
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span> <span class="comment"> * \param[in] vl the loop class to use.</span></div>
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span> <span class="comment"> * \param[in] fp a file handle to write to. */</span></div>
<div class="line"><a name="l00332"></a><span class="lineno"> 332</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> c;<span class="keywordtype">double</span> *pp;</div>
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span> <span class="comment"> /** Computes all Voronoi cells and saves the output in POV-Ray</span></div>
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  <a class="code" href="classvoro_1_1c__loop__all__periodic.html" title="A class for looping over all particles in a container_periodic or container_periodic_poly class...">c_loop_all_periodic</a> vl(*<span class="keyword">this</span>);</div>
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span> <span class="comment"> /** Computes all Voronoi cells and saves the output in POV-Ray</span></div>
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span> <span class="comment"> * \param[in] filename the name of the file to write to. */</span></div>
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span> <span class="comment"> /** Computes the Voronoi cells and saves customized information</span></div>
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span> <span class="comment"> * about them.</span></div>
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span> <span class="comment"> * \param[in] vl the loop class to use.</span></div>
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span> <span class="comment"> * \param[in] format the custom output string to use.</span></div>
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span> <span class="comment"> * \param[in] fp a file handle to write to. */</span></div>
<div class="line"><a name="l00363"></a><span class="lineno"> 363</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> c;</div>
<div class="line"><a name="l00369"></a><span class="lineno"> 369</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> c;</div>
<div class="line"><a name="l00379"></a><span class="lineno"> 379</span> <span class="comment"> /** Computes the Voronoi cell for a particle currently being</span></div>
<div class="line"><a name="l00380"></a><span class="lineno"> 380</span> <span class="comment"> * referenced by a loop class.</span></div>
<div class="line"><a name="l00381"></a><span class="lineno"> 381</span> <span class="comment"> * \param[out] c a Voronoi cell class in which to store the</span></div>
<div class="line"><a name="l00383"></a><span class="lineno"> 383</span> <span class="comment"> * \param[in] vl the loop class to use.</span></div>
<div class="line"><a name="l00384"></a><span class="lineno"> 384</span> <span class="comment"> * \return True if the cell was computed. If the cell cannot be</span></div>
<div class="line"><a name="l00385"></a><span class="lineno"> 385</span> <span class="comment"> * computed because it was removed entirely for some reason,</span></div>
<div class="line"><a name="l00386"></a><span class="lineno"> 386</span> <span class="comment"> * then the routine returns false. */</span></div>
<div class="line"><a name="l00391"></a><span class="lineno"> 391</span> <span class="comment"> /** Computes the Voronoi cell for given particle.</span></div>
<div class="line"><a name="l00392"></a><span class="lineno"> 392</span> <span class="comment"> * \param[out] c a Voronoi cell class in which to store the</span></div>
<div class="line"><a name="l00394"></a><span class="lineno"> 394</span> <span class="comment"> * \param[in] ijk the block that the particle is within.</span></div>
<div class="line"><a name="l00395"></a><span class="lineno"> 395</span> <span class="comment"> * \param[in] q the index of the particle within the block.</span></div>
<div class="line"><a name="l00396"></a><span class="lineno"> 396</span> <span class="comment"> * \return True if the cell was computed. If the cell cannot be</span></div>
<div class="line"><a name="l00397"></a><span class="lineno"> 397</span> <span class="comment"> * computed because it was removed entirely for some reason,</span></div>
<div class="line"><a name="l00398"></a><span class="lineno"> 398</span> <span class="comment"> * then the routine returns false. */</span></div>
<div class="line"><a name="l00409"></a><span class="lineno"> 409</span> <span class="comment">/** \brief Extension of the container_periodic_base class for computing radical</span></div>
<div class="line"><a name="l00412"></a><span class="lineno"> 412</span> <span class="comment"> * This class is an extension of container_periodic_base that has routines</span></div>
<div class="line"><a name="l00413"></a><span class="lineno"> 413</span> <span class="comment"> * specifically for computing the radical Voronoi tessellation that depends</span></div>
<div class="line"><a name="l00414"></a><span class="lineno"> 414</span> <span class="comment"> * on the particle radii. */</span></div>
<div class="line"><a name="l00415"></a><span class="lineno"><a class="code" href="classvoro_1_1container__periodic__poly.html"> 415</a></span> <span class="keyword">class </span><a class="code" href="classvoro_1_1container__periodic__poly.html" title="Extension of the container_periodic_base class for computing radical Voronoi tessellations.">container_periodic_poly</a> : <span class="keyword">public</span> <a class="code" href="classvoro_1_1container__periodic__base.html" title="Class for representing a particle system in a 3D periodic non-orthogonal periodic domain...">container_periodic_base</a>, <span class="keyword">public</span> <a class="code" href="classvoro_1_1radius__poly.html" title="Class containing all of the routines that are specific to computing the radical Voronoi tessellation...">radius_poly</a> {</div>
<div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  <span class="keywordtype">void</span> <span class="keyword">import</span>(<a class="code" href="classvoro_1_1particle__order.html" title="A class for storing ordering information when particles are added to a container.">particle_order</a> &vo,FILE *fp=stdin);<span class="comment"></span></div>
<div class="line"><a name="l00425"></a><span class="lineno"> 425</span> <span class="comment"> /** Imports a list of particles from an open file stream into</span></div>
<div class="line"><a name="l00426"></a><span class="lineno"> 426</span> <span class="comment"> * the container_poly class. Entries of five numbers (Particle</span></div>
<div class="line"><a name="l00427"></a><span class="lineno"> 427</span> <span class="comment"> * ID, x position, y position, z position, radius) are searched</span></div>
<div class="line"><a name="l00428"></a><span class="lineno"> 428</span> <span class="comment"> * for. If the file cannot be successfully read, then the</span></div>
<div class="line"><a name="l00430"></a><span class="lineno"> 430</span> <span class="comment"> * \param[in] filename the name of the file to open and read</span></div>
<div class="line"><a name="l00437"></a><span class="lineno"> 437</span> <span class="comment"> /** Imports a list of particles from an open file stream into</span></div>
<div class="line"><a name="l00438"></a><span class="lineno"> 438</span> <span class="comment"> * the container_poly class. Entries of five numbers (Particle</span></div>
<div class="line"><a name="l00439"></a><span class="lineno"> 439</span> <span class="comment"> * ID, x position, y position, z position, radius) are searched</span></div>
<div class="line"><a name="l00440"></a><span class="lineno"> 440</span> <span class="comment"> * for. In addition, the order in which particles are read is</span></div>
<div class="line"><a name="l00441"></a><span class="lineno"> 441</span> <span class="comment"> * saved into an ordering class. If the file cannot be</span></div>
<div class="line"><a name="l00442"></a><span class="lineno"> 442</span> <span class="comment"> * successfully read, then the routine causes a fatal error.</span></div>
<div class="line"><a name="l00443"></a><span class="lineno"> 443</span> <span class="comment"> * \param[in,out] vo the ordering class to use.</span></div>
<div class="line"><a name="l00444"></a><span class="lineno"> 444</span> <span class="comment"> * \param[in] filename the name of the file to open and read</span></div>
<div class="line"><a name="l00446"></a><span class="lineno"><a class="code" href="classvoro_1_1container__periodic__poly.html#a346b67c09850a78e8eb9144029fe3087"> 446</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <span class="keyword">import</span>(<a class="code" href="classvoro_1_1particle__order.html" title="A class for storing ordering information when particles are added to a container.">particle_order</a> &vo,<span class="keyword">const</span> <span class="keywordtype">char</span>* filename) {</div>
<div class="line"><a name="l00453"></a><span class="lineno"> 453</span> <span class="comment"> /** Dumps particle IDs, positions and radii to a file.</span></div>
<div class="line"><a name="l00454"></a><span class="lineno"> 454</span> <span class="comment"> * \param[in] vl the loop class to use.</span></div>
<div class="line"><a name="l00455"></a><span class="lineno"> 455</span> <span class="comment"> * \param[in] fp a file handle to write to. */</span></div>
<div class="line"><a name="l00464"></a><span class="lineno"> 464</span> <span class="comment"> /** Dumps all of the particle IDs, positions and radii to a</span></div>
<div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  <a class="code" href="classvoro_1_1c__loop__all__periodic.html" title="A class for looping over all particles in a container_periodic or container_periodic_poly class...">c_loop_all_periodic</a> vl(*<span class="keyword">this</span>);</div>
<div class="line"><a name="l00471"></a><span class="lineno"> 471</span> <span class="comment"> /** Dumps all of the particle IDs, positions and radii to a</span></div>
<div class="line"><a name="l00473"></a><span class="lineno"> 473</span> <span class="comment"> * \param[in] filename the name of the file to write to. */</span></div>
<div class="line"><a name="l00480"></a><span class="lineno"> 480</span> <span class="comment"> * \param[in] vl the loop class to use.</span></div>
<div class="line"><a name="l00481"></a><span class="lineno"> 481</span> <span class="comment"> * \param[in] fp a file handle to write to. */</span></div>
<div class="line"><a name="l00491"></a><span class="lineno"> 491</span> <span class="comment"> /** Dumps all the particle positions in POV-Ray format.</span></div>
<div class="line"><a name="l00492"></a><span class="lineno"> 492</span> <span class="comment"> * \param[in] fp a file handle to write to. */</span></div>
<div class="line"><a name="l00494"></a><span class="lineno"> 494</span>  <a class="code" href="classvoro_1_1c__loop__all__periodic.html" title="A class for looping over all particles in a container_periodic or container_periodic_poly class...">c_loop_all_periodic</a> vl(*<span class="keyword">this</span>);</div>
<div class="line"><a name="l00497"></a><span class="lineno"> 497</span> <span class="comment"> /** Dumps all the particle positions in POV-Ray format.</span></div>
<div class="line"><a name="l00498"></a><span class="lineno"> 498</span> <span class="comment"> * \param[in] filename the name of the file to write to. */</span></div>
<div class="line"><a name="l00506"></a><span class="lineno"> 506</span> <span class="comment"> * \param[in] vl the loop class to use.</span></div>
<div class="line"><a name="l00507"></a><span class="lineno"> 507</span> <span class="comment"> * \param[in] fp a file handle to write to. */</span></div>
<div class="line"><a name="l00510"></a><span class="lineno"> 510</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> c;<span class="keywordtype">double</span> *pp;</div>
<div class="line"><a name="l00516"></a><span class="lineno"> 516</span> <span class="comment"> /** Compute all Voronoi cells and saves the output in gnuplot</span></div>
<div class="line"><a name="l00520"></a><span class="lineno"> 520</span>  <a class="code" href="classvoro_1_1c__loop__all__periodic.html" title="A class for looping over all particles in a container_periodic or container_periodic_poly class...">c_loop_all_periodic</a> vl(*<span class="keyword">this</span>);</div>
<div class="line"><a name="l00523"></a><span class="lineno"> 523</span> <span class="comment"> /** Compute all Voronoi cells and saves the output in gnuplot</span></div>
<div class="line"><a name="l00525"></a><span class="lineno"> 525</span> <span class="comment"> * \param[in] filename the name of the file to write to. */</span></div>
<div class="line"><a name="l00533"></a><span class="lineno"> 533</span> <span class="comment"> * \param[in] vl the loop class to use.</span></div>
<div class="line"><a name="l00534"></a><span class="lineno"> 534</span> <span class="comment"> * \param[in] fp a file handle to write to. */</span></div>
<div class="line"><a name="l00537"></a><span class="lineno"> 537</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> c;<span class="keywordtype">double</span> *pp;</div>
<div class="line"><a name="l00544"></a><span class="lineno"> 544</span> <span class="comment"> /** Computes all Voronoi cells and saves the output in POV-Ray</span></div>
<div class="line"><a name="l00548"></a><span class="lineno"> 548</span>  <a class="code" href="classvoro_1_1c__loop__all__periodic.html" title="A class for looping over all particles in a container_periodic or container_periodic_poly class...">c_loop_all_periodic</a> vl(*<span class="keyword">this</span>);</div>
<div class="line"><a name="l00551"></a><span class="lineno"> 551</span> <span class="comment"> /** Computes all Voronoi cells and saves the output in POV-Ray</span></div>
<div class="line"><a name="l00553"></a><span class="lineno"> 553</span> <span class="comment"> * \param[in] filename the name of the file to write to. */</span></div>
<div class="line"><a name="l00559"></a><span class="lineno"> 559</span> <span class="comment"> /** Computes the Voronoi cells and saves customized information</span></div>
<div class="line"><a name="l00560"></a><span class="lineno"> 560</span> <span class="comment"> * about them.</span></div>
<div class="line"><a name="l00561"></a><span class="lineno"> 561</span> <span class="comment"> * \param[in] vl the loop class to use.</span></div>
<div class="line"><a name="l00562"></a><span class="lineno"> 562</span> <span class="comment"> * \param[in] format the custom output string to use.</span></div>
<div class="line"><a name="l00563"></a><span class="lineno"> 563</span> <span class="comment"> * \param[in] fp a file handle to write to. */</span></div>
<div class="line"><a name="l00568"></a><span class="lineno"> 568</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> c;</div>
<div class="line"><a name="l00574"></a><span class="lineno"> 574</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> c;</div>
<div class="line"><a name="l00581"></a><span class="lineno"> 581</span> <span class="comment"> /** Computes the Voronoi cell for a particle currently being</span></div>
<div class="line"><a name="l00582"></a><span class="lineno"> 582</span> <span class="comment"> * referenced by a loop class.</span></div>
<div class="line"><a name="l00583"></a><span class="lineno"> 583</span> <span class="comment"> * \param[out] c a Voronoi cell class in which to store the</span></div>
<div class="line"><a name="l00585"></a><span class="lineno"> 585</span> <span class="comment"> * \param[in] vl the loop class to use.</span></div>
<div class="line"><a name="l00586"></a><span class="lineno"> 586</span> <span class="comment"> * \return True if the cell was computed. If the cell cannot be</span></div>
<div class="line"><a name="l00587"></a><span class="lineno"> 587</span> <span class="comment"> * computed because it was removed entirely for some reason,</span></div>
<div class="line"><a name="l00588"></a><span class="lineno"> 588</span> <span class="comment"> * then the routine returns false. */</span></div>
<div class="line"><a name="l00593"></a><span class="lineno"> 593</span> <span class="comment"> /** Computes the Voronoi cell for given particle.</span></div>
<div class="line"><a name="l00594"></a><span class="lineno"> 594</span> <span class="comment"> * \param[out] c a Voronoi cell class in which to store the</span></div>
<div class="line"><a name="l00596"></a><span class="lineno"> 596</span> <span class="comment"> * \param[in] ijk the block that the particle is within.</span></div>
<div class="line"><a name="l00597"></a><span class="lineno"> 597</span> <span class="comment"> * \param[in] q the index of the particle within the block.</span></div>
<div class="line"><a name="l00598"></a><span class="lineno"> 598</span> <span class="comment"> * \return True if the cell was computed. If the cell cannot be</span></div>
<div class="line"><a name="l00599"></a><span class="lineno"> 599</span> <span class="comment"> * computed because it was removed entirely for some reason,</span></div>
<div class="line"><a name="l00600"></a><span class="lineno"> 600</span> <span class="comment"> * then the routine returns false. */</span></div>