<ahref="c__loops_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="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="l00017"></a><spanclass="lineno"> 17</span> <spanclass="comment">/** A type associated with a c_loop_subset class, determining what type of</span></div>
<divclass="line"><aname="l00018"></a><spanclass="lineno"> 18</span> <spanclass="comment"> * geometrical region to loop over. */</span></div>
<divclass="line"><aname="l00025"></a><spanclass="lineno"> 25</span> <spanclass="comment">/** \brief A class for storing ordering information when particles are added to</span></div>
<divclass="line"><aname="l00026"></a><spanclass="lineno"> 26</span> <spanclass="comment"> * a container.</span></div>
<divclass="line"><aname="l00028"></a><spanclass="lineno"> 28</span> <spanclass="comment"> * When particles are added to a container class, they are sorted into an</span></div>
<divclass="line"><aname="l00029"></a><spanclass="lineno"> 29</span> <spanclass="comment"> * internal computational grid of blocks. The particle_order class provides a</span></div>
<divclass="line"><aname="l00030"></a><spanclass="lineno"> 30</span> <spanclass="comment"> * mechanism for remembering which block particles were sorted into. The import</span></div>
<divclass="line"><aname="l00031"></a><spanclass="lineno"> 31</span> <spanclass="comment"> * and put routines in the container class have variants that also take a</span></div>
<divclass="line"><aname="l00032"></a><spanclass="lineno"> 32</span> <spanclass="comment"> * particle_order class. Each time they are called, they will store the block</span></div>
<divclass="line"><aname="l00033"></a><spanclass="lineno"> 33</span> <spanclass="comment"> * that the particle was sorted into, plus the position of the particle within</span></div>
<divclass="line"><aname="l00034"></a><spanclass="lineno"> 34</span> <spanclass="comment"> * the block. The particle_order class can used by the c_loop_order class to</span></div>
<divclass="line"><aname="l00035"></a><spanclass="lineno"> 35</span> <spanclass="comment"> * specifically loop over the particles that have their information stored</span></div>
<divclass="line"><aname="l00036"></a><spanclass="lineno"> 36</span> <spanclass="comment"> * within it. */</span></div>
<divclass="line"><aname="l00037"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1particle__order.html"> 37</a></span> <spanclass="keyword">class </span><aclass="code"href="classvoro_1_1particle__order.html"title="A class for storing ordering information when particles are added to a container.">particle_order</a> {</div>
<divclass="line"><aname="l00039"></a><spanclass="lineno"> 39</span> <spanclass="comment"> /** A pointer to the array holding the ordering. */</span></div>
<divclass="line"><aname="l00041"></a><spanclass="lineno"> 41</span> <spanclass="comment"> /** A pointer to the next position in the ordering array in</span></div>
<divclass="line"><aname="l00042"></a><spanclass="lineno"> 42</span> <spanclass="comment"> * which to store an entry. */</span></div>
<divclass="line"><aname="l00044"></a><spanclass="lineno"> 44</span> <spanclass="comment"> /** The current memory allocation for the class, set to the</span></div>
<divclass="line"><aname="l00045"></a><spanclass="lineno"> 45</span> <spanclass="comment"> * number of entries which can be stored. */</span></div>
<divclass="line"><aname="l00047"></a><spanclass="lineno"> 47</span> <spanclass="comment"> /** The particle_order constructor allocates memory to store the</span></div>
<divclass="line"><aname="l00053"></a><spanclass="lineno"> 53</span> <spanclass="comment"> /** The particle_order destructor frees the dynamically allocated</span></div>
<divclass="line"><aname="l00054"></a><spanclass="lineno"> 54</span> <spanclass="comment"> * memory used to store the ordering information. */</span></div>
<divclass="line"><aname="l00058"></a><spanclass="lineno"> 58</span> <spanclass="comment"> /** Adds a record to the order, corresponding to the memory</span></div>
<divclass="line"><aname="l00059"></a><spanclass="lineno"> 59</span> <spanclass="comment"> * address of where a particle was placed into the container.</span></div>
<divclass="line"><aname="l00060"></a><spanclass="lineno"> 60</span> <spanclass="comment"> * \param[in] ijk the block into which the particle was placed.</span></div>
<divclass="line"><aname="l00061"></a><spanclass="lineno"> 61</span> <spanclass="comment"> * \param[in] q the position within the block where the</span></div>
<divclass="line"><aname="l00062"></a><spanclass="lineno"> 62</span> <spanclass="comment"> * particle was placed. */</span></div>
<divclass="line"><aname="l00071"></a><spanclass="lineno"> 71</span> <spanclass="comment">/** \brief Base class for looping over particles in a container.</span></div>
<divclass="line"><aname="l00073"></a><spanclass="lineno"> 73</span> <spanclass="comment"> * This class forms the base of all classes that can loop over a subset of</span></div>
<divclass="line"><aname="l00074"></a><spanclass="lineno"> 74</span> <spanclass="comment"> * particles in a contaner in some order. When initialized, it stores constants</span></div>
<divclass="line"><aname="l00075"></a><spanclass="lineno"> 75</span> <spanclass="comment"> * about the corresponding container geometry. It also contains a number of</span></div>
<divclass="line"><aname="l00076"></a><spanclass="lineno"> 76</span> <spanclass="comment"> * routines for interrogating which particle currently being considered by the</span></div>
<divclass="line"><aname="l00077"></a><spanclass="lineno"> 77</span> <spanclass="comment"> * loop, which are common between all of the derived classes. */</span></div>
<divclass="line"><aname="l00078"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1c__loop__base.html"> 78</a></span> <spanclass="keyword">class </span><aclass="code"href="classvoro_1_1c__loop__base.html"title="Base class for looping over particles in a container.">c_loop_base</a> {</div>
<divclass="line"><aname="l00080"></a><spanclass="lineno"> 80</span> <spanclass="comment"> /** The number of blocks in the x direction. */</span></div>
<divclass="line"><aname="l00082"></a><spanclass="lineno"> 82</span> <spanclass="comment"> /** The number of blocks in the y direction. */</span></div>
<divclass="line"><aname="l00084"></a><spanclass="lineno"> 84</span> <spanclass="comment"> /** The number of blocks in the z direction. */</span></div>
<divclass="line"><aname="l00086"></a><spanclass="lineno"> 86</span> <spanclass="comment"> /** A constant, set to the value of nx multiplied by ny, which</span></div>
<divclass="line"><aname="l00087"></a><spanclass="lineno"> 87</span> <spanclass="comment"> * is used in the routines that step through blocks in</span></div>
<divclass="line"><aname="l00090"></a><spanclass="lineno"> 90</span> <spanclass="comment"> /** A constant, set to the value of nx*ny*nz, which is used in</span></div>
<divclass="line"><aname="l00091"></a><spanclass="lineno"> 91</span> <spanclass="comment"> * the routines that step through blocks in sequence. */</span></div>
<divclass="line"><aname="l00093"></a><spanclass="lineno"> 93</span> <spanclass="comment"> /** The number of floating point numbers per particle in the</span></div>
<divclass="line"><aname="l00094"></a><spanclass="lineno"> 94</span> <spanclass="comment"> * associated container data structure. */</span></div>
<divclass="line"><aname="l00096"></a><spanclass="lineno"> 96</span> <spanclass="comment"> /** A pointer to the particle position information in the</span></div>
<divclass="line"><aname="l00097"></a><spanclass="lineno"> 97</span> <spanclass="comment"> * associated container data structure. */</span></div>
<divclass="line"><aname="l00099"></a><spanclass="lineno"> 99</span> <spanclass="comment"> /** A pointer to the particle ID information in the associated</span></div>
<divclass="line"><aname="l00100"></a><spanclass="lineno"> 100</span> <spanclass="comment"> * container data structure. */</span></div>
<divclass="line"><aname="l00102"></a><spanclass="lineno"> 102</span> <spanclass="comment"> /** A pointer to the particle counts in the associated</span></div>
<divclass="line"><aname="l00103"></a><spanclass="lineno"> 103</span> <spanclass="comment"> * container data structure. */</span></div>
<divclass="line"><aname="l00105"></a><spanclass="lineno"> 105</span> <spanclass="comment"> /** The current x-index of the block under consideration by the</span></div>
<divclass="line"><aname="l00108"></a><spanclass="lineno"> 108</span> <spanclass="comment"> /** The current y-index of the block under consideration by the</span></div>
<divclass="line"><aname="l00111"></a><spanclass="lineno"> 111</span> <spanclass="comment"> /** The current z-index of the block under consideration by the</span></div>
<divclass="line"><aname="l00114"></a><spanclass="lineno"> 114</span> <spanclass="comment"> /** The current index of the block under consideration by the</span></div>
<divclass="line"><aname="l00117"></a><spanclass="lineno"> 117</span> <spanclass="comment"> /** The index of the particle under consideration within the current</span></div>
<divclass="line"><aname="l00120"></a><spanclass="lineno"> 120</span> <spanclass="comment"> /** The constructor copies several necessary constants from the</span></div>
<divclass="line"><aname="l00121"></a><spanclass="lineno"> 121</span> <spanclass="comment"> * base container class.</span></div>
<divclass="line"><aname="l00122"></a><spanclass="lineno"> 122</span> <spanclass="comment"> * \param[in] con the container class to use. */</span></div>
<divclass="line"><aname="l00127"></a><spanclass="lineno"> 127</span> <spanclass="comment"> /** Returns the position vector of the particle currently being</span></div>
<divclass="line"><aname="l00128"></a><spanclass="lineno"> 128</span> <spanclass="comment"> * considered by the loop.</span></div>
<divclass="line"><aname="l00129"></a><spanclass="lineno"> 129</span> <spanclass="comment"> * \param[out] (x,y,z) the position vector of the particle. */</span></div>
<divclass="line"><aname="l00134"></a><spanclass="lineno"> 134</span> <spanclass="comment"> /** Returns the ID, position vector, and radius of the particle</span></div>
<divclass="line"><aname="l00135"></a><spanclass="lineno"> 135</span> <spanclass="comment"> * currently being considered by the loop.</span></div>
<divclass="line"><aname="l00136"></a><spanclass="lineno"> 136</span> <spanclass="comment"> * \param[out] pid the particle ID.</span></div>
<divclass="line"><aname="l00137"></a><spanclass="lineno"> 137</span> <spanclass="comment"> * \param[out] (x,y,z) the position vector of the particle.</span></div>
<divclass="line"><aname="l00138"></a><spanclass="lineno"> 138</span> <spanclass="comment"> * \param[out] r the radius of the particle. If no radius</span></div>
<divclass="line"><aname="l00139"></a><spanclass="lineno"> 139</span> <spanclass="comment"> * information is available the default radius</span></div>
<divclass="line"><aname="l00140"></a><spanclass="lineno"> 140</span> <spanclass="comment"> * value is returned. */</span></div>
<divclass="line"><aname="l00147"></a><spanclass="lineno"> 147</span> <spanclass="comment"> /** Returns the x position of the particle currently being</span></div>
<divclass="line"><aname="l00148"></a><spanclass="lineno"> 148</span> <spanclass="comment"> * considered by the loop. */</span></div>
<divclass="line"><aname="l00150"></a><spanclass="lineno"> 150</span> <spanclass="comment"> /** Returns the y position of the particle currently being</span></div>
<divclass="line"><aname="l00151"></a><spanclass="lineno"> 151</span> <spanclass="comment"> * considered by the loop. */</span></div>
<divclass="line"><aname="l00153"></a><spanclass="lineno"> 153</span> <spanclass="comment"> /** Returns the z position of the particle currently being</span></div>
<divclass="line"><aname="l00154"></a><spanclass="lineno"> 154</span> <spanclass="comment"> * considered by the loop. */</span></div>
<divclass="line"><aname="l00156"></a><spanclass="lineno"> 156</span> <spanclass="comment"> /** Returns the ID of the particle currently being considered</span></div>
<divclass="line"><aname="l00157"></a><spanclass="lineno"> 157</span> <spanclass="comment"> * by the loop. */</span></div>
<divclass="line"><aname="l00161"></a><spanclass="lineno"> 161</span> <spanclass="comment">/** \brief Class for looping over all of the particles in a container.</span></div>
<divclass="line"><aname="l00163"></a><spanclass="lineno"> 163</span> <spanclass="comment"> * This is one of the simplest loop classes, that scans the computational</span></div>
<divclass="line"><aname="l00164"></a><spanclass="lineno"> 164</span> <spanclass="comment"> * blocks in order, and scans all the particles within each block in order. */</span></div>
<divclass="line"><aname="l00165"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1c__loop__all.html"> 165</a></span> <spanclass="keyword">class </span><aclass="code"href="classvoro_1_1c__loop__all.html"title="Class for looping over all of the particles in a container.">c_loop_all</a> : <spanclass="keyword">public</span><aclass="code"href="classvoro_1_1c__loop__base.html"title="Base class for looping over particles in a container.">c_loop_base</a> {</div>
<divclass="line"><aname="l00167"></a><spanclass="lineno"> 167</span> <spanclass="comment"> /** The constructor copies several necessary constants from the</span></div>
<divclass="line"><aname="l00168"></a><spanclass="lineno"> 168</span> <spanclass="comment"> * base container class.</span></div>
<divclass="line"><aname="l00169"></a><spanclass="lineno"> 169</span> <spanclass="comment"> * \param[in] con the container class to use. */</span></div>
<divclass="line"><aname="l00171"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1c__loop__all.html#a255049d5c5f878a24804ed2e29043e68"> 171</a></span> <aclass="code"href="classvoro_1_1c__loop__all.html#a255049d5c5f878a24804ed2e29043e68">c_loop_all</a>(c_class &con) : <aclass="code"href="classvoro_1_1c__loop__base.html"title="Base class for looping over particles in a container.">c_loop_base</a>(con) {}<spanclass="comment"></span></div>
<divclass="line"><aname="l00172"></a><spanclass="lineno"> 172</span> <spanclass="comment"> /** Sets the class to consider the first particle.</span></div>
<divclass="line"><aname="l00173"></a><spanclass="lineno"> 173</span> <spanclass="comment"> * \return True if there is any particle to consider, false</span></div>
<divclass="line"><aname="l00180"></a><spanclass="lineno"> 180</span> <spanclass="comment"> /** Finds the next particle to test.</span></div>
<divclass="line"><aname="l00181"></a><spanclass="lineno"> 181</span> <spanclass="comment"> * \return True if there is another particle, false if no more</span></div>
<divclass="line"><aname="l00182"></a><spanclass="lineno"> 182</span> <spanclass="comment"> * particles are available. */</span></div>
<divclass="line"><aname="l00194"></a><spanclass="lineno"> 194</span> <spanclass="comment"> /** Updates the internal variables to find the next</span></div>
<divclass="line"><aname="l00195"></a><spanclass="lineno"> 195</span> <spanclass="comment"> * computational block with any particles.</span></div>
<divclass="line"><aname="l00196"></a><spanclass="lineno"> 196</span> <spanclass="comment"> * \return True if another block is found, false if there are</span></div>
<divclass="line"><aname="l00197"></a><spanclass="lineno"> 197</span> <spanclass="comment"> * no more blocks. */</span></div>
<divclass="line"><aname="l00212"></a><spanclass="lineno"> 212</span> <spanclass="comment">/** \brief Class for looping over a subset of particles in a container.</span></div>
<divclass="line"><aname="l00214"></a><spanclass="lineno"> 214</span> <spanclass="comment"> * This class can loop over a subset of particles in a certain geometrical</span></div>
<divclass="line"><aname="l00215"></a><spanclass="lineno"> 215</span> <spanclass="comment"> * region within the container. The class can be set up to loop over a</span></div>
<divclass="line"><aname="l00216"></a><spanclass="lineno"> 216</span> <spanclass="comment"> * rectangular box or sphere. It can also rectangular group of internal</span></div>
<divclass="line"><aname="l00218"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1c__loop__subset.html"> 218</a></span> <spanclass="keyword">class </span><aclass="code"href="classvoro_1_1c__loop__subset.html"title="Class for looping over a subset of particles in a container.">c_loop_subset</a> : <spanclass="keyword">public</span><aclass="code"href="classvoro_1_1c__loop__base.html"title="Base class for looping over particles in a container.">c_loop_base</a> {</div>
<divclass="line"><aname="l00220"></a><spanclass="lineno"> 220</span> <spanclass="comment"> /** The current mode of operation, determining whether tests</span></div>
<divclass="line"><aname="l00221"></a><spanclass="lineno"> 221</span> <spanclass="comment"> * should be applied to particles to ensure they are within a</span></div>
<divclass="line"><aname="l00222"></a><spanclass="lineno"> 222</span> <spanclass="comment"> * certain geometrical object. */</span></div>
<divclass="line"><aname="l00224"></a><spanclass="lineno"> 224</span> <spanclass="comment"> /** The constructor copies several necessary constants from the</span></div>
<divclass="line"><aname="l00225"></a><spanclass="lineno"> 225</span> <spanclass="comment"> * base container class.</span></div>
<divclass="line"><aname="l00226"></a><spanclass="lineno"> 226</span> <spanclass="comment"> * \param[in] con the container class to use. */</span></div>
<divclass="line"><aname="l00228"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1c__loop__subset.html#aab236b412de99f7a58d77d23a25ff44f"> 228</a></span> <aclass="code"href="classvoro_1_1c__loop__subset.html#aab236b412de99f7a58d77d23a25ff44f">c_loop_subset</a>(c_class &con) : <aclass="code"href="classvoro_1_1c__loop__base.html"title="Base class for looping over particles in a container.">c_loop_base</a>(con), ax(con.ax), ay(con.ay), az(con.az),</div>
<divclass="line"><aname="l00235"></a><spanclass="lineno"> 235</span> <spanclass="comment"> /** Finds the next particle to test.</span></div>
<divclass="line"><aname="l00236"></a><spanclass="lineno"> 236</span> <spanclass="comment"> * \return True if there is another particle, false if no more</span></div>
<divclass="line"><aname="l00237"></a><spanclass="lineno"> 237</span> <spanclass="comment"> * particles are available. */</span></div>
<divclass="line"><aname="l00260"></a><spanclass="lineno"> 260</span> <spanclass="comment">/** \brief Class for looping over all of the particles specified in a</span></div>
<divclass="line"><aname="l00263"></a><spanclass="lineno"> 263</span> <spanclass="comment"> * The particle_order class can be used to create a specific order of particles</span></div>
<divclass="line"><aname="l00264"></a><spanclass="lineno"> 264</span> <spanclass="comment"> * within the container. This class can then loop over these particles in this</span></div>
<divclass="line"><aname="l00265"></a><spanclass="lineno"> 265</span> <spanclass="comment"> * order. The class is particularly useful in cases where the ordering of the</span></div>
<divclass="line"><aname="l00266"></a><spanclass="lineno"> 266</span> <spanclass="comment"> * output must match the ordering of particles as they were inserted into the</span></div>
<divclass="line"><aname="l00268"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1c__loop__order.html"> 268</a></span> <spanclass="keyword">class </span><aclass="code"href="classvoro_1_1c__loop__order.html"title="Class for looping over all of the particles specified in a pre-assembled particle_order class...">c_loop_order</a> : <spanclass="keyword">public</span><aclass="code"href="classvoro_1_1c__loop__base.html"title="Base class for looping over particles in a container.">c_loop_base</a> {</div>
<divclass="line"><aname="l00270"></a><spanclass="lineno"> 270</span> <spanclass="comment"> /** A reference to the ordering class to use. */</span></div>
<divclass="line"><aname="l00271"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1c__loop__order.html#a3a9be1df3e0f88e0e3e6fc0458949987"> 271</a></span> <aclass="code"href="classvoro_1_1particle__order.html"title="A class for storing ordering information when particles are added to a container.">particle_order</a>&<aclass="code"href="classvoro_1_1c__loop__order.html#a3a9be1df3e0f88e0e3e6fc0458949987">vo</a>;<spanclass="comment"></span></div>
<divclass="line"><aname="l00272"></a><spanclass="lineno"> 272</span> <spanclass="comment"> /** A pointer to the current position in the ordering class. */</span></div>
<divclass="line"><aname="l00274"></a><spanclass="lineno"> 274</span> <spanclass="comment"> /** A pointer to the end position in the ordering class. */</span></div>
<divclass="line"><aname="l00276"></a><spanclass="lineno"> 276</span> <spanclass="comment"> /** The constructor copies several necessary constants from the</span></div>
<divclass="line"><aname="l00277"></a><spanclass="lineno"> 277</span> <spanclass="comment"> * base class, and sets up a reference to the ordering class to</span></div>
<divclass="line"><aname="l00279"></a><spanclass="lineno"> 279</span> <spanclass="comment"> * \param[in] con the container class to use.</span></div>
<divclass="line"><aname="l00280"></a><spanclass="lineno"> 280</span> <spanclass="comment"> * \param[in] vo_ the ordering class to use. */</span></div>
<divclass="line"><aname="l00282"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1c__loop__order.html#a08bc288a867bff0716d67fde7f18b892"> 282</a></span> <aclass="code"href="classvoro_1_1c__loop__order.html#a08bc288a867bff0716d67fde7f18b892">c_loop_order</a>(c_class &con,<aclass="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_)</div>
<divclass="line"><aname="l00283"></a><spanclass="lineno"> 283</span>  : <aclass="code"href="classvoro_1_1c__loop__base.html"title="Base class for looping over particles in a container.">c_loop_base</a>(con), <aclass="code"href="classvoro_1_1c__loop__order.html#a3a9be1df3e0f88e0e3e6fc0458949987">vo</a>(vo_), nx(con.nx), nxy(con.nxy) {}<spanclass="comment"></span></div>
<divclass="line"><aname="l00284"></a><spanclass="lineno"> 284</span> <spanclass="comment"> /** Sets the class to consider the first particle.</span></div>
<divclass="line"><aname="l00285"></a><spanclass="lineno"> 285</span> <spanclass="comment"> * \return True if there is any particle to consider, false</span></div>
<divclass="line"><aname="l00295"></a><spanclass="lineno"> 295</span> <spanclass="comment"> /** Finds the next particle to test.</span></div>
<divclass="line"><aname="l00296"></a><spanclass="lineno"> 296</span> <spanclass="comment"> * \return True if there is another particle, false if no more</span></div>
<divclass="line"><aname="l00297"></a><spanclass="lineno"> 297</span> <spanclass="comment"> * particles are available. */</span></div>
<divclass="line"><aname="l00305"></a><spanclass="lineno"> 305</span> <spanclass="comment"> /** The number of computational blocks in the x direction. */</span></div>
<divclass="line"><aname="l00307"></a><spanclass="lineno"> 307</span> <spanclass="comment"> /** The number of computational blocks in a z-slice. */</span></div>
<divclass="line"><aname="l00309"></a><spanclass="lineno"> 309</span> <spanclass="comment"> /** Takes the current block index and computes indices in the</span></div>
<divclass="line"><aname="l00310"></a><spanclass="lineno"> 310</span> <spanclass="comment"> * x, y, and z directions. */</span></div>
<divclass="line"><aname="l00319"></a><spanclass="lineno"> 319</span> <spanclass="comment">/** \brief A class for looping over all particles in a container_periodic or</span></div>
<divclass="line"><aname="l00322"></a><spanclass="lineno"> 322</span> <spanclass="comment"> * Since the container_periodic and container_periodic_poly classes have a</span></div>
<divclass="line"><aname="l00323"></a><spanclass="lineno"> 323</span> <spanclass="comment"> * fundamentally different memory organization, the regular loop classes cannot</span></div>
<divclass="line"><aname="l00324"></a><spanclass="lineno"> 324</span> <spanclass="comment"> * be used with them. */</span></div>
<divclass="line"><aname="l00325"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1c__loop__all__periodic.html"> 325</a></span> <spanclass="keyword">class </span><aclass="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> : <spanclass="keyword">public</span><aclass="code"href="classvoro_1_1c__loop__base.html"title="Base class for looping over particles in a container.">c_loop_base</a> {</div>
<divclass="line"><aname="l00327"></a><spanclass="lineno"> 327</span> <spanclass="comment"> /** The constructor copies several necessary constants from the</span></div>
<divclass="line"><aname="l00328"></a><spanclass="lineno"> 328</span> <spanclass="comment"> * base periodic container class.</span></div>
<divclass="line"><aname="l00329"></a><spanclass="lineno"> 329</span> <spanclass="comment"> * \param[in] con the periodic container class to use. */</span></div>
<divclass="line"><aname="l00331"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1c__loop__all__periodic.html#a07dc6f74c7a503bb8cb4e7fa4f2e84ff"> 331</a></span> <aclass="code"href="classvoro_1_1c__loop__all__periodic.html#a07dc6f74c7a503bb8cb4e7fa4f2e84ff">c_loop_all_periodic</a>(c_class &con) : <aclass="code"href="classvoro_1_1c__loop__base.html"title="Base class for looping over particles in a container.">c_loop_base</a>(con), ey(con.ey), ez(con.ez), wy(con.wy), wz(con.wz),</div>
<divclass="line"><aname="l00333"></a><spanclass="lineno"> 333</span> <spanclass="comment"> /** Sets the class to consider the first particle.</span></div>
<divclass="line"><aname="l00334"></a><spanclass="lineno"> 334</span> <spanclass="comment"> * \return True if there is any particle to consider, false</span></div>
<divclass="line"><aname="l00345"></a><spanclass="lineno"> 345</span> <spanclass="comment"> /** Finds the next particle to test.</span></div>
<divclass="line"><aname="l00346"></a><spanclass="lineno"> 346</span> <spanclass="comment"> * \return True if there is another particle, false if no more</span></div>
<divclass="line"><aname="l00347"></a><spanclass="lineno"> 347</span> <spanclass="comment"> * particles are available. */</span></div>
<divclass="line"><aname="l00359"></a><spanclass="lineno"> 359</span> <spanclass="comment"> /** The lower y index (inclusive) of the primary domain within</span></div>
<divclass="line"><aname="l00360"></a><spanclass="lineno"> 360</span> <spanclass="comment"> * the block structure. */</span></div>
<divclass="line"><aname="l00362"></a><spanclass="lineno"> 362</span> <spanclass="comment"> /** The lower y index (inclusive) of the primary domain within</span></div>
<divclass="line"><aname="l00363"></a><spanclass="lineno"> 363</span> <spanclass="comment"> * the block structure. */</span></div>
<divclass="line"><aname="l00365"></a><spanclass="lineno"> 365</span> <spanclass="comment"> /** The upper y index (exclusive) of the primary domain within</span></div>
<divclass="line"><aname="l00366"></a><spanclass="lineno"> 366</span> <spanclass="comment"> * the block structure. */</span></div>
<divclass="line"><aname="l00368"></a><spanclass="lineno"> 368</span> <spanclass="comment"> /** The upper z index (exclusive) of the primary domain within</span></div>
<divclass="line"><aname="l00369"></a><spanclass="lineno"> 369</span> <spanclass="comment"> * the block structure. */</span></div>
<divclass="line"><aname="l00371"></a><spanclass="lineno"> 371</span> <spanclass="comment"> /** The index of the (0,0,0) block within the block structure.</span></div>
<divclass="line"><aname="l00374"></a><spanclass="lineno"> 374</span> <spanclass="comment"> /** A value to increase ijk by when the z index is increased.</span></div>
<divclass="line"><aname="l00377"></a><spanclass="lineno"> 377</span> <spanclass="comment"> /** Updates the internal variables to find the next</span></div>
<divclass="line"><aname="l00378"></a><spanclass="lineno"> 378</span> <spanclass="comment"> * computational block with any particles.</span></div>
<divclass="line"><aname="l00379"></a><spanclass="lineno"> 379</span> <spanclass="comment"> * \return True if another block is found, false if there are</span></div>
<divclass="line"><aname="l00380"></a><spanclass="lineno"> 380</span> <spanclass="comment"> * no more blocks. */</span></div>
<divclass="line"><aname="l00395"></a><spanclass="lineno"> 395</span> <spanclass="comment">/** \brief Class for looping over all of the particles specified in a</span></div>
<divclass="line"><aname="l00396"></a><spanclass="lineno"> 396</span> <spanclass="comment"> * pre-assembled particle_order class, for use with container_periodic classes.</span></div>
<divclass="line"><aname="l00398"></a><spanclass="lineno"> 398</span> <spanclass="comment"> * The particle_order class can be used to create a specific order of particles</span></div>
<divclass="line"><aname="l00399"></a><spanclass="lineno"> 399</span> <spanclass="comment"> * within the container. This class can then loop over these particles in this</span></div>
<divclass="line"><aname="l00400"></a><spanclass="lineno"> 400</span> <spanclass="comment"> * order. The class is particularly useful in cases where the ordering of the</span></div>
<divclass="line"><aname="l00401"></a><spanclass="lineno"> 401</span> <spanclass="comment"> * output must match the ordering of particles as they were inserted into the</span></div>
<divclass="line"><aname="l00403"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1c__loop__order__periodic.html"> 403</a></span> <spanclass="keyword">class </span><aclass="code"href="classvoro_1_1c__loop__order__periodic.html"title="Class for looping over all of the particles specified in a pre-assembled particle_order class...">c_loop_order_periodic</a> : <spanclass="keyword">public</span><aclass="code"href="classvoro_1_1c__loop__base.html"title="Base class for looping over particles in a container.">c_loop_base</a> {</div>
<divclass="line"><aname="l00405"></a><spanclass="lineno"> 405</span> <spanclass="comment"> /** A reference to the ordering class to use. */</span></div>
<divclass="line"><aname="l00406"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1c__loop__order__periodic.html#a73e215fc8915ed65f17e633d85c0f018"> 406</a></span> <aclass="code"href="classvoro_1_1particle__order.html"title="A class for storing ordering information when particles are added to a container.">particle_order</a>&<aclass="code"href="classvoro_1_1c__loop__order__periodic.html#a73e215fc8915ed65f17e633d85c0f018">vo</a>;<spanclass="comment"></span></div>
<divclass="line"><aname="l00407"></a><spanclass="lineno"> 407</span> <spanclass="comment"> /** A pointer to the current position in the ordering class. */</span></div>
<divclass="line"><aname="l00409"></a><spanclass="lineno"> 409</span> <spanclass="comment"> /** A pointer to the end position in the ordering class. */</span></div>
<divclass="line"><aname="l00411"></a><spanclass="lineno"> 411</span> <spanclass="comment"> /** The constructor copies several necessary constants from the</span></div>
<divclass="line"><aname="l00412"></a><spanclass="lineno"> 412</span> <spanclass="comment"> * base class, and sets up a reference to the ordering class to</span></div>
<divclass="line"><aname="l00414"></a><spanclass="lineno"> 414</span> <spanclass="comment"> * \param[in] con the container class to use.</span></div>
<divclass="line"><aname="l00415"></a><spanclass="lineno"> 415</span> <spanclass="comment"> * \param[in] vo_ the ordering class to use. */</span></div>
<divclass="line"><aname="l00417"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1c__loop__order__periodic.html#adb9aea9a009c1dfdd231b608257d04f9"> 417</a></span> <aclass="code"href="classvoro_1_1c__loop__order__periodic.html#adb9aea9a009c1dfdd231b608257d04f9">c_loop_order_periodic</a>(c_class &con,<aclass="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_)</div>
<divclass="line"><aname="l00418"></a><spanclass="lineno"> 418</span>  : <aclass="code"href="classvoro_1_1c__loop__base.html"title="Base class for looping over particles in a container.">c_loop_base</a>(con), <aclass="code"href="classvoro_1_1c__loop__order__periodic.html#a73e215fc8915ed65f17e633d85c0f018">vo</a>(vo_), nx(con.nx), oxy(con.nx*con.oy) {}<spanclass="comment"></span></div>
<divclass="line"><aname="l00419"></a><spanclass="lineno"> 419</span> <spanclass="comment"> /** Sets the class to consider the first particle.</span></div>
<divclass="line"><aname="l00420"></a><spanclass="lineno"> 420</span> <spanclass="comment"> * \return True if there is any particle to consider, false</span></div>
<divclass="line"><aname="l00430"></a><spanclass="lineno"> 430</span> <spanclass="comment"> /** Finds the next particle to test.</span></div>
<divclass="line"><aname="l00431"></a><spanclass="lineno"> 431</span> <spanclass="comment"> * \return True if there is another particle, false if no more</span></div>
<divclass="line"><aname="l00432"></a><spanclass="lineno"> 432</span> <spanclass="comment"> * particles are available. */</span></div>
<divclass="line"><aname="l00440"></a><spanclass="lineno"> 440</span> <spanclass="comment"> /** The number of computational blocks in the x direction. */</span></div>
<divclass="line"><aname="l00442"></a><spanclass="lineno"> 442</span> <spanclass="comment"> /** The number of computational blocks in a z-slice. */</span></div>
<divclass="line"><aname="l00444"></a><spanclass="lineno"> 444</span> <spanclass="comment"> /** Takes the current block index and computes indices in the</span></div>
<divclass="line"><aname="l00445"></a><spanclass="lineno"> 445</span> <spanclass="comment"> * x, y, and z directions. */</span></div>