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 |
|
SP |
26 |
vlist->vtx[0]->data->x=1.0; |
|
27 |
vlist->vtx[0]->data->x=1.1; |
|
28 |
|
|
29 |
bond_add(blist, vlist->vtx[1],vlist->vtx[0]); |
|
30 |
|
|
31 |
bond_list_free(blist); |
73f967
|
32 |
vtx_list_free(vlist); |
d7639a
|
33 |
printf("Done.\n"); |
SP |
34 |
return 0; //program finished perfectly ok. We return 0. |
|
35 |
} |