Trisurf Monte Carlo simulator
Samo Penic
2012-06-07 9bf6ee3e299ae9d5627c15814bfad56bf47e9917
preparationSh seems to work ok -- but it was not debugged. calculateYlmi does not work
4 files modified
19 ■■■■ changed files
src/co_test.c 11 ●●●● patch | view | raw | blame | history
src/sh.c 2 ●●●●● patch | view | raw | blame | history
src/sh.h 4 ●●● patch | view | raw | blame | history
src/vesicle.h 2 ●●● patch | view | raw | blame | history
src/co_test.c
@@ -2,6 +2,7 @@
#include "sh.h"
#include "vesicle.h"
#include "initial_distribution.h"
#include <math.h>
int main(){
ts_vesicle *vesicle=initial_distribution_dipyramid(4,60,60,60,0.15);
@@ -21,9 +22,15 @@
    fprintf(stderr,"co(%d,%d)=%e\n",i,j,vesicle->sphHarmonics->co[i][j]);
    }
}
ts_double r0;
vesicle_volume(vesicle);
fprintf(stderr,"Volume=%e\n",vesicle->volume);
r0=getR0(vesicle);
fprintf(stderr,"r0=%e\n",r0);
preparationSh(vesicle,r0);
calculateYlmi(vesicle);
sph_free(vesicle->sphHarmonics);
//vesicle_free(vesicle);
vesicle_free(vesicle);
return 0;
}
src/sh.c
@@ -120,7 +120,9 @@
}
/** @brief: Precomputes coefficients that are required for spherical harmonics computations.
*/
ts_bool precomputeShCoeff(ts_spharm *sph){
    ts_int i,j,al,am;
    ts_double **co=sph->co;
src/sh.h
@@ -9,5 +9,7 @@
ts_bool precomputeShCoeff(ts_spharm *sph);
ts_spharm *sph_init(ts_vertex_list *vlist, ts_uint l);
ts_bool sph_free(ts_spharm *sph);
ts_double getR0(ts_vesicle *vesicle);
ts_bool preparationSh(ts_vesicle *vesicle, ts_double r0);
ts_bool calculateYlmi(ts_vesicle *vesicle);
#endif
src/vesicle.h
@@ -4,6 +4,6 @@
ts_vesicle *init_vesicle(ts_uint N, ts_uint ncmax1, ts_uint ncmax2, ts_uint ncmax3, ts_double stepsize);
ts_bool vesicle_translate(ts_vesicle *vesicle,ts_double x, ts_double y, ts_double z);
ts_bool vesicle_free(ts_vesicle *vesicle);
ts_bool vesicle_volume(ts_vesicle *vesicle);
#endif