2 * \brief Master configuration file for setting various compile-time options. */
4 #ifndef VOROPP_CONFIG_HH
5 #define VOROPP_CONFIG_HH
7 // These constants set the initial memory allocation for dynamically extended
9 /** The initial memory allocation for the number of vertices. */
10 const int init_vertices
=256;
11 /** The initial size for the delete stack. */
12 const int init_delete_size
=256;
13 /** The initial size of the bnds array. */
14 const int init_bnds_size
=256;
15 /** The initial size for the temporary label array. */
16 const int init_temp_label_size
=256;
18 // If the initial memory is too small, the program dynamically allocates more.
19 // However, if the limits below are reached, then the program bails out.
20 /** The maximum memory allocation for the number of vertices. */
21 const int max_vertices
=16777216;
22 /** The maximum size for the delete stack. */
23 const int max_delete_size
=16777216;
24 /** The maximum size of the bnds array. */
25 const int max_bnds_size
=16777216;
26 /** The maximum size for the temporary label array. */
27 const int max_temp_label_size
=16777216;
29 /** The maximum amount of particle memory allocated for a single region. */
30 const int max_particle_memory
=16777216;
32 /** The size of the buffer of file importing. */
33 const int import_buffer_size
=512;
35 #ifndef VOROPP_VERBOSE
36 /** Voro++ can print a number of different status and debugging messages to
37 * notify the user of special behavior, and this macro sets the amount which
38 * are displayed. At level 0, no messages are printed. At level 1, messages
39 * about unusual cases during cell construction are printed, such as when the
40 * plane routine bails out due to floating point problems. At level 2, general
41 * messages about memory expansion are printed. At level 3, technical details
42 * about memory management are printed. */
43 #define VOROPP_VERBOSE 2
46 /** A radius to use as a placeholder when no other information is available. */
47 const double default_radius
=0.5;
49 /** If a point is within this distance of a cutting plane, then the code
50 * assumes that point exactly lies on the plane. */
51 const double tolerance
=1e-10;
53 /** If this is set to 1, then the code reports any instances of particles being
54 * put outside of the container geometry. */
55 #define VOROPP_REPORT_OUT_OF_BOUNDS 0
57 /** Voro++ returns this status code if there is a file-related error, such as
58 * not being able to open file. */
59 #define VOROPP_FILE_ERROR 1
61 /** Voro++ returns this status code if there is a memory allocation error, if
62 * one of the safe memory limits is exceeded. */
63 #define VOROPP_MEMORY_ERROR 2
65 /** Voro++ returns this status code if there is any type of internal error, if
66 * it detects that representation of the Voronoi cell is inconsistent. This
67 * status code will generally indicate a bug, and the developer should be
69 #define VOROPP_INTERNAL_ERROR 3
71 /** Voro++ returns this status code if it could not interpret the command line
72 * arguments passed to the command line utility. */
73 #define VOROPP_CMD_LINE_ERROR 4