| | |
| | | ts_double dist; |
| | | ts_bool retval; |
| | | ts_uint cellidx; |
| | | ts_double delta_energy,oenergy; |
| | | ts_double delta_energy,oenergy,dvol=0.0; |
| | | ts_double costheta,sintheta,phi,r; |
| | | //This will hold all the information of vtx and its neighbours |
| | | ts_vertex backupvtx[20]; |
| | |
| | | memcpy((void *)&backupvtx[i+1],(void *)vtx->neigh[i],sizeof(ts_vertex)); |
| | | } |
| | | |
| | | |
| | | if(vesicle->pswitch == 1){ |
| | | for(i=0;i<vtx->tristar_no;i++) dvol-=vtx->tristar[i]->volume; |
| | | }; |
| | | |
| | | delta_energy=0; |
| | | //update the normals of triangles that share bead i. |
| | |
| | | energy_vertex(vtx->neigh[i]); |
| | | delta_energy+=vtx->neigh[i]->xk*(vtx->neigh[i]->energy-oenergy); |
| | | } |
| | | |
| | | if(vesicle->pswitch == 1){ |
| | | for(i=0;i<vtx->tristar_no;i++) dvol+=vtx->tristar[i]->volume; |
| | | delta_energy-=vesicle->pressure*dvol; |
| | | }; |
| | | |
| | | /* No poly-bond energy for now! |
| | | if(vtx->grafted_poly!=NULL){ |
| | | delta_energy+= |