<a href="#pub-methods">Public Member Functions</a> |
<a href="#friends">Friends</a> </div>
<div class="headertitle">
<div class="title">voro::container Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Extension of the <a class="el" href="classvoro_1_1container__base.html" title="Class for representing a particle system in a three-dimensional rectangular box.">container_base</a> class for computing regular Voronoi tessellations.
<area href="classvoro_1_1container__base.html" title="Class for representing a particle system in a three-dimensional rectangular box." alt="voro::container_base" shape="rect" coords="70,56,201,80"/>
<area href="classvoro_1_1radius__mono.html" title="Class containing all of the routines that are specific to computing the regular Voronoi tessellation..." alt="voro::radius_mono" shape="rect" coords="211,56,342,80"/>
<area href="classvoro_1_1voro__base.html" title="Class containing data structures common across all particle container classes." alt="voro::voro_base" shape="rect" coords="0,0,131,24"/>
<area href="classvoro_1_1wall__list.html" title="A class for storing a list of pointers to walls." alt="voro::wall_list" shape="rect" coords="141,0,272,24"/>
<tr class="memitem:af6d18399db1c92816296bc70af8440b5"><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classvoro_1_1container__base.html#af6d18399db1c92816296bc70af8440b5">initialize_voronoicell</a> (v_cell &c, int ijk, int q, int ci, int cj, int ck, int &i, int &j, int &k, double &x, double &y, double &z, int &disp)</td></tr>
<tr class="memitem:a30dbb059792c199f2526c13990cd8daf inherit pub_methods_classvoro_1_1container__base"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvoro_1_1container__base.html#a30dbb059792c199f2526c13990cd8daf">initialize_search</a> (int ci, int cj, int ck, int ijk, int &i, int &j, int &k, int &disp)</td></tr>
<tr class="memitem:a76b645960fba43620e096b7bdf178603 inherit pub_methods_classvoro_1_1container__base"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classvoro_1_1container__base.html#a76b645960fba43620e096b7bdf178603">region_index</a> (int ci, int cj, int ck, int ei, int ej, int ek, double &qx, double &qy, double &qz, int &disp)</td></tr>
<div class="textblock"><p>This class is an extension of the <a class="el" href="classvoro_1_1container__base.html" title="Class for representing a particle system in a three-dimensional rectangular box.">container_base</a> class that has routines specifically for computing the regular Voronoi tessellation with no dependence on particle radii. </p>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00285">285</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
</div><hr/><h2>Constructor & Destructor Documentation</h2>
<p>The class constructor sets up the geometry of container. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">(ax_,bx_)</td><td>the minimum and maximum x coordinates. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">(ay_,by_)</td><td>the minimum and maximum y coordinates. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">(az_,bz_)</td><td>the minimum and maximum z coordinates. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">(nx_,ny_,nz_)</td><td>the number of grid blocks in each of the three coordinate directions. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">(xperiodic_,yperiodic_,zperiodic_)</td><td>flags setting whether the container is periodic in each coordinate direction. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">init_mem</td><td>the initial memory allocation for each block. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8cc_source.html#l00064">64</a> of file <a class="el" href="container_8cc_source.html">container.cc</a>.</p>
<p>Definition at line <a class="el" href="container_8cc_source.html#l00384">384</a> of file <a class="el" href="container_8cc_source.html">container.cc</a>.</p>
<p>Computes all of the Voronoi cells in the container, but does nothing with the output. It is useful for measuring the pure computation time of the Voronoi algorithm, without any additional calculations such as volume evaluation or cell output. </p>
<p>Definition at line <a class="el" href="container_8cc_source.html#l00435">435</a> of file <a class="el" href="container_8cc_source.html">container.cc</a>.</p>
<p>Computes the Voronoi cell for a particle currently being referenced by a loop class. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">c</td><td>a Voronoi cell class in which to store the computed cell. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">vl</td><td>the loop class to use. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if the cell was computed. If the cell cannot be computed, if it is removed entirely by a wall or boundary condition, then the routine returns false. </dd></dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00460">460</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Computes the Voronoi cell for given particle. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">c</td><td>a Voronoi cell class in which to store the computed cell. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ijk</td><td>the block that the particle is within. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">q</td><td>the index of the particle within the block. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if the cell was computed. If the cell cannot be computed, if it is removed entirely by a wall or boundary condition, then the routine returns false. </dd></dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00472">472</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Computes Voronoi cells and saves the output in gnuplot format. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">vl</td><td>the loop class to use. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fp</td><td>a file handle to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00376">376</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Computes all Voronoi cells and saves the output in gnuplot format. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">fp</td><td>a file handle to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00386">386</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Computes all Voronoi cells and saves the output in gnuplot format. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>the name of the file to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00393">393</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Computes Voronoi cells and saves the output in POV-Ray format. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">vl</td><td>the loop class to use. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fp</td><td>a file handle to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00403">403</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Computes all Voronoi cells and saves the output in POV-Ray format. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">fp</td><td>a file handle to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00414">414</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Computes all Voronoi cells and saves the output in POV-Ray format. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>the name of the file to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00421">421</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Dumps particle IDs and positions to a file. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">vl</td><td>the loop class to use. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fp</td><td>a file handle to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00326">326</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Dumps all of the particle IDs and positions to a file. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">fp</td><td>a file handle to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00335">335</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Dumps all of the particle IDs and positions to a file. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>the name of the file to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00341">341</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Dumps particle positions in POV-Ray format. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">vl</td><td>the loop class to use. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fp</td><td>a file handle to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00350">350</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Dumps all particle positions in POV-Ray format. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">fp</td><td>a file handle to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00360">360</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Dumps all particle positions in POV-Ray format. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>the name of the file to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00366">366</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Takes a vector and finds the particle whose Voronoi cell contains that vector. This is equivalent to finding the particle which is nearest to the vector. Additional wall classes are not considered by this routine. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">(x,y,z)</td><td>the vector to test. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">(rx,ry,rz)</td><td>the position of the particle whose Voronoi cell contains the vector. If the container is periodic, this may point to a particle in a periodic image of the primary domain. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">pid</td><td>the ID of the particle. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if a particle was found. If the container has no particles, then the search will not find a Voronoi cell and false is returned. </dd></dl>
<p>Definition at line <a class="el" href="container_8cc_source.html#l00234">234</a> of file <a class="el" href="container_8cc_source.html">container.cc</a>.</p>
<p>Import a list of particles from an open file stream into the container. Entries of four numbers (Particle ID, x position, y position, z position) are searched for. If the file cannot be successfully read, then the routine causes a fatal error. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">fp</td><td>the file handle to read from. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8cc_source.html#l00330">330</a> of file <a class="el" href="container_8cc_source.html">container.cc</a>.</p>
<p>Import a list of particles from an open file stream, also storing the order of that the particles are read. Entries of four numbers (Particle ID, x position, y position, z position) are searched for. If the file cannot be successfully read, then the routine causes a fatal error. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">vo</td><td>a reference to an ordering class to use. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fp</td><td>the file handle to read from. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8cc_source.html#l00343">343</a> of file <a class="el" href="container_8cc_source.html">container.cc</a>.</p>
<p>Imports a list of particles from an open file stream into the container. Entries of four numbers (Particle ID, x position, y position, z position) are searched for. If the file cannot be successfully read, then the routine causes a fatal error. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>the name of the file to open and read from. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00301">301</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Imports a list of particles from an open file stream into the container. Entries of four numbers (Particle ID, x position, y position, z position) are searched for. In addition, the order in which particles are read is saved into an ordering class. If the file cannot be successfully read, then the routine causes a fatal error. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">vo</td><td>the ordering class to use. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>the name of the file to open and read from. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00315">315</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Computes the Voronoi cells and saves customized information about them. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">vl</td><td>the loop class to use. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>the custom output string to use. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fp</td><td>a file handle to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8hh_source.html#l00432">432</a> of file <a class="el" href="container_8hh_source.html">container.hh</a>.</p>
<p>Computes all the Voronoi cells and saves customized information about them. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>the custom output string to use. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fp</td><td>a file handle to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8cc_source.html#l00398">398</a> of file <a class="el" href="container_8cc_source.html">container.cc</a>.</p>
<p>Computes all the Voronoi cells and saves customized information about them. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>the custom output string to use. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>the name of the file to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8cc_source.html#l00415">415</a> of file <a class="el" href="container_8cc_source.html">container.cc</a>.</p>
<p>Put a particle into the correct region of the container. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>the numerical ID of the inserted particle. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">(x,y,z)</td><td>the position vector of the inserted particle. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8cc_source.html#l00087">87</a> of file <a class="el" href="container_8cc_source.html">container.cc</a>.</p>
<p>Put a particle into the correct region of the container, also recording into which region it was stored. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">vo</td><td>the ordering class in which to record the region. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>the numerical ID of the inserted particle. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">(x,y,z)</td><td>the position vector of the inserted particle. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="container_8cc_source.html#l00115">115</a> of file <a class="el" href="container_8cc_source.html">container.cc</a>.</p>
<p>Calculates all of the Voronoi cells and sums their volumes. In most cases without walls, the sum of the Voronoi cell volumes should equal the volume of the container to numerical precision. </p>
<dl class="section return"><dt>Returns:</dt><dd>The sum of all of the computed Voronoi volumes. </dd></dl>
<p>Definition at line <a class="el" href="container_8cc_source.html#l00456">456</a> of file <a class="el" href="container_8cc_source.html">container.cc</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>