Trisurf Monte Carlo simulator
Samo Penic
2010-11-28 a10dd5c18fbf0b6d5746827f7a9ebfc078563d4a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include<stdio.h>
#include<math.h>
#include "general.h"
#include "vertex.h"
#include "bond.h"
//#include "io.h"
//#include "initial_timestep.h"
 
/** Entrance function to the program
  * @param argv is a number of parameters used in program call (including the program name
  * @param argc is a pointer to strings (character arrays) which holds the arguments
  * @returns returns 0 on success, any other number on fail.
*/
 
int main(int argv, char *argc[]){
ts_bool retval;
ts_vertex_list *vlist=init_vertex_list(5);
ts_bond_list *blist=init_bond_list();
 
retval=vtx_add_cneighbour(blist,vlist->vtx[1],vlist->vtx[0]);
if(retval==TS_FAIL) printf("1. already a member or vertex is null!\n");
 
retval=vtx_add_cneighbour(blist,vlist->vtx[0],vlist->vtx[1]);
if(retval==TS_FAIL) printf("2. already a member or vertex is null!\n");
 
vlist->vtx[0]->data->x=1.0;
vlist->vtx[0]->data->x=1.1;
 
bond_add(blist, vlist->vtx[1],vlist->vtx[0]);
 
bond_list_free(blist);
vtx_list_free(vlist);
printf("Done.\n");
return 0; //program finished perfectly ok. We return 0.