From 34d3de02dc183d38bf661789e98e43d9c1b4c0bd Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Thu, 23 Feb 2012 15:13:28 +0000
Subject: [PATCH] cell data removed

---
 src/io.c |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/src/io.c b/src/io.c
index 1a7a527..8688067 100644
--- a/src/io.c
+++ b/src/io.c
@@ -85,17 +85,17 @@
         ts_triangle_list *tlist=vesicle->tlist;
       ts_uint i,j;
 	for(i=0;i<tlist->n;i++){
-        fprintf(fh,"\t%u",tlist->tria[i]->data->neigh_no);
-	    for(j=0;j<tlist->tria[i]->data->neigh_no;j++){
-    		fprintf(fh,"\t%u",(ts_uint)(tlist->tria[i]->data->neigh[j]->idx));//-tlist->tria+1)); 
+        fprintf(fh,"\t%u",tlist->tria[i]->neigh_no);
+	    for(j=0;j<tlist->tria[i]->neigh_no;j++){
+    		fprintf(fh,"\t%u",(ts_uint)(tlist->tria[i]->neigh[j]->idx));//-tlist->tria+1)); 
         }
         fprintf(fh,"\n");
             for(j=0;j<3;j++){
-    		fprintf(fh,"\t%u",(ts_uint)(tlist->tria[i]->data->vertex[j]->idx));//-vesicle->vlist->vtx+1)); 
+    		fprintf(fh,"\t%u",(ts_uint)(tlist->tria[i]->vertex[j]->idx));//-vesicle->vlist->vtx+1)); 
             }
         fprintf(fh,"\n");
-		fprintf(fh,"%.17E\t%.17E\t%.17E\n",tlist->tria[i]->data->xnorm,
-tlist->tria[i]->data->ynorm,tlist->tria[i]->data->znorm);
+		fprintf(fh,"%.17E\t%.17E\t%.17E\n",tlist->tria[i]->xnorm,
+tlist->tria[i]->ynorm,tlist->tria[i]->znorm);
         fprintf(fh,"0.00000000000000000\n0.00000000000000000\n");
     }
     return TS_SUCCESS;
@@ -108,11 +108,11 @@
         vlist->vtx[i]->data->xk,vlist->vtx[i]->data->c,vlist->vtx[i]->data->energy,
         vlist->vtx[i]->data->energy_h, vlist->vtx[i]->data->curvature, 0);
         for(j=0;j<vlist->vtx[i]->data->neigh_no;j++){
-            fprintf(fh," %.17E", vlist->vtx[i]->data->bond[j]->data->bond_length_dual);
+            fprintf(fh," %.17E", vlist->vtx[i]->data->bond[j]->bond_length_dual);
         }
             fprintf(fh,"\n");
         for(j=0;j<vlist->vtx[i]->data->neigh_no;j++){
-            fprintf(fh," %.17E", vlist->vtx[i]->data->bond[j]->data->bond_length);
+            fprintf(fh," %.17E", vlist->vtx[i]->data->bond[j]->bond_length);
         }
             fprintf(fh,"\n");
     }
@@ -122,9 +122,9 @@
 ts_bool fprint_bonds(FILE *fh,ts_vesicle *vesicle){
     ts_uint i;
     for(i=0;i<vesicle->blist->n;i++){
-        fprintf(fh,"\t%u\t%u\n",(ts_uint)(vesicle->blist->bond[i]->data->vtx1->idx),
+        fprintf(fh,"\t%u\t%u\n",(ts_uint)(vesicle->blist->bond[i]->vtx1->idx),
 //-vesicle->vlist->vtx+1),
-        (ts_uint)(vesicle->blist->bond[i]->data->vtx2->idx));
+        (ts_uint)(vesicle->blist->bond[i]->vtx2->idx));
     //-vesicle->vlist.vtx+1));
     }
     return TS_SUCCESS;
@@ -231,7 +231,7 @@
 
     fprintf(fh,"</DataArray>\n</Points>\n<Cells>\n<DataArray type=\"Int64\" Name=\"connectivity\" format=\"ascii\">");
 	for(i=0;i<blist->n;i++){
-			fprintf(fh,"%u %u\n",blist->bond[i]->data->vtx1->idx,blist->bond[i]->data->vtx2->idx);
+			fprintf(fh,"%u %u\n",blist->bond[i]->vtx1->idx,blist->bond[i]->vtx2->idx);
 	}
     fprintf(fh,"</DataArray>\n<DataArray type=\"Int64\" Name=\"offsets\" format=\"ascii\">");
     for (i=2;i<blist->n*2+1;i+=2){
@@ -275,7 +275,7 @@
 	
 	fprintf(fh,"CELLS %u %u\n",blist->n,3*blist->n);
 	for(i=0;i<blist->n;i++){
-			fprintf(fh,"2 %u %u\n",blist->bond[i]->data->vtx1->idx,blist->bond[i]->data->vtx2->idx);
+			fprintf(fh,"2 %u %u\n",blist->bond[i]->vtx1->idx,blist->bond[i]->vtx2->idx);
 	}
 	fprintf(fh,"CELL_TYPES %u\n",blist->n);
 	for(i=0;i<blist->n;i++)
@@ -373,6 +373,7 @@
         
     }
     */
+	if(retval);
 	fclose(fh);	
 
 

--
Gitblit v1.9.3