<areahref="classvoro_1_1voronoicell.html"title="Extension of the voronoicell_base class to represent a Voronoi cell without neighbor information..."alt="voro::voronoicell"shape="rect"coords="0,56,164,80"/>
<areahref="classvoro_1_1voronoicell__neighbor.html"title="Extension of the voronoicell_base class to represent a Voronoi cell with neighbor information..."alt="voro::voronoicell_neighbor"shape="rect"coords="174,56,338,80"/>
<trclass="memitem:adfed605232f7e6d1b52276010facbf08"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classvoro_1_1voronoicell__base.html#adfed605232f7e6d1b52276010facbf08">vertex_orders</a> (std::vector< int >&v)</td></tr>
<trclass="memitem:af9bad3fddace8e63ac4c0a5874aee7c5"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classvoro_1_1voronoicell__base.html#af9bad3fddace8e63ac4c0a5874aee7c5">face_orders</a> (std::vector< int >&v)</td></tr>
<trclass="memitem:a9df53445116446fafea8ffc4ee1afa76"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classvoro_1_1voronoicell__base.html#a9df53445116446fafea8ffc4ee1afa76">face_freq_table</a> (std::vector< int >&v)</td></tr>
<trclass="memitem:a83e74ffece2b313f6691f467769a16f5"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classvoro_1_1voronoicell__base.html#a83e74ffece2b313f6691f467769a16f5">face_vertices</a> (std::vector< int >&v)</td></tr>
<trclass="memitem:a59dd181ccbcc66370ef8b5c4bf250843"><tdclass="memItemLeft"align="right"valign="top">virtual void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classvoro_1_1voronoicell__base.html#a59dd181ccbcc66370ef8b5c4bf250843">neighbors</a> (std::vector< int >&v)</td></tr>
<trclass="memitem:a1d86762311d8860960a45cc409b14f0f"><tdclass="memItemLeft"align="right"valign="top">int </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classvoro_1_1voronoicell__base.html#a1d86762311d8860960a45cc409b14f0f">cycle_up</a> (int a, int <aclass="el"href="classvoro_1_1voronoicell__base.html#a7e69469f95464afbeb9feec927507243">p</a>)</td></tr>
<trclass="memitem:adfccfa7dce395277535f61f780d87c8b"><tdclass="memItemLeft"align="right"valign="top">int </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classvoro_1_1voronoicell__base.html#adfccfa7dce395277535f61f780d87c8b">cycle_down</a> (int a, int <aclass="el"href="classvoro_1_1voronoicell__base.html#a7e69469f95464afbeb9feec927507243">p</a>)</td></tr>
<divclass="textblock"><p>This class represents a single Voronoi cell, as a collection of vertices that are connected by edges. The class contains routines for initializing the Voronoi cell to be simple shapes such as a box, tetrahedron, or octahedron. It the contains routines for recomputing the cell based on cutting it by a plane, which forms the key routine for the Voronoi cell computation. It contains numerous routine for computing statistics about the Voronoi cell, and it can output the cell in several formats.</p>
<p>This class is not intended for direct use, but forms the base of the voronoicell and <aclass="el"href="classvoro_1_1voronoicell__neighbor.html"title="Extension of the voronoicell_base class to represent a Voronoi cell with neighbor information...">voronoicell_neighbor</a> classes, which extend it based on whether neighboring particle ID information needs to be tracked. </p>
<p>Definition at line <aclass="el"href="cell_8hh_source.html#l00033">33</a> of file <aclass="el"href="cell_8hh_source.html">cell.hh</a>.</p>
</div><hr/><h2>Constructor & Destructor Documentation</h2>
<p>Calculates the centroid of the Voronoi cell, by decomposing the cell into tetrahedra extending outward from the zeroth vertex. </p>
<dlclass="params"><dt>Parameters:</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">(cx,cy,cz)</td><td>references to floating point numbers in which to pass back the centroid vector. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <aclass="el"href="cell_8cc_source.html#l01408">1408</a> of file <aclass="el"href="cell_8cc_source.html">cell.cc</a>.</p>
<p>This routine checks for any two vertices that are connected by more than one edge. The plane algorithm is designed so that this should not happen, so any occurrences are most likely errors. Note that the routine is O(p), so running it every time the plane routine is called will result in a significant slowdown. </p>
<p>Definition at line <aclass="el"href="cell_8cc_source.html#l00342">342</a> of file <aclass="el"href="cell_8cc_source.html">cell.cc</a>.</p>
<p>Checks that the relational table of the Voronoi cell is accurate, and prints out any errors. This algorithm is O(p), so running it every time the plane routine is called will result in a significant slowdown. </p>
<p>Definition at line <aclass="el"href="cell_8cc_source.html#l00331">331</a> of file <aclass="el"href="cell_8cc_source.html">cell.cc</a>.</p>
<p>Outputs the Voronoi cell in the POV mesh2 format, described in section 1.3.2.2 of the POV-Ray documentation. The mesh2 output consists of a list of vertex vectors, followed by a list of triangular faces. The routine also makes use of the optional inside_vector specification, which makes the mesh object solid, so the the POV-Ray Constructive Solid Geometry (CSG) can be applied. </p>
<dlclass="params"><dt>Parameters:</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">(x,y,z)</td><td>a displacement vector to be added to the cell's position. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">fp</td><td>a file handle to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <aclass="el"href="cell_8cc_source.html#l01542">1542</a> of file <aclass="el"href="cell_8cc_source.html">cell.cc</a>.</p>
<p>Initializes a Voronoi cell as a regular octahedron. </p>
<dlclass="params"><dt>Parameters:</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">l</td><td>The distance from the octahedron center to a vertex. Six vertices are initialized at (-l,0,0), (l,0,0), (0,-l,0), (0,l,0), (0,0,-l), and (0,0,l). </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <aclass="el"href="cell_8cc_source.html#l00286">286</a> of file <aclass="el"href="cell_8cc_source.html">cell.cc</a>.</p>
<p>Computes the maximum radius squared of a vertex from the center of the cell. It can be used to determine when enough particles have been testing an all planes that could cut the cell have been considered. </p>
<dlclass="section return"><dt>Returns:</dt><dd>The maximum radius squared of a vertex. </dd></dl>
<p>Definition at line <aclass="el"href="cell_8cc_source.html#l01454">1454</a> of file <aclass="el"href="cell_8cc_source.html">cell.cc</a>.</p>
<p>Returns a list of IDs of neighboring particles corresponding to each face. </p>
<dlclass="params"><dt>Parameters:</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">v</td><td>a reference to a vector in which to return the results. If no neighbor information is available, a blank vector is returned. </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented in <aclass="el"href="classvoro_1_1voronoicell__neighbor.html#a1b18405092d2229e1001933925f403ca">voro::voronoicell_neighbor</a>.</p>
<p>Definition at line <aclass="el"href="cell_8hh_source.html#l00197">197</a> of file <aclass="el"href="cell_8hh_source.html">cell.hh</a>.</p>
<p>For each face of the Voronoi cell, this routine prints the out the normal vector of the face, and scales it to the distance from the cell center to that plane. </p>
<dlclass="params"><dt>Parameters:</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">v</td><td>the vector to store the results in. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <aclass="el"href="cell_8cc_source.html#l01639">1639</a> of file <aclass="el"href="cell_8cc_source.html">cell.cc</a>.</p>
<p>Cuts the Voronoi cell by a particle whose center is at a separation of (x,y,z) from the cell center. The value of rsq should be initially set to <imgclass="formulaInl"alt="$x^2+y^2+z^2$"src="form_0.png"/>. </p>
<dlclass="params"><dt>Parameters:</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">vc</td><td>a reference to the specialized version of the calling class. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">(x,y,z)</td><td>the normal vector to the plane. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">rsq</td><td>the distance along this vector of the plane. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">p_id</td><td>the plane ID (for neighbor tracking only). </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns:</dt><dd>False if the plane cut deleted the cell entirely, true otherwise. </dd></dl>
<p>Definition at line <aclass="el"href="cell_8cc_source.html#l00404">404</a> of file <aclass="el"href="cell_8cc_source.html">cell.cc</a>.</p>
<p>Outputs a custom string of information about the Voronoi cell to a file. It assumes the cell is at (0,0,0) and has a the default_radius associated with it. </p>
<dlclass="params"><dt>Parameters:</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">format</td><td>the custom format string to use. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">fp</td><td>the file handle to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <aclass="el"href="cell_8hh_source.html#l00182">182</a> of file <aclass="el"href="cell_8hh_source.html">cell.hh</a>.</p>
<p>Outputs a custom string of information about the Voronoi cell. The string of information follows a similar style as the C printf command, and detailed information about its format is available at <ahref="http://math.lbl.gov/voro++/doc/custom.html">http://math.lbl.gov/voro++/doc/custom.html</a>. </p>
<dlclass="params"><dt>Parameters:</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">format</td><td>the custom string to print. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">i</td><td>the ID of the particle associated with this Voronoi cell. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">(x,y,z)</td><td>the position of the particle associated with this Voronoi cell. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">r</td><td>a radius associated with the particle. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">fp</td><td>the file handle to write to. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <aclass="el"href="cell_8cc_source.html#l02023">2023</a> of file <aclass="el"href="cell_8cc_source.html">cell.cc</a>.</p>
<p>This is a virtual function that is overridden by a routine to print a list of IDs of neighboring particles corresponding to each face. By default, when no neighbor information is available, the routine does nothing. </p>
<dlclass="params"><dt>Parameters:</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">fp</td><td>the file handle to write to. </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented in <aclass="el"href="classvoro_1_1voronoicell__neighbor.html#a2b212f8abaf92200e8ee4b5eee0e60d1">voro::voronoicell_neighbor</a>.</p>
<p>Definition at line <aclass="el"href="cell_8hh_source.html#l00203">203</a> of file <aclass="el"href="cell_8hh_source.html">cell.hh</a>.</p>
<p>This routine tests to see whether the cell intersects a plane by starting from the guess point up. If up intersects, then it immediately returns true. Otherwise, it calls the plane_intersects_track() routine. </p>
<dlclass="params"><dt>Parameters:</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">(x,y,z)</td><td>the normal vector to the plane. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">rsq</td><td>the distance along this vector of the plane. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns:</dt><dd>False if the plane does not intersect the plane, true if it does. </dd></dl>
<p>Definition at line <aclass="el"href="cell_8cc_source.html#l01920">1920</a> of file <aclass="el"href="cell_8cc_source.html">cell.cc</a>.</p>
<p>This routine tests to see if a cell intersects a plane. It first tests a random sample of approximately sqrt(p)/4 points. If any of those are intersect, then it immediately returns true. Otherwise, it takes the closest point and passes that to plane_intersect_track() routine. </p>
<dlclass="params"><dt>Parameters:</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">(x,y,z)</td><td>the normal vector to the plane. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">rsq</td><td>the distance along this vector of the plane. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns:</dt><dd>False if the plane does not intersect the plane, true if it does. </dd></dl>
<p>Definition at line <aclass="el"href="cell_8cc_source.html#l01933">1933</a> of file <aclass="el"href="cell_8cc_source.html">cell.cc</a>.</p>
<p>This a virtual function that is overridden by a routine to print the neighboring particle IDs for a given vertex. By default, when no neighbor information is available, the routine does nothing. </p>
<dlclass="params"><dt>Parameters:</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">i</td><td>the vertex to consider. </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented in <aclass="el"href="classvoro_1_1voronoicell__neighbor.html#a868581daaec73455618629e668c92d38">voro::voronoicell_neighbor</a>.</p>
<p>Definition at line <aclass="el"href="cell_8hh_source.html#l00209">209</a> of file <aclass="el"href="cell_8hh_source.html">cell.hh</a>.</p>
<p>Several routines in the class that gather cell-based statistics internally track their progress by flipping edges to negative so that they know what parts of the cell have already been tested. This function resets them back to positive. When it is called, it assumes that every edge in the routine should have already been flipped to negative, and it bails out with an internal error if it encounters a positive edge. </p>
<p>Definition at line <aclass="el"href="cell_8cc_source.html#l01572">1572</a> of file <aclass="el"href="cell_8cc_source.html">cell.cc</a>.</p>
<p>Calculates the volume of the Voronoi cell, by decomposing the cell into tetrahedra extending outward from the zeroth vertex, whose volumes are evaluated using a scalar triple product. </p>
<dlclass="section return"><dt>Returns:</dt><dd>A floating point number holding the calculated volume. </dd></dl>
<p>Definition at line <aclass="el"href="cell_8cc_source.html#l01299">1299</a> of file <aclass="el"href="cell_8cc_source.html">cell.cc</a>.</p>
<p>This holds the current maximum allowed order of a vertex, which sets the size of the mem, mep, and mec arrays. If a vertex is created with more vertices than this, the arrays are dynamically extended using the add_memory_vorder routine. </p>
<p>Definition at line <aclass="el"href="cell_8hh_source.html#l00045">45</a> of file <aclass="el"href="cell_8hh_source.html">cell.hh</a>.</p>
<p>This holds the current size of the arrays ed and nu, which hold the vertex information. If more vertices are created than can fit in this array, then it is dynamically extended using the add_memory_vertices routine. </p>
<p>Definition at line <aclass="el"href="cell_8hh_source.html#l00039">39</a> of file <aclass="el"href="cell_8hh_source.html">cell.hh</a>.</p>
<p>This is a two dimensional array that holds information about the edge connections of the vertices that make up the cell. The two dimensional array is not allocated in the usual method. To account for the fact the different vertices have different orders, and thus require different amounts of storage, the elements of ed[i] point to one-dimensional arrays in the mep[] array of different sizes.</p>
<p>More specifically, if vertex i has order m, then ed[i] points to a one-dimensional array in mep[m] that has 2*m+1 entries. The first m elements hold the neighboring edges, so that the jth edge of vertex i is held in ed[i][j]. The next m elements hold a table of relations which is redundant but helps speed up the computation. It satisfies the relation ed[ed[i][j]][ed[i][m+j]]=i. The final entry holds a back pointer, so that ed[i+2*m]=i. The back pointers are used when rearranging the memory. </p>
<p>Definition at line <aclass="el"href="cell_8hh_source.html#l00078">78</a> of file <aclass="el"href="cell_8hh_source.html">cell.hh</a>.</p>
<p>This is a two dimensional array for holding the information about the edges of the Voronoi cell. mep[p] is a one-dimensional array for holding the edge information about all vertices of order p, with each vertex holding 2*p+1 integers of information. The total number of vertices held on mep[p] is stored in mem[p]. If the space runs out, the code allocates more using the add_memory() routine. </p>
<p>Definition at line <aclass="el"href="cell_8hh_source.html#l00237">237</a> of file <aclass="el"href="cell_8hh_source.html">cell.hh</a>.</p>
<p>This array holds the order of the vertices in the Voronoi cell. This array is dynamically allocated, with its current size held by current_vertices. </p>
<p>Definition at line <aclass="el"href="cell_8hh_source.html#l00082">82</a> of file <aclass="el"href="cell_8hh_source.html">cell.hh</a>.</p>
<p>This is the index of particular point in the cell, which is used to start the tracing routines for plane intersection and cutting. These routines will work starting from any point, but it's often most efficient to start from the last point considered, since in many cases, the cell construction algorithm may consider many planes with similar vectors concurrently. </p>
<p>Definition at line <aclass="el"href="cell_8hh_source.html#l00060">60</a> of file <aclass="el"href="cell_8hh_source.html">cell.hh</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>