<a href="c__loops_8cc.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 Function implementations for the loop classes. */</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">/** Initializes a c_loop_subset object to scan over all particles within a</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * given sphere.</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * \param[in] (vx,vy,vz) the position vector of the center of the sphere.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * \param[in] r the radius of the sphere.</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * \param[in] bounds_test whether to do detailed bounds checking. If this is</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * false then the class will loop over all particles in</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * blocks that overlap the given sphere. If it is true,</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * the particle will only loop over the particles which</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * actually lie within the sphere.</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> * \return True if there is any valid point to loop over, false otherwise. */</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment">/** Initializes the class to loop over all particles in a rectangular subgrid</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment"> * of blocks.</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment"> * \param[in] (ai_,bi_) the subgrid range in the x-direction, inclusive of both</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment"> * \param[in] (aj_,bj_) the subgrid range in the y-direction, inclusive of both</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="comment"> * \param[in] (ak_,bk_) the subgrid range in the z-direction, inclusive of both</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment"> * \return True if there is any valid point to loop over, false otherwise. */</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment">/** Sets up all of the common constants used for the loop.</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment"> * \return True if there is any valid point to loop over, false otherwise. */</span></div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="comment">/** Starts the loop by finding the first particle within the container to</span></div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment"> * \return True if there is any particle to consider, false otherwise. */</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="comment">/** Initializes the class to loop over all particles in a rectangular box.</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="comment"> * \param[in] (xmin,xmax) the minimum and maximum x coordinates of the box.</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="comment"> * \param[in] (ymin,ymax) the minimum and maximum y coordinates of the box.</span></div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="comment"> * \param[in] (zmin,zmax) the minimum and maximum z coordinates of the box.</span></div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="comment"> * \param[in] bounds_test whether to do detailed bounds checking. If this is</span></div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="comment"> * false then the class will loop over all particles in</span></div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="comment"> * blocks that overlap the given box. If it is true, the</span></div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="comment"> * particle will only loop over the particles which</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="comment"> * actually lie within the box.</span></div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment"> * \return True if there is any valid point to loop over, false otherwise. */</span></div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment">/** Computes whether the current point is out of bounds, relative to the</span></div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment"> * current loop setup.</span></div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment"> * \return True if the point is out of bounds, false otherwise. */</span></div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="comment">/** Returns the next block to be tested in a loop, and updates the periodicity</span></div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> <span class="comment">/** Extends the memory available for storing the ordering. */</span></div>