From 8f6a69d8fddcae6b54d25cf02dd56f0afce6a075 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Thu, 23 Feb 2012 16:35:11 +0000
Subject: [PATCH] vertex data removed and memory leaks fixed

---
 src/main.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/main.c b/src/main.c
index c402ebf..b846658 100644
--- a/src/main.c
+++ b/src/main.c
@@ -36,20 +36,20 @@
 retval=vtx_remove_neighbour(vlist->vtx[0],vlist->vtx[1]);
 vtx_add_neighbour(vlist->vtx[0],vlist->vtx[1]);
 
-vlist->vtx[0]->data->x=1.0;
-vlist->vtx[0]->data->x=1.1;
+vlist->vtx[0]->x=1.0;
+vlist->vtx[0]->x=1.1;
 vlist1=vertex_list_copy(vlist);
 bond_add(blist, vlist->vtx[1],vlist->vtx[0]);
 triangle_add(tlist,vlist->vtx[1],vlist->vtx[2],vlist->vtx[3]);
 
 triangle_add(tlist,vlist->vtx[1],vlist->vtx[2],vlist->vtx[3]);
 
-printf("Cell idx=1 has vertices=%u\n",clist->cell[0]->data->nvertex);
+printf("Cell idx=1 has vertices=%u\n",clist->cell[0]->nvertex);
 cell_add_vertex(clist->cell[0], vlist->vtx[0]);
-printf("Cell idx=1 has vertices=%u\n",clist->cell[0]->data->nvertex);
-printf("Cell idx=1 has vertex[0] has x coordinate=%e\n",clist->cell[0]->data->vertex[0]->data->x);
+printf("Cell idx=1 has vertices=%u\n",clist->cell[0]->nvertex);
+printf("Cell idx=1 has vertex[0] has x coordinate=%e\n",clist->cell[0]->vertex[0]->x);
 cell_list_cell_occupation_clear(clist);
-printf("Cell idx=1 has vertices=%u\n",clist->cell[0]->data->nvertex);
+printf("Cell idx=1 has vertices=%u\n",clist->cell[0]->nvertex);
 cell_add_vertex(clist->cell[0], vlist->vtx[0]);
 
 
@@ -64,7 +64,6 @@
 
 centermass(vesicle);
 cell_occupation(vesicle);
-
 for(i=0;i<100;i++){
 single_timestep(vesicle);
 write_vertex_xml_file(vesicle,i);

--
Gitblit v1.9.3