| | |
| | | |
| | | if(vesicle->tape->constvolswitch==2){ |
| | | /*check whether the dvol is gt than epsvol */ |
| | | //fprintf(stderr,"DVOL=%1.16e\n",dvol); |
| | | //fprintf(stderr,"DVOL=%1.16e, V0=%1.16e, vesicleVolume=%1.16e, |volume+dvol-V0|=%1.16e\n",dvol, V0, vesicle->volume, fabs(vesicle->volume+dvol-V0)); |
| | | if(fabs(vesicle->volume+dvol-V0)>epsvol){ |
| | | //restore old state. |
| | | vtx=memcpy((void *)vtx,(void *)&backupvtx[0],sizeof(ts_vertex)); |
| | |
| | | vtx->neigh[i]=memcpy((void *)vtx->neigh[i],(void *)&backupvtx[i+1],sizeof(ts_vertex)); |
| | | } |
| | | for(i=0;i<vtx->tristar_no;i++) triangle_normal_vector(vtx->tristar[i]); |
| | | //fprintf(stderr,"fajlam!\n"); |
| | | // fprintf(stderr,"fajlam!\n"); |
| | | return TS_FAIL; |
| | | } |
| | | |
| | | } else |
| | | //fprintf(stderr, "success\n"); |
| | | // vesicle_volume(vesicle); |
| | | // fprintf(stderr,"Volume before=%1.16e\n", vesicle->volume); |
| | | if(vesicle->tape->constvolswitch == 1){ |