1 // Voro++, a 3D cell-based Voronoi library
3 // Author : Chris H. Rycroft (LBL / UC Berkeley)
4 // Email : chr@alum.mit.edu
5 // Date : August 30th 2011
8 * \brief Header file for the unitcell class. */
10 #ifndef VOROPP_UNITCELL_HH
11 #define VOROPP_UNITCELL_HH
20 /** \brief Class for computation of the unit Voronoi cell associated with
21 * a 3D non-rectangular periodic domain. */
24 /** The x coordinate of the first vector defining the periodic
27 /** The x coordinate of the second vector defining the periodic
30 /** The y coordinate of the second vector defining the periodic
33 /** The x coordinate of the third vector defining the periodic
36 /** The y coordinate of the third vector defining the periodic
39 /** The z coordinate of the third vector defining the periodic
42 /** The computed unit Voronoi cell corresponding the given
43 * 3D non-rectangular periodic domain geometry. */
44 voronoicell unit_voro
;
45 unitcell(double bx_
,double bxy_
,double by_
,double bxz_
,double byz_
,double bz_
);
46 /** Draws an outline of the domain in Gnuplot format.
47 * \param[in] filename the filename to write to. */
48 inline void draw_domain_gnuplot(const char* filename
) {
49 FILE *fp(safe_fopen(filename
,"w"));
50 draw_domain_gnuplot(fp
);
53 void draw_domain_gnuplot(FILE *fp
=stdout
);
54 /** Draws an outline of the domain in Gnuplot format.
55 * \param[in] filename the filename to write to. */
56 inline void draw_domain_pov(const char* filename
) {
57 FILE *fp(safe_fopen(filename
,"w"));
61 void draw_domain_pov(FILE *fp
=stdout
);
62 bool intersects_image(double dx
,double dy
,double dz
,double &vol
);
63 void images(std::vector
<int> &vi
,std::vector
<double> &vd
);
65 /** The maximum y-coordinate that could possibly cut the
66 * computed unit Voronoi cell. */
68 /** The maximum z-coordinate that could possibly cut the
69 * computed unit Voronoi cell. */
72 inline void unit_voro_apply(int i
,int j
,int k
);
73 bool unit_voro_intersect(int l
);
74 inline bool unit_voro_test(int i
,int j
,int k
);