Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /examples/iso2d-spatial/iso2d-glk.diderot
ViewVC logotype

Diff of /examples/iso2d-spatial/iso2d-glk.diderot

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2980, Fri Mar 6 23:06:02 2015 UTC revision 2982, Fri Mar 6 23:14:41 2015 UTC
# Line 73  Line 73 
73            foreach (Particle p_j in sphere(RR)) {            foreach (Particle p_j in sphere(RR)) {
74              if (p_j.foundContour) {              if (p_j.foundContour) {
75                vec2 r_ij = (pos - p_j.pos)/rr;                vec2 r_ij = (pos - p_j.pos)/rr;
               vec2 d_ij = normalize(r_ij);  
76                if (|r_ij| < 1) {                if (|r_ij| < 1) {
77                  energy += (1 - |r_ij|)^4;                  energy += (1 - |r_ij|)^4;
78                  force += - (-4*(1 - |r_ij|)^3) * d_ij;                  force += - (-4*(1 - |r_ij|)^3) * normalize(r_ij);
79                }                }
80              }              }
81            }            }

Legend:
Removed from v.2980  
changed lines
  Added in v.2982

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0