Trisurf Monte Carlo simulator
Samo Penic
2018-05-16 04694fe065b8cab52fa878a5fc23e7159f2e548c
Fixed the equation for energy and area a0
3 files modified
6 ■■■■ changed files
src/energy.c 2 ●●● patch | view | raw | blame | history
src/initial_distribution.c 2 ●●● patch | view | raw | blame | history
src/restore.c 2 ●●● patch | view | raw | blame | history
src/energy.c
@@ -240,5 +240,5 @@
}
void stretchenergy(ts_vesicle *vesicle, ts_triangle *triangle){
    triangle->energy=vesicle->tape->xkA0/vesicle->tlist->n/2*pow((triangle->area/vesicle->tlist->a0-1),2);
    triangle->energy=vesicle->tape->xkA0/2.0*pow((triangle->area/vesicle->tlist->a0-1.0),2);
}
src/initial_distribution.c
@@ -112,7 +112,7 @@
        vesicle->sphHarmonics=NULL;
    }
    vesicle->tlist->a0=sqrt(3)/2*pow((vesicle->tape->dmax+1.0),2);
    vesicle->tlist->a0=sqrt(3)/2*pow((vesicle->tape->dmax+1.0)/2.0,2);
    return TS_SUCCESS;
}
src/restore.c
@@ -88,7 +88,7 @@
    mean_curvature_and_energy(vesicle);
    sweep_attraction_bond_energy(vesicle);
    if(vesicle->tape->stretchswitch==1){
        vesicle->tlist->a0=sqrt(3)/2*pow((vesicle->tape->dmax+1.0),2);
        vesicle->tlist->a0=sqrt(3)/2.0*pow((vesicle->tape->dmax+1.0)/2.0,2);
        for(i=0;i<vesicle->tlist->n;i++){
            stretchenergy(vesicle, vesicle->tlist->tria[i]);
        }