Voro++
Public Member Functions | Data Fields | Protected Attributes
voro::unitcell Class Reference

Class for computation of the unit Voronoi cell associated with a 3D non-rectangular periodic domain.

#include <unitcell.hh>

+ Inheritance diagram for voro::unitcell:

Public Member Functions

 unitcell (double bx_, double bxy_, double by_, double bxz_, double byz_, double bz_)
void draw_domain_gnuplot (const char *filename)
void draw_domain_gnuplot (FILE *fp=stdout)
void draw_domain_pov (const char *filename)
void draw_domain_pov (FILE *fp=stdout)
bool intersects_image (double dx, double dy, double dz, double &vol)
void images (std::vector< int > &vi, std::vector< double > &vd)

Data Fields

const double bx
const double bxy
const double by
const double bxz
const double byz
const double bz
voronoicell unit_voro

Protected Attributes

double max_uv_y
double max_uv_z

Detailed Description

Definition at line 22 of file unitcell.hh.


Constructor & Destructor Documentation

voro::unitcell::unitcell ( double  bx_,
double  bxy_,
double  by_,
double  bxz_,
double  byz_,
double  bz_ 
)

Initializes the unit cell class for a particular non-orthogonal periodic geometry, corresponding to a parallelepiped with sides given by three vectors. The class constructs the unit Voronoi cell corresponding to this geometry.

Parameters:
[in](bx_)The x coordinate of the first unit vector.
[in](bxy_,by_)The x and y coordinates of the second unit vector.
[in](bxz_,byz_,bz_)The x, y, and z coordinates of the third unit vector.

Definition at line 26 of file unitcell.cc.


Member Function Documentation

void voro::unitcell::draw_domain_gnuplot ( const char *  filename)
inline

Draws an outline of the domain in Gnuplot format.

Parameters:
[in]filenamethe filename to write to.

Definition at line 48 of file unitcell.hh.

void voro::unitcell::draw_domain_gnuplot ( FILE *  fp = stdout)

Draws the periodic domain in gnuplot format.

Parameters:
[in]fpthe file handle to write to.

Definition at line 203 of file unitcell.cc.

void voro::unitcell::draw_domain_pov ( const char *  filename)
inline

Draws an outline of the domain in Gnuplot format.

Parameters:
[in]filenamethe filename to write to.

Definition at line 56 of file unitcell.hh.

void voro::unitcell::draw_domain_pov ( FILE *  fp = stdout)

Draws the periodic domain in POV-Ray format.

Parameters:
[in]fpthe file handle to write to.

Definition at line 212 of file unitcell.cc.

void voro::unitcell::images ( std::vector< int > &  vi,
std::vector< double > &  vd 
)

Computes a list of periodic domain images that intersect the unit Voronoi cell.

Parameters:
[out]via vector containing triplets (i,j,k) corresponding to domain images that intersect the unit Voronoi cell, when it is centered in the middle of the primary domain.
[out]vda vector containing the fraction of the Voronoi cell volume within each corresponding image listed in vi.

Definition at line 122 of file unitcell.cc.

bool voro::unitcell::intersects_image ( double  dx,
double  dy,
double  dz,
double &  vol 
)

Calculates whether the unit Voronoi cell intersects a given periodic image of the domain.

Parameters:
[in](dx,dy,dz)the displacement of the periodic image.
[out]volthe proportion of the unit cell volume within this image, only computed in the case that the two intersect.
Returns:
True if they intersect, false otherwise.

Definition at line 101 of file unitcell.cc.


Field Documentation

const double voro::unitcell::bx

The x coordinate of the first vector defining the periodic domain.

Definition at line 26 of file unitcell.hh.

const double voro::unitcell::bxy

The x coordinate of the second vector defining the periodic domain.

Definition at line 29 of file unitcell.hh.

const double voro::unitcell::bxz

The x coordinate of the third vector defining the periodic domain.

Definition at line 35 of file unitcell.hh.

const double voro::unitcell::by

The y coordinate of the second vector defining the periodic domain.

Definition at line 32 of file unitcell.hh.

const double voro::unitcell::byz

The y coordinate of the third vector defining the periodic domain.

Definition at line 38 of file unitcell.hh.

const double voro::unitcell::bz

The z coordinate of the third vector defining the periodic domain.

Definition at line 41 of file unitcell.hh.

double voro::unitcell::max_uv_y
protected

The maximum y-coordinate that could possibly cut the computed unit Voronoi cell.

Definition at line 67 of file unitcell.hh.

double voro::unitcell::max_uv_z
protected

The maximum z-coordinate that could possibly cut the computed unit Voronoi cell.

Definition at line 70 of file unitcell.hh.

voronoicell voro::unitcell::unit_voro

The computed unit Voronoi cell corresponding the given 3D non-rectangular periodic domain geometry.

Definition at line 44 of file unitcell.hh.


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