From fedf2b217113800a15f367e111e2dbcad4a3c92c Mon Sep 17 00:00:00 2001 From: Miha <mihaf@hapi.(none)> Date: Thu, 06 Feb 2014 17:39:37 +0000 Subject: [PATCH] Polymers thermicaly move now! HArmonic potential added. --- src/co_test.c | 26 +++++++++++++++++++++++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/co_test.c b/src/co_test.c index f7f3f74..61a6a3a 100644 --- a/src/co_test.c +++ b/src/co_test.c @@ -1,7 +1,9 @@ #include "general.h" #include "sh.h" +#include <stdlib.h> #include "vesicle.h" #include "initial_distribution.h" +#include "frame.h" #include <math.h> int main(){ @@ -15,7 +17,8 @@ vesicle->bending_rigidity=25.0; fprintf(stderr,"xk=%f\n",vesicle->bending_rigidity); -vesicle->sphHarmonics=sph_init(vesicle->vlist, 10); +centermass(vesicle); +vesicle->sphHarmonics=sph_init(vesicle->vlist, 21); int i,j; ts_double area; for(i=1;i<=vesicle->sphHarmonics->l;i++){ @@ -33,18 +36,35 @@ area+=vesicle->tlist->tria[i]->area; } fprintf(stderr,"area_dipyramid=%e\n",area); +fprintf(stderr,"Centroid=(%e,%e,%e)\n", vesicle->cm[0],vesicle->cm[1],vesicle->cm[2]); preparationSh(vesicle,r0); calculateYlmi(vesicle); -calculateUlm(vesicle); +/* +ts_coord *coord=(ts_coord *)malloc(sizeof(ts_coord)); +ts_double fi, theta; + for(i=0;i<vesicle->vlist->n;i++){ + + cart2sph(coord,vesicle->vlist->vtx[i]->x, vesicle->vlist->vtx[i]->y, vesicle->vlist->vtx[i]->z); + fi=coord->e2; + theta=coord->e3; + + + fprintf(stderr,"VTX(x,y,z,fi,theta)=%e,%e,%e,%e,%e ---> Ylmi(2,-2,%d)=%9.7e <---- data: omega=%e, r0=%e, plgndr(2,abs(-2),cos(theta))=%e, co(2,-2)=%e cos((m-l-1)*fi)=%e\n",vesicle->vlist->vtx[i]->x, vesicle->vlist->vtx[i]->y, vesicle->vlist->vtx[i]->z,fi,theta,i+1,vesicle->sphHarmonics->Ylmi[2][0][i], vesicle->vlist->vtx[i]->solAngle, vesicle->vlist->vtx[i]->relR, plgndr(2,abs(-2),cos(theta)), vesicle->sphHarmonics->co[2][1], cos(-2*fi)); + + } + +free(coord); +*/ +calculateUlm(vesicle); for(i=0;i<vesicle->sphHarmonics->l;i++){ for(j=0;j<2*i+1;j++){ fprintf(stderr,"ulm(%d,%d)=%e\n",i,j+1,vesicle->sphHarmonics->ulm[i][j]); } } - +storeUlm2(vesicle); sph_free(vesicle->sphHarmonics); vesicle_free(vesicle); -- Gitblit v1.9.3