From 719c9febac2eaff9483fda487b57684afbb59bb2 Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Wed, 05 Mar 2014 16:47:50 +0000 Subject: [PATCH] dont know --- src/vertex.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/vertex.c b/src/vertex.c index 871fe29..023e6fc 100644 --- a/src/vertex.c +++ b/src/vertex.c @@ -26,18 +26,14 @@ /* initialize Ylm for spherical hamonics DONE in sh.c */ } vlist->n=N; - vlist->list_size=TS_VLIST_CHUNK; //TODO: can be buggy in some cases, when N>0 and we want to delete some vertices. - return vlist; + vlist->list_size=TS_VLIST_CHUNK; //TODO: can be buggy in some cases, when N>0 and we want to delete some vertices. + return vlist; } ts_bool vertex_list_add_vtx(ts_vertex_list *vlist, ts_vertex *vtx){ #ifdef DEBUG - if(vtx==NULL) - err("VTX is null"); - if(vlist==NULL) err("VLIST is null"); - if(vtx==NULL || vlist==NULL) return TS_FAIL; #endif @@ -48,7 +44,6 @@ } vlist->list_size+=TS_VLIST_CHUNK; } -// printf("Test %u (max %u)!\n", vlist->n, vlist->list_size); vlist->vtx[vlist->n]=vtx; vlist->n++; return TS_SUCCESS; @@ -99,7 +94,7 @@ return TS_SUCCESS; } - +// Add neighbour just in one direction (add vtx2 as a neigh of vtx1 and not another way around! ts_bool vtx_add_neighbour(ts_vertex *vtx1, ts_vertex *vtx2){ ts_uint i; if(vtx1==NULL || vtx2==NULL) return TS_FAIL; @@ -112,6 +107,7 @@ return TS_SUCCESS; } + ts_bool vtx_add_cneighbour(ts_bond_list *blist, ts_vertex *vtx1, ts_vertex *vtx2){ ts_bool retval; retval=vtx_add_neighbour(vtx1, vtx2); -- Gitblit v1.9.3