UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
voro::container Class Reference

Extension of the container_base class for computing regular Voronoi tessellations. More...

#include <container.hh>

+ Inheritance diagram for voro::container:

Public Member Functions

 container (double ax_, double bx_, double ay_, double by_, double az_, double bz_, int nx_, int ny_, int nz_, bool xperiodic_, bool yperiodic_, bool zperiodic_, int init_mem)
 
voro_compute< containermake_compute () const
 
void clear ()
 
void put (int n, double x, double y, double z)
 
void put (particle_order &vo, int n, double x, double y, double z)
 
void compute_all_cells (voro_compute< container > &vc)
 
double sum_cell_volumes (voro_compute< container > &vc)
 
bool find_voronoi_cell (double x, double y, double z, double &rx, double &ry, double &rz, int &pid, voro_compute< container > &vc) const
 
template<class v_cell , class c_loop >
bool compute_cell (v_cell &c, c_loop &vl, voro_compute< container > &vc) const
 
template<class v_cell >
bool compute_cell (v_cell &c, int ijk, int q, voro_compute< container > &vc) const
 
template<class v_cell >
bool compute_ghost_cell (v_cell &c, double x, double y, double z, voro_compute< container > &vc)
 
- Public Member Functions inherited from voro::container_base
 container_base (double ax_, double bx_, double ay_, double by_, double az_, double bz_, int nx_, int ny_, int nz_, bool xperiodic_, bool yperiodic_, bool zperiodic_, int init_mem, int ps_)
 
 container_base (container_base &Other)=delete
 
container_baseoperator= (const container_base &Other)=delete
 
 container_base (container_base &&Other) noexcept
 
container_baseoperator= (container_base &&Other)=delete
 
 ~container_base ()
 
bool point_inside (double x, double y, double z) const
 
void region_count () const
 
template<class v_cell >
bool initialize_voronoicell (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) const
 
void initialize_search (int ci, int cj, int ck, int ijk, int &i, int &j, int &k, int &disp) const
 
void frac_pos (double x, double y, double z, double ci, double cj, double ck, double &fx, double &fy, double &fz) const
 
int region_index (int ci, int cj, int ck, int ei, int ej, int ek, double &qx, double &qy, double &qz, int &disp) const
 
int total_particles () const
 
- Public Member Functions inherited from voro::voro_base
bool contains_neighbor (const char *format) const
 
 voro_base (int nx_, int ny_, int nz_, double boxx_, double boxy_, double boxz_)
 
 voro_base (const voro_base &Other)=delete
 
voro_baseoperator= (const voro_base &Other)=delete
 
 voro_base (voro_base &&Other) noexcept
 
voro_baseoperator= (voro_base &&Other)=delete
 
 ~voro_base ()
 
- Public Member Functions inherited from voro::wall_list
 wall_list ()
 
 wall_list (const wall_list &Other)=delete
 
wall_listoperator= (const wall_list &Other)=delete
 
 wall_list (wall_list &&Other) noexcept
 
wall_listoperator= (wall_list &&Other)
 
 ~wall_list ()
 
void add_wall (wall *w)
 
void add_wall (wall &w)
 
void add_wall (wall_list &wl)
 
bool point_inside_walls (double x, double y, double z) const
 
template<class c_class >
bool apply_walls (c_class &c, double x, double y, double z) const
 
void deallocate ()
 

Friends

class voro_compute< container >
 

Additional Inherited Members

- Public Attributes inherited from voro::container_base
const double ax
 
const double bx
 
const double ay
 
const double by
 
const double az
 
const double bz
 
const bool xperiodic
 
const bool yperiodic
 
const bool zperiodic
 
int ** id
 
double ** p
 
int * co
 
int * mem
 
const int ps
 
- Public Attributes inherited from voro::voro_base
const int nx
 
const int ny
 
const int nz
 
const int nxy
 
const int nxyz
 
const double boxx
 
const double boxy
 
const double boxz
 
const double xsp
 
const double ysp
 
const double zsp
 
doublemrad
 
- Public Attributes inherited from voro::wall_list
wall ** walls
 
wall ** wep
 
- Static Public Attributes inherited from voro::voro_base
static const unsigned int wl [wl_seq_length *wl_hgridcu]
 
- Protected Member Functions inherited from voro::container_base
void add_particle_memory (int i)
 
bool put_locate_block (int &ijk, double &x, double &y, double &z)
 
bool put_remap (int &ijk, double &x, double &y, double &z) const
 
bool remap (int &ai, int &aj, int &ak, int &ci, int &cj, int &ck, double &x, double &y, double &z, int &ijk) const
 
- Protected Member Functions inherited from voro::voro_base
int step_int (double a) const
 
int step_mod (int a, int b) const
 
int step_div (int a, int b) const
 
- Protected Member Functions inherited from voro::wall_list
void increase_wall_memory ()
 
- Protected Member Functions inherited from voro::radius_mono
void r_init (int ijk, int s, radius_info &radius_out) const
 
void r_prime (double rv, radius_info &radius_out) const
 
bool r_ctest (double crs, double mrs, const radius_info &rad_info) const
 
double r_cutoff (double lrs, const radius_info &rad_info) const
 
double r_max_add (double rs) const
 
double r_current_sub (double rs, int ijk, int q) const
 
double r_scale (double rs, int ijk, int q, const radius_info &rad_info) const
 
bool r_scale_check (double &rs, double mrs, int ijk, int q, const radius_info &rad_info) const
 
- Protected Attributes inherited from voro::wall_list
wall ** wel
 
int current_wall_size
 

Detailed Description

Extension of the container_base class for computing regular Voronoi tessellations.

This class is an extension of the container_base class that has routines specifically for computing the regular Voronoi tessellation with no dependence on particle radii.

Constructor & Destructor Documentation

◆ container()

voro::container::container ( double  ax_,
double  bx_,
double  ay_,
double  by_,
double  az_,
double  bz_,
int  nx_,
int  ny_,
int  nz_,
bool  xperiodic_,
bool  yperiodic_,
bool  zperiodic_,
int  init_mem 
)

The class constructor sets up the geometry of container.

Parameters
[in](ax_,bx_)the minimum and maximum x coordinates.
[in](ay_,by_)the minimum and maximum y coordinates.
[in](az_,bz_)the minimum and maximum z coordinates.
[in](nx_,ny_,nz_)the number of grid blocks in each of the three coordinate directions.
[in](xperiodic_,yperiodic_,zperiodic_)flags setting whether the container is periodic in each coordinate direction.
[in]init_memthe initial memory allocation for each block.

Member Function Documentation

◆ clear()

void voro::container::clear ( )

Clears a container of particles.

◆ compute_all_cells()

void voro::container::compute_all_cells ( voro_compute< container > &  vc)

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.

◆ compute_cell() [1/2]

template<class v_cell , class c_loop >
bool voro::container::compute_cell ( v_cell c,
c_loop vl,
voro_compute< container > &  vc 
) const
inline

Computes the Voronoi cell for a particle currently being referenced by a loop class.

Parameters
[out]ca Voronoi cell class in which to store the computed cell.
[in]vlthe loop class to use.
Returns
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.

◆ compute_cell() [2/2]

template<class v_cell >
bool voro::container::compute_cell ( v_cell c,
int  ijk,
int  q,
voro_compute< container > &  vc 
) const
inline

Computes the Voronoi cell for given particle.

Parameters
[out]ca Voronoi cell class in which to store the computed cell.
[in]ijkthe block that the particle is within.
[in]qthe index of the particle within the block.
Returns
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.

◆ compute_ghost_cell()

template<class v_cell >
bool voro::container::compute_ghost_cell ( v_cell c,
double  x,
double  y,
double  z,
voro_compute< container > &  vc 
)
inline

Computes the Voronoi cell for a ghost particle at a given location. NOT thread-safe; temporarily places particle into the container!

Parameters
[out]ca Voronoi cell class in which to store the computed cell.
[in](x,y,z)the location of the ghost particle.
Returns
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.

◆ find_voronoi_cell()

bool voro::container::find_voronoi_cell ( double  x,
double  y,
double  z,
double rx,
double ry,
double rz,
int &  pid,
voro_compute< container > &  vc 
) const

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.

Parameters
[in](x,y,z)the vector to test.
[out](rx,ry,rz)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.
[out]pidthe ID of the particle.
Returns
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.

◆ make_compute()

voro_compute< container > voro::container::make_compute ( ) const

◆ put() [1/2]

void voro::container::put ( int  n,
double  x,
double  y,
double  z 
)

Put a particle into the correct region of the container.

Parameters
[in]nthe numerical ID of the inserted particle.
[in](x,y,z)the position vector of the inserted particle.

◆ put() [2/2]

void voro::container::put ( particle_order vo,
int  n,
double  x,
double  y,
double  z 
)

Put a particle into the correct region of the container, also recording into which region it was stored.

Parameters
[in]vothe ordering class in which to record the region.
[in]nthe numerical ID of the inserted particle.
[in](x,y,z)the position vector of the inserted particle.

◆ sum_cell_volumes()

double voro::container::sum_cell_volumes ( voro_compute< container > &  vc)

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.

Returns
The sum of all of the computed Voronoi volumes.

Friends And Related Symbol Documentation

◆ voro_compute< container >

friend class voro_compute< container >
friend

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