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