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
21 /** \brief Class for computation of the unit Voronoi cell associated with
22 * a 3D non-rectangular periodic domain. */
25 /** The x coordinate of the first vector defining the periodic
28 /** The x coordinate of the second vector defining the periodic
31 /** The y coordinate of the second vector defining the periodic
34 /** The x coordinate of the third vector defining the periodic
37 /** The y coordinate of the third vector defining the periodic
40 /** The z coordinate of the third vector defining the periodic
43 /** The computed unit Voronoi cell corresponding the given
44 * 3D non-rectangular periodic domain geometry. */
45 voronoicell unit_voro
;
46 unitcell(double bx_
,double bxy_
,double by_
,double bxz_
,double byz_
,double bz_
);
47 /** Draws an outline of the domain in Gnuplot format.
48 * \param[in] filename the filename to write to. */
49 inline void draw_domain_gnuplot(const char* filename
) {
50 FILE *fp(safe_fopen(filename
,"w"));
51 draw_domain_gnuplot(fp
);
54 void draw_domain_gnuplot(FILE *fp
=stdout
);
55 /** Draws an outline of the domain in Gnuplot format.
56 * \param[in] filename the filename to write to. */
57 inline void draw_domain_pov(const char* filename
) {
58 FILE *fp(safe_fopen(filename
,"w"));
62 void draw_domain_pov(FILE *fp
=stdout
);
63 bool intersects_image(double dx
,double dy
,double dz
,double &vol
);
64 void images(vector
<int> &vi
,vector
<double> &vd
);
66 /** The maximum y-coordinate that could possibly cut the
67 * computed unit Voronoi cell. */
69 /** The maximum z-coordinate that could possibly cut the
70 * computed unit Voronoi cell. */
73 inline void unit_voro_apply(int i
,int j
,int k
);
74 bool unit_voro_intersect(int l
);
75 inline bool unit_voro_test(int i
,int j
,int k
);