UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
voro::voro_compute< c_class > Class Template Reference

Template for carrying out Voronoi cell computations. More...

#include <v_compute.hh>

Public Member Functions

 voro_compute (c_class &con_, int hx_, int hy_, int hz_)
 
 ~voro_compute ()
 
 voro_compute (const voro_compute< c_class > &Other)=delete
 
voro_compute< c_class > & operator= (const voro_compute< c_class > &Other)=delete
 
 voro_compute (voro_compute< c_class > &&Other) noexcept
 
voro_compute< c_class > & operator= (voro_compute< c_class > &&Other)=delete
 
template<class v_cell >
bool compute_cell (v_cell &c, int ijk, int s, int ci, int cj, int ck)
 
void find_voronoi_cell (double x, double y, double z, int ci, int cj, int ck, int ijk, particle_record &w, double &mrs)
 

Public Attributes

const c_classcon
 
const double boxx
 
const double boxy
 
const double boxz
 
const double xsp
 
const double ysp
 
const double zsp
 
const int hx
 
const int hy
 
const int hz
 
const int hxy
 
const int hxyz
 
const int ps
 
int ** id
 
double ** p
 
int * co
 

Detailed Description

template<class c_class>
class voro::voro_compute< c_class >

Template for carrying out Voronoi cell computations.

Constructor & Destructor Documentation

◆ voro_compute() [1/3]

template<class c_class >
voro::voro_compute< c_class >::voro_compute ( c_class con_,
int  hx_,
int  hy_,
int  hz_ 
)

The class constructor initializes constants from the container class, and sets up the mask and queue used for Voronoi computations.

Parameters
[in]con_a reference to the container class to use.
[in](hx_,hy_,hz_)the size of the mask to use.

◆ ~voro_compute()

template<class c_class >
voro::voro_compute< c_class >::~voro_compute ( )
inline

The class destructor frees the dynamically allocated memory for the mask and queue.

◆ voro_compute() [2/3]

template<class c_class >
voro::voro_compute< c_class >::voro_compute ( const voro_compute< c_class > &  Other)
delete

◆ voro_compute() [3/3]

template<class c_class >
voro::voro_compute< c_class >::voro_compute ( voro_compute< c_class > &&  Other)
inlinenoexcept

Member Function Documentation

◆ compute_cell()

template<class c_class >
template<class v_cell >
template bool voro::voro_compute< c_class >::compute_cell ( v_cell c,
int  ijk,
int  s,
int  ci,
int  cj,
int  ck 
)

This routine computes a Voronoi cell for a single particle in the container. It can be called by the user, but is also forms the core part of several of the main functions, such as store_cell_volumes(), print_all(), and the drawing routines. The algorithm constructs the cell by testing over the neighbors of the particle, working outwards until it reaches those particles which could not possibly intersect the cell. For maximum efficiency, this algorithm is divided into three parts. In the first section, the algorithm tests over the blocks which are in the immediate vicinity of the particle, by making use of one of the precomputed worklists. The code then continues to test blocks on the worklist, but also begins to construct a list of neighboring blocks outside the worklist which may need to be test. In the third section, the routine starts testing these neighboring blocks, evaluating whether or not a particle in them could possibly intersect the cell. For blocks that intersect the cell, it tests the particles in that block, and then adds the block neighbors to the list of potential places to consider.

Parameters
[in,out]ca reference to a voronoicell object.
[in]ijkthe index of the block that the test particle is in.
[in]sthe index of the particle within the test block.
[in](ci,cj,ck)the coordinates of the block that the test particle is in relative to the container data structure.
Returns
False if the Voronoi cell was completely removed during the computation and has zero volume, true otherwise.

◆ find_voronoi_cell()

template<class c_class >
template void voro::voro_compute< c_class >::find_voronoi_cell ( double  x,
double  y,
double  z,
int  ci,
int  cj,
int  ck,
int  ijk,
particle_record w,
double mrs 
)

Finds the Voronoi cell that given vector is within. For containers that are not radially dependent, this corresponds to findig the particle that is closest to the vector; for the radical tessellation containers, this corresponds to a finding the minimum weighted distance.

Parameters
[in](x,y,z)the vector to consider.
[in](ci,cj,ck)the coordinates of the block that the test particle is in relative to the container data structure.
[in]ijkthe index of the block that the test particle is in.
[out]wa reference to a particle record in which to store information about the particle whose Voronoi cell the vector is within.
[out]mrsthe minimum computed distance.

◆ operator=() [1/2]

template<class c_class >
voro_compute< c_class > & voro::voro_compute< c_class >::operator= ( const voro_compute< c_class > &  Other)
delete

◆ operator=() [2/2]

template<class c_class >
voro_compute< c_class > & voro::voro_compute< c_class >::operator= ( voro_compute< c_class > &&  Other)
delete

Member Data Documentation

◆ boxx

template<class c_class >
const double voro::voro_compute< c_class >::boxx

The size of an internal computational block in the x direction.

◆ boxy

template<class c_class >
const double voro::voro_compute< c_class >::boxy

The size of an internal computational block in the y direction.

◆ boxz

template<class c_class >
const double voro::voro_compute< c_class >::boxz

The size of an internal computational block in the z direction.

◆ co

template<class c_class >
int* voro::voro_compute< c_class >::co

An array holding the number of particles within each computational box of the container.

◆ con

template<class c_class >
const c_class& voro::voro_compute< c_class >::con

A reference to the container class on which to carry out

◆ hx

template<class c_class >
const int voro::voro_compute< c_class >::hx

The number of boxes in the x direction for the searching mask.

◆ hxy

template<class c_class >
const int voro::voro_compute< c_class >::hxy

A constant, set to the value of hx multiplied by hy, which is used in the routines which step through mask boxes in sequence.

◆ hxyz

template<class c_class >
const int voro::voro_compute< c_class >::hxyz

A constant, set to the value of hx*hy*hz, which is used in the routines which step through mask boxes in sequence.

◆ hy

template<class c_class >
const int voro::voro_compute< c_class >::hy

The number of boxes in the y direction for the searching mask.

◆ hz

template<class c_class >
const int voro::voro_compute< c_class >::hz

The number of boxes in the z direction for the searching mask.

◆ id

template<class c_class >
int** voro::voro_compute< c_class >::id

This array holds the numerical IDs of each particle in each computational box.

◆ p

template<class c_class >
double** voro::voro_compute< c_class >::p

A two dimensional array holding particle positions. For the derived container_poly class, this also holds particle radii.

◆ ps

template<class c_class >
const int voro::voro_compute< c_class >::ps

The number of floating point entries to store for each particle.

◆ xsp

template<class c_class >
const double voro::voro_compute< c_class >::xsp

The inverse box length in the x direction, set to nx/(bx-ax).

◆ ysp

template<class c_class >
const double voro::voro_compute< c_class >::ysp

The inverse box length in the y direction, set to ny/(by-ay).

◆ zsp

template<class c_class >
const double voro::voro_compute< c_class >::zsp

The inverse box length in the z direction, set to nz/(bz-az).


The documentation for this class was generated from the following files: