Trisurf Monte Carlo simulator
mihaf
2014-03-10 2dcc6527d04a921aaeed132f57dfc543cd32dbff
commit | author | age
d7639a 1 #ifndef _IO_H
SP 2 #define _IO_H
3
083e03 4 /** @ Global variables for I/O operations like filenames etc. */
SP 5 /*static char mastername[1024];
6 static char prefixname[1024];
7 static ts_bool restore=0;
8 static char tape[1024]; */
9 char path[1024];
10 int force_from_tape;
11
8a6614 12
SP 13 typedef struct {
14     long int nshell;
15     long int ncxmax;
16     long int ncymax;
17     long int nczmax;
18     long int npoly;
19     long int nmono;
20     long int pswitch;
21         char *multiprocessing;
22        long int brezveze0;
23         long int brezveze1;
24         long int brezveze2;
25         ts_double xk0;
26     ts_double dmax;
27     ts_double stepsize;
28     ts_double kspring;
29     ts_double pressure;
30     long int iterations;
31     long int inititer;
32     long int mcsweeps;
33     long int quiet;
34 } ts_tape;
35
36 typedef struct{
37     ts_int force_from_tape;
38     ts_int reset_iteration_count;
39 } ts_args;
40
41 ts_args command_line_args;
42
083e03 43 ts_bool parse_args(int argc, char **argv);
SP 44
45
46
d7639a 47 /** @brief Prints the position of vertices for the whole list
SP 48  *  
49  *  The function is meant more or less as a debug tool, but can be used in production
50  *  environment aswell.
51  *  the output is in form of idx: x y z
52  *      @param *vlist is a structure holding information on vertex list.
53  *    @returns TS_SUCCESS on successful execution, TS_FAIL otherwise.
54 */
55
56 ts_bool print_vertex_list(ts_vertex_list *vlist);
57
58 /** @brief Prints the neighbours of all the vertices
59  *  
60  *  The function is meant more or less as a debug tool, but can be used in production
61  *  environment aswell.
62  *  the output is in form of idx(number of neighbours): (x1,y1,z1) (x2,y2,z2) ...
63  *      @param *vlist is a structure holding information on vertex list.
64  *    @returns TS_SUCCESS on successful execution, TS_FAIL otherwise.
65 */
66 ts_bool print_vertex_neighbours(ts_vertex_list *vlist);
67
68
69 /** @brief Function outputs the vetex list file to comply to old fortran format
70  *  
71  *      @param *vlist is a list of vertices
72  *      @param *filename is a name of the output file to be created (note that if the file already
73  *  exists it will be overwritten.
74  */
75 ts_bool write_vertex_fcompat_file(ts_vertex_list *vlist,ts_char *filename);
76 ts_bool fprint_vertex_list(FILE *fh,ts_vertex_list *vlist);
77 ts_bool fprint_tristar(FILE *fh, ts_vesicle *vesicle);
78 ts_bool fprint_triangle_list(FILE *fh, ts_vesicle *vesicle);
79 ts_bool fprint_vertex_data(FILE *fh,ts_vertex_list *vlist);
80 ts_bool fprint_bonds(FILE *fh,ts_vesicle *vesicle);
81 ts_bool write_dout_fcompat_file(ts_vesicle *vesicle, ts_char *filename);
82 ts_bool read_tape_fcompat_file(ts_vesicle *vesicle, ts_char *filename);
83
84
85 /** @brief Outputs file in vtk format, compatible with paraview.
86  *
87  *    @param *vlist is a list of vertices
88  *    @param *filename is a name of the output file. If exists, it will be overwritten
89  *    @param *text is a description line (max. 255 characters) to be included in the file
90  */
91 ts_bool write_vertex_vtk_file(ts_vesicle *vesicle,ts_char *filename, ts_char *text);
a6b1b5 92 ts_bool write_vertex_xml_file(ts_vesicle *vesicle, ts_uint timestepno);
SP 93 ts_bool write_master_xml_file(ts_char *filename);
1ab449 94 ts_tape *parsetape(char *filename);
SP 95 ts_bool tape_free(ts_tape *tape);
d7639a 96
1ab449 97 ts_bool dump_state(ts_vesicle *vesicle, ts_uint iteration);
SP 98 ts_vesicle *restore_state(ts_uint *iteration);
d7639a 99 #endif