Trisurf Monte Carlo simulator
Samo Penic
2019-08-14 aede7e0121a037fd7226a8bfd558eb21a932fa5a
Added additional functions to ease Ulm2 poststating
2 files modified
21 ■■■■■ changed files
src/shcomplex.c 19 ●●●●● patch | view | raw | blame | history
src/shcomplex.h 2 ●●●●● patch | view | raw | blame | history
src/shcomplex.c
@@ -117,6 +117,25 @@
    return TS_SUCCESS;
}
char *Ulm2Complex2String(ts_vesicle *vesicle){
    ts_int i,j;
    char *strng=(char *)calloc(5000, sizeof(char));
    for(i=0;i<vesicle->sphHarmonics->l;i++){
            for(j=i;j<2*i+1;j++){
            sprintf(strng,"%e ", gsl_complex_abs2(vesicle->sphHarmonics->ulmComplex[i][j]));
            }
    }
    sprintf(strng,"\n");
    return strng;
}
ts_bool freeUlm2String(char *strng){
    free(strng);
    return TS_SUCCESS;
}
ts_bool storeUlmComplex2(ts_vesicle *vesicle){
    ts_spharm *sph=vesicle->sphHarmonics;
src/shcomplex.h
@@ -6,5 +6,7 @@
ts_spharm *complex_sph_init(ts_vertex_list *vlist, ts_uint l);
ts_bool complex_sph_free(ts_spharm *sph);
ts_bool calculateUlmComplex(ts_vesicle *vesicle);
char *Ulm2Complex2String(ts_vesicle *vesicle);
ts_bool freeUlm2String(char *strng);
ts_double calculateKc(ts_vesicle *vesicle, ts_int lmin, ts_int lmax);
#endif