From 23d807748be58e5178c04304d9cc788bf122eb12 Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@fe.uni-lj.si> Date: Tue, 11 Feb 2014 15:34:18 +0000 Subject: [PATCH] Make changes in memory allocation. Memory reservation is done, but pointers are not linked into corresponding structure. A lot to be done still. However, check how pointers can be recalculated at any time when the block is copied in memory. --- src/initial_distribution.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/initial_distribution.c b/src/initial_distribution.c index 2444e15..35470a9 100644 --- a/src/initial_distribution.c +++ b/src/initial_distribution.c @@ -9,18 +9,24 @@ #include "triangle.h" #include "initial_distribution.h" #include "energy.h" +#include "memory.h" ts_vesicle *initial_distribution_dipyramid(ts_uint nshell, ts_uint ncmax1, ts_uint ncmax2, ts_uint ncmax3, ts_double stepsize){ ts_fprintf(stderr,"Starting initial_distribution on vesicle with %u shells!...\n",nshell); ts_bool retval; ts_uint no_vertices=5*nshell*nshell+2; + ts_memory mem; + mem.vertex_no=no_vertices; + mem.ncmax[0]=ncmax1; + mem.ncmax[1]=ncmax2; + mem.ncmax[2]=ncmax3; - + init_memory_block(&mem); ts_vesicle *vesicle=init_vesicle(no_vertices,ncmax1,ncmax2,ncmax3,stepsize); //TODO: debugging only. Please remove ASAP! - vesicle->bending_rigidity=25.0*25.0; + vesicle->bending_rigidity=25.0; vesicle->nshell=nshell; retval = vtx_set_global_values(vesicle); -- Gitblit v1.9.3