| | |
| | | /* 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 |
| | |
| | | } |
| | | 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; |
| | |
| | | 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); |