<ahref="pre__container_8hh.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">// Voro++, a 3D cell-based Voronoi library</span></div>
<divclass="line"><aname="l00008"></a><spanclass="lineno"> 8</span> <spanclass="comment"> * \brief Header file for the pre_container and related classes. */</span></div>
<divclass="line"><aname="l00015"></a><spanclass="lineno"> 15</span> <spanclass="preprocessor">#include "<aclass="code"href="c__loops_8hh.html"title="Header file for the loop classes.">c_loops.hh</a>"</span></div>
<divclass="line"><aname="l00016"></a><spanclass="lineno"> 16</span> <spanclass="preprocessor">#include "<aclass="code"href="container_8hh.html"title="Header file for the container_base and related classes.">container.hh</a>"</span></div>
<divclass="line"><aname="l00020"></a><spanclass="lineno"> 20</span> <spanclass="comment">/** \brief A class for storing an arbitrary number of particles, prior to setting</span></div>
<divclass="line"><aname="l00021"></a><spanclass="lineno"> 21</span> <spanclass="comment"> * up a container geometry.</span></div>
<divclass="line"><aname="l00023"></a><spanclass="lineno"> 23</span> <spanclass="comment"> * The pre_container_base class can dynamically import and store an arbitrary</span></div>
<divclass="line"><aname="l00024"></a><spanclass="lineno"> 24</span> <spanclass="comment"> * number of particles. Once the particles have been read in, an appropriate</span></div>
<divclass="line"><aname="l00025"></a><spanclass="lineno"> 25</span> <spanclass="comment"> * container class can be set up with the optimal grid size, and the particles</span></div>
<divclass="line"><aname="l00026"></a><spanclass="lineno"> 26</span> <spanclass="comment"> * can be transferred.</span></div>
<divclass="line"><aname="l00028"></a><spanclass="lineno"> 28</span> <spanclass="comment"> * The pre_container_base class is not intended for direct use, but forms the</span></div>
<divclass="line"><aname="l00029"></a><spanclass="lineno"> 29</span> <spanclass="comment"> * base of the pre_container and pre_container_poly classes, that add routines</span></div>
<divclass="line"><aname="l00030"></a><spanclass="lineno"> 30</span> <spanclass="comment"> * depending on whether particle radii need to be tracked or not. */</span></div>
<divclass="line"><aname="l00031"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1pre__container__base.html"> 31</a></span> <spanclass="keyword">class </span><aclass="code"href="classvoro_1_1pre__container__base.html"title="A class for storing an arbitrary number of particles, prior to setting up a container geometry...">pre_container_base</a> {</div>
<divclass="line"><aname="l00033"></a><spanclass="lineno"> 33</span> <spanclass="comment"> /** The minimum x coordinate of the container. */</span></div>
<divclass="line"><aname="l00035"></a><spanclass="lineno"> 35</span> <spanclass="comment"> /** The maximum x coordinate of the container. */</span></div>
<divclass="line"><aname="l00037"></a><spanclass="lineno"> 37</span> <spanclass="comment"> /** The minimum y coordinate of the container. */</span></div>
<divclass="line"><aname="l00039"></a><spanclass="lineno"> 39</span> <spanclass="comment"> /** The maximum y coordinate of the container. */</span></div>
<divclass="line"><aname="l00041"></a><spanclass="lineno"> 41</span> <spanclass="comment"> /** The minimum z coordinate of the container. */</span></div>
<divclass="line"><aname="l00043"></a><spanclass="lineno"> 43</span> <spanclass="comment"> /** The maximum z coordinate of the container. */</span></div>
<divclass="line"><aname="l00045"></a><spanclass="lineno"> 45</span> <spanclass="comment"> /** A boolean value that determines if the x coordinate in</span></div>
<divclass="line"><aname="l00046"></a><spanclass="lineno"> 46</span> <spanclass="comment"> * periodic or not. */</span></div>
<divclass="line"><aname="l00048"></a><spanclass="lineno"> 48</span> <spanclass="comment"> /** A boolean value that determines if the y coordinate in</span></div>
<divclass="line"><aname="l00049"></a><spanclass="lineno"> 49</span> <spanclass="comment"> * periodic or not. */</span></div>
<divclass="line"><aname="l00051"></a><spanclass="lineno"> 51</span> <spanclass="comment"> /** A boolean value that determines if the z coordinate in</span></div>
<divclass="line"><aname="l00052"></a><spanclass="lineno"> 52</span> <spanclass="comment"> * periodic or not. */</span></div>
<divclass="line"><aname="l00057"></a><spanclass="lineno"> 57</span> <spanclass="comment"> /** Calculates and returns the total number of particles stored</span></div>
<divclass="line"><aname="l00058"></a><spanclass="lineno"> 58</span> <spanclass="comment"> * within the class.</span></div>
<divclass="line"><aname="l00059"></a><spanclass="lineno"> 59</span> <spanclass="comment"> * \return The number of particles. */</span></div>
<divclass="line"><aname="l00064"></a><spanclass="lineno"> 64</span> <spanclass="comment"> /** The number of doubles associated with a single particle</span></div>
<divclass="line"><aname="l00065"></a><spanclass="lineno"> 65</span> <spanclass="comment"> * (three for the standard container, four when radius</span></div>
<divclass="line"><aname="l00066"></a><spanclass="lineno"> 66</span> <spanclass="comment"> * information is stored). */</span></div>
<divclass="line"><aname="l00072"></a><spanclass="lineno"> 72</span> <spanclass="comment"> /** A pointer to the chunk index to store the integer particle</span></div>
<divclass="line"><aname="l00075"></a><spanclass="lineno"> 75</span> <spanclass="comment"> /** A pointer to the last allocated integer ID chunk. */</span></div>
<divclass="line"><aname="l00077"></a><spanclass="lineno"> 77</span> <spanclass="comment"> /** A pointer to the end of the integer ID chunk index, used to</span></div>
<divclass="line"><aname="l00078"></a><spanclass="lineno"> 78</span> <spanclass="comment"> * determine when the chunk index is full. */</span></div>
<divclass="line"><aname="l00080"></a><spanclass="lineno"> 80</span> <spanclass="comment"> /** A pointer to the next available slot on the current</span></div>
<divclass="line"><aname="l00081"></a><spanclass="lineno"> 81</span> <spanclass="comment"> * particle ID chunk. */</span></div>
<divclass="line"><aname="l00083"></a><spanclass="lineno"> 83</span> <spanclass="comment"> /** A pointer to the end of the current integer chunk. */</span></div>
<divclass="line"><aname="l00085"></a><spanclass="lineno"> 85</span> <spanclass="comment"> /** A pointer to the chunk index to store the floating point</span></div>
<divclass="line"><aname="l00086"></a><spanclass="lineno"> 86</span> <spanclass="comment"> * information associated with particles. */</span></div>
<divclass="line"><aname="l00088"></a><spanclass="lineno"> 88</span> <spanclass="comment"> /** A pointer to the last allocated chunk of floating point</span></div>
<divclass="line"><aname="l00091"></a><spanclass="lineno"> 91</span> <spanclass="comment"> /** A pointer to the next available slot on the current</span></div>
<divclass="line"><aname="l00092"></a><spanclass="lineno"> 92</span> <spanclass="comment"> * floating point chunk. */</span></div>
<divclass="line"><aname="l00096"></a><spanclass="lineno"> 96</span> <spanclass="comment">/** \brief A class for storing an arbitrary number of particles without radius</span></div>
<divclass="line"><aname="l00097"></a><spanclass="lineno"> 97</span> <spanclass="comment"> * information, prior to setting up a container geometry.</span></div>
<divclass="line"><aname="l00099"></a><spanclass="lineno"> 99</span> <spanclass="comment"> * The pre_container class is an extension of the pre_container_base class for</span></div>
<divclass="line"><aname="l00100"></a><spanclass="lineno"> 100</span> <spanclass="comment"> * cases when no particle radius information is available. */</span></div>
<divclass="line"><aname="l00101"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1pre__container.html"> 101</a></span> <spanclass="keyword">class </span><aclass="code"href="classvoro_1_1pre__container.html"title="A class for storing an arbitrary number of particles without radius information, prior to setting up ...">pre_container</a> : <spanclass="keyword">public</span><aclass="code"href="classvoro_1_1pre__container__base.html"title="A class for storing an arbitrary number of particles, prior to setting up a container geometry...">pre_container_base</a> {</div>
<divclass="line"><aname="l00103"></a><spanclass="lineno"> 103</span> <spanclass="comment"> /** The class constructor sets up the geometry of container,</span></div>
<divclass="line"><aname="l00104"></a><spanclass="lineno"> 104</span> <spanclass="comment"> * initializing the minimum and maximum coordinates in each</span></div>
<divclass="line"><aname="l00106"></a><spanclass="lineno"> 106</span> <spanclass="comment"> * \param[in] (ax_,bx_) the minimum and maximum x coordinates.</span></div>
<divclass="line"><aname="l00107"></a><spanclass="lineno"> 107</span> <spanclass="comment"> * \param[in] (ay_,by_) the minimum and maximum y coordinates.</span></div>
<divclass="line"><aname="l00108"></a><spanclass="lineno"> 108</span> <spanclass="comment"> * \param[in] (az_,bz_) the minimum and maximum z coordinates.</span></div>
<divclass="line"><aname="l00114"></a><spanclass="lineno"> 114</span>  : <aclass="code"href="classvoro_1_1pre__container__base.html"title="A class for storing an arbitrary number of particles, prior to setting up a container geometry...">pre_container_base</a>(ax_,bx_,ay_,by_,az_,bz_,xperiodic_,yperiodic_,zperiodic_,3) {};</div>
<divclass="line"><aname="l00117"></a><spanclass="lineno"> 117</span> <spanclass="comment"> /** Imports particles from a file.</span></div>
<divclass="line"><aname="l00118"></a><spanclass="lineno"> 118</span> <spanclass="comment"> * \param[in] filename the name of the file to read from. */</span></div>
<divclass="line"><aname="l00124"></a><spanclass="lineno"> 124</span> <spanclass="keywordtype">void</span><aclass="code"href="classvoro_1_1pre__container.html#a7a2e73ad34fbfe1001f59ea3b69f992f">setup</a>(<aclass="code"href="classvoro_1_1container.html"title="Extension of the container_base class for computing regular Voronoi tessellations.">container</a>&con);</div>
<divclass="line"><aname="l00125"></a><spanclass="lineno"> 125</span> <spanclass="keywordtype">void</span><aclass="code"href="classvoro_1_1pre__container.html#a7a2e73ad34fbfe1001f59ea3b69f992f">setup</a>(<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,<aclass="code"href="classvoro_1_1container.html"title="Extension of the container_base class for computing regular Voronoi tessellations.">container</a>&con);</div>
<divclass="line"><aname="l00128"></a><spanclass="lineno"> 128</span> <spanclass="comment">/** \brief A class for storing an arbitrary number of particles with radius</span></div>
<divclass="line"><aname="l00129"></a><spanclass="lineno"> 129</span> <spanclass="comment"> * information, prior to setting up a container geometry.</span></div>
<divclass="line"><aname="l00131"></a><spanclass="lineno"> 131</span> <spanclass="comment"> * The pre_container_poly class is an extension of the pre_container_base class</span></div>
<divclass="line"><aname="l00132"></a><spanclass="lineno"> 132</span> <spanclass="comment"> * for cases when particle radius information is available. */</span></div>
<divclass="line"><aname="l00133"></a><spanclass="lineno"><aclass="code"href="classvoro_1_1pre__container__poly.html"> 133</a></span> <spanclass="keyword">class </span><aclass="code"href="classvoro_1_1pre__container__poly.html"title="A class for storing an arbitrary number of particles with radius information, prior to setting up a c...">pre_container_poly</a> : <spanclass="keyword">public</span><aclass="code"href="classvoro_1_1pre__container__base.html"title="A class for storing an arbitrary number of particles, prior to setting up a container geometry...">pre_container_base</a> {</div>
<divclass="line"><aname="l00135"></a><spanclass="lineno"> 135</span> <spanclass="comment"> /** The class constructor sets up the geometry of container,</span></div>
<divclass="line"><aname="l00136"></a><spanclass="lineno"> 136</span> <spanclass="comment"> * initializing the minimum and maximum coordinates in each</span></div>
<divclass="line"><aname="l00138"></a><spanclass="lineno"> 138</span> <spanclass="comment"> * \param[in] (ax_,bx_) the minimum and maximum x coordinates.</span></div>
<divclass="line"><aname="l00139"></a><spanclass="lineno"> 139</span> <spanclass="comment"> * \param[in] (ay_,by_) the minimum and maximum y coordinates.</span></div>
<divclass="line"><aname="l00140"></a><spanclass="lineno"> 140</span> <spanclass="comment"> * \param[in] (az_,bz_) the minimum and maximum z coordinates.</span></div>
<divclass="line"><aname="l00146"></a><spanclass="lineno"> 146</span>  : <aclass="code"href="classvoro_1_1pre__container__base.html"title="A class for storing an arbitrary number of particles, prior to setting up a container geometry...">pre_container_base</a>(ax_,bx_,ay_,by_,az_,bz_,xperiodic_,yperiodic_,zperiodic_,4) {};</div>
<divclass="line"><aname="l00149"></a><spanclass="lineno"> 149</span> <spanclass="comment"> /** Imports particles from a file.</span></div>
<divclass="line"><aname="l00150"></a><spanclass="lineno"> 150</span> <spanclass="comment"> * \param[in] filename the name of the file to read from. */</span></div>
<divclass="line"><aname="l00156"></a><spanclass="lineno"> 156</span> <spanclass="keywordtype">void</span><aclass="code"href="classvoro_1_1pre__container__poly.html#ac71c0ee24182a115ce79da4cc91ee356">setup</a>(<aclass="code"href="classvoro_1_1container__poly.html"title="Extension of the container_base class for computing radical Voronoi tessellations.">container_poly</a>&con);</div>
<divclass="line"><aname="l00157"></a><spanclass="lineno"> 157</span> <spanclass="keywordtype">void</span><aclass="code"href="classvoro_1_1pre__container__poly.html#ac71c0ee24182a115ce79da4cc91ee356">setup</a>(<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,<aclass="code"href="classvoro_1_1container__poly.html"title="Extension of the container_base class for computing radical Voronoi tessellations.">container_poly</a>&con);</div>