Strip extra spaces from code.
[voro++.git] / branches / 2d / src / config.hh
blobf1d3fbce1db5cfa3565182a01fd26b0361e547dc
1 /** \file config.hh
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 the Voronoi cell
8 /** The initial memory allocation for the number of vertices. */
9 const int init_vertices=256;
10 /** The initial size for the delete stack. */
11 const int init_delete_size=256;
12 /** The default initial size for the ordering class. */
13 const int init_ordering_size=4096;
15 const int init_boundary_size=256;
16 const int init_wall_tag_size=6;
17 const int init_wall_size=32;
18 const int init_temp_label_size=256;
20 const int max_boundary_size=1048576;
21 const int max_wall_tag_size=65536;
22 const int max_wall_size=4096;
23 const int max_temp_label_size=16777216;
25 const double large_number=1e30;
27 // If the initial memory is too small, the program dynamically allocates more.
28 // However, if the limits below are reached, then the program bails out.
29 /** The maximum memory allocation for the number of vertices. */
30 const int max_vertices=16777216;
31 /** The maximum size for the delete stack. */
32 const int max_delete_size=16777216;
34 /** The maximum amount of particle memory allocated for a single region. */
35 const int max_particle_memory_2d=16777216;
37 #ifndef VOROPP_VERBOSE
38 /** Voro++ can print a number of different status and debugging messages to
39 * notify the user of special behavior, and this macro sets the amount which
40 * are displayed. At level 0, no messages are printed. At level 1, messages
41 * about unusual cases during cell construction are printed, such as when the
42 * plane routine bails out due to floating point problems. At level 2, general
43 * messages about memory expansion are printed. At level 3, technical details
44 * about memory management are printed. */
45 #define VOROPP_VERBOSE 2
46 #endif
48 /** A radius to use as a placeholder when no other information is available. */
49 const double default_radius=0.5;
51 /** A radius to use as a placeholder when no other information is available. */
52 const double default_radius_2d=0.5;
54 /** If a point is within this distance of a cutting plane, then the code
55 * assumes that point exactly lies on the plane. */
56 const double tolerance=1e-10;
58 const double tolerance_sq=1e-20;
60 /** If this is set to 1, then the code reports any instances of particles being
61 * put outside of the container geometry. */
62 #define VOROPP_REPORT_OUT_OF_BOUNDS 0
64 /** Voro++ returns this status code if there is a file-related error, such as
65 * not being able to open file. */
66 #define VOROPP_FILE_ERROR 1
68 /** Voro++ returns this status code if there is a memory allocation error, if
69 * one of the safe memory limits is exceeded. */
70 #define VOROPP_MEMORY_ERROR 2
72 /** Voro++ returns this status code if there is any type of internal error, if
73 * it detects that representation of the Voronoi cell is inconsistent. This
74 * status code will generally indicate a bug, and the developer should be
75 * contacted. */
76 #define VOROPP_INTERNAL_ERROR 3
78 /** Voro++ returns this status code if it could not interpret the command line
79 * arguments passed to the command line utility. */
80 #define VOROPP_CMD_LINE_ERROR 4
82 #endif