Trisurf Monte Carlo simulator
Samo Penic
2012-07-10 e19e790e95f14ca69a7ce9c5e45d815fe21df36e
commit | author | age
5bb11d 1 #include "general.h"
SP 2 #include "sh.h"
3 #include "vesicle.h"
4 #include "initial_distribution.h"
9bf6ee 5 #include <math.h>
5bb11d 6
SP 7 int main(){
8 ts_vesicle *vesicle=initial_distribution_dipyramid(4,60,60,60,0.15);
9 //parsetape(vesicle,&i);
10
11 //these four must come from parsetype!
12 vesicle->dmax=1.67*1.67;
13 vesicle->stepsize=0.15;
14 vesicle->clist->max_occupancy=8;
15 vesicle->bending_rigidity=25.0;
16 fprintf(stderr,"xk=%f\n",vesicle->bending_rigidity);
17
18 vesicle->sphHarmonics=sph_init(vesicle->vlist, 10);
19 int i,j;
79fc9c 20 for(i=1;i<=vesicle->sphHarmonics->l;i++){
SP 21     for(j=1;j<=2*i+1;j++){
22     fprintf(stderr,"co(%d,%d)=%e\n",i,j,vesicle->sphHarmonics->co[i][j]);
5bb11d 23     }
SP 24 }
9bf6ee 25 ts_double r0;
SP 26 vesicle_volume(vesicle);
27 fprintf(stderr,"Volume=%e\n",vesicle->volume);
28 r0=getR0(vesicle);
29 fprintf(stderr,"r0=%e\n",r0);
30 preparationSh(vesicle,r0);
31 calculateYlmi(vesicle);
79048f 32 calculateUlm(vesicle);
SP 33
34 for(i=0;i<vesicle->sphHarmonics->l;i++){
35     for(j=0;j<2*i+1;j++){
36     fprintf(stderr,"ulm(%d,%d)=%e\n",i,j+1,vesicle->sphHarmonics->ulm[i][j]);
37     }
38 }
39
40
5bb11d 41
SP 42 sph_free(vesicle->sphHarmonics);
9bf6ee 43 vesicle_free(vesicle);
5bb11d 44 return 0;
SP 45 }