From a10dd5c18fbf0b6d5746827f7a9ebfc078563d4a Mon Sep 17 00:00:00 2001
From: Samo Penic <samo@andromeda>
Date: Sun, 28 Nov 2010 13:56:21 +0000
Subject: [PATCH] The vertex is complete... Bond is in first version.

---
 src/main.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/main.c b/src/main.c
index d6c2854..41475a9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2,6 +2,7 @@
 #include<math.h>
 #include "general.h"
 #include "vertex.h"
+#include "bond.h"
 //#include "io.h"
 //#include "initial_timestep.h"
 
@@ -14,13 +15,20 @@
 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_neighbour(VTX(1),VTX(0));
+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_neighbour(VTX(0),VTX(1));
+
+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");
-VTX_DATA(1)->x=1.0;
+
+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.

--
Gitblit v1.9.3