10 #ifndef VOROPP_COMMON_HH
11 #define VOROPP_COMMON_HH
26 inline void voro_fatal_error(
const char *p,
int status) {
27 fprintf(stderr,
"voro++: %s\n",p);
36 inline void voro_print_positions(std::vector<double> &v,FILE *fp=stdout) {
38 fprintf(fp,
"(%g,%g,%g)",v[0],v[1],v[2]);
39 for(
int k=3;(
unsigned int) k<v.size();k+=3) {
40 fprintf(fp,
" (%g,%g,%g)",v[k],v[k+1],v[k+2]);
52 inline FILE* safe_fopen(
const char *filename,
const char *mode) {
53 FILE *fp=fopen(filename,mode);
55 fprintf(stderr,
"voro++: Unable to open file '%s'\n",filename);
61 void voro_print_vector(std::vector<int> &v,FILE *fp=stdout);
62 void voro_print_vector(std::vector<double> &v,FILE *fp=stdout);
63 void voro_print_face_vertices(std::vector<int> &v,FILE *fp=stdout);
Master configuration file for setting various compile-time options.
#define VOROPP_FILE_ERROR