Trisurf Monte Carlo simulator
Samo Penic
2015-10-06 6c3bb91fea92c5013507bdf4f5ac49e889e213ff
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 int force_from_tape;
10
8a6614 11
SP 12 typedef struct{
13     ts_int force_from_tape;
14     ts_int reset_iteration_count;
3f5c83 15     char path[1024]; //path where all files should be added
SP 16     char output_fullfilename[1024]; //name of the master file
17     char dump_fullfilename[1024]; //name of the dump file
18     char tape_fullfilename[1024]; //name of the tape file
8a6614 19 } ts_args;
SP 20
21 ts_args command_line_args;
22
083e03 23 ts_bool parse_args(int argc, char **argv);
SP 24
25
26
d7639a 27 /** @brief Prints the position of vertices for the whole list
SP 28  *  
29  *  The function is meant more or less as a debug tool, but can be used in production
30  *  environment aswell.
31  *  the output is in form of idx: x y z
32  *      @param *vlist is a structure holding information on vertex list.
33  *    @returns TS_SUCCESS on successful execution, TS_FAIL otherwise.
34 */
35
36 ts_bool print_vertex_list(ts_vertex_list *vlist);
37
38 /** @brief Prints the neighbours of all the vertices
39  *  
40  *  The function is meant more or less as a debug tool, but can be used in production
41  *  environment aswell.
42  *  the output is in form of idx(number of neighbours): (x1,y1,z1) (x2,y2,z2) ...
43  *      @param *vlist is a structure holding information on vertex list.
44  *    @returns TS_SUCCESS on successful execution, TS_FAIL otherwise.
45 */
46 ts_bool print_vertex_neighbours(ts_vertex_list *vlist);
47
48
49 /** @brief Function outputs the vetex list file to comply to old fortran format
50  *  
51  *      @param *vlist is a list of vertices
52  *      @param *filename is a name of the output file to be created (note that if the file already
53  *  exists it will be overwritten.
54  */
55 ts_bool write_vertex_fcompat_file(ts_vertex_list *vlist,ts_char *filename);
56 ts_bool fprint_vertex_list(FILE *fh,ts_vertex_list *vlist);
57 ts_bool fprint_tristar(FILE *fh, ts_vesicle *vesicle);
58 ts_bool fprint_triangle_list(FILE *fh, ts_vesicle *vesicle);
59 ts_bool fprint_vertex_data(FILE *fh,ts_vertex_list *vlist);
60 ts_bool fprint_bonds(FILE *fh,ts_vesicle *vesicle);
61 ts_bool write_dout_fcompat_file(ts_vesicle *vesicle, ts_char *filename);
62 ts_bool read_tape_fcompat_file(ts_vesicle *vesicle, ts_char *filename);
63
64
65 /** @brief Outputs file in vtk format, compatible with paraview.
66  *
67  *    @param *vlist is a list of vertices
68  *    @param *filename is a name of the output file. If exists, it will be overwritten
69  *    @param *text is a description line (max. 255 characters) to be included in the file
70  */
71 ts_bool write_vertex_vtk_file(ts_vesicle *vesicle,ts_char *filename, ts_char *text);
a6b1b5 72 ts_bool write_vertex_xml_file(ts_vesicle *vesicle, ts_uint timestepno);
SP 73 ts_bool write_master_xml_file(ts_char *filename);
144784 74 ts_bool write_pov_file(ts_vesicle *vesicle, char *filename);
SP 75
1ab449 76 ts_tape *parsetape(char *filename);
SP 77 ts_bool tape_free(ts_tape *tape);
d7639a 78
1ab449 79 ts_bool dump_state(ts_vesicle *vesicle, ts_uint iteration);
SP 80 ts_vesicle *restore_state(ts_uint *iteration);
d7639a 81 #endif