#ifndef NBIO_HH #define NBIO_HH #include #include "nbtypes.hh" void write_vtk_file_double (FILE *f, int n, double x[][3], double v[][3], double m[], double t, double dt) { int i; /* header */ fprintf(f,"%s\n","# vtk DataFile Version 1.0"); fprintf(f,"NBODY %22.16g %22.16g\n",t,dt); fprintf(f,"%s\n","ASCII"); /* points */ fprintf(f,"%s\n","DATASET POLYDATA"); fprintf(f,"%s %d %s\n","POINTS",n,"float"); for (i=0; in) { printf("data file too large, aborting read\n"); return -1; } n = N; for (i=0; i