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

SCM Repository

[diderot] Diff of /branches/pure-cfg/test/particles-iso.diderot
ViewVC logotype

Diff of /branches/pure-cfg/test/particles-iso.diderot

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

trunk/test/particles-iso.diderot revision 479, Fri Nov 19 17:01:31 2010 UTC branches/pure-cfg/test/particles-iso.diderot revision 922, Thu Apr 21 22:33:34 2011 UTC
# Line 119  Line 119 
119          real energNew, energyOrig;          real energNew, energyOrig;
120    
121          (energyOrig, force) = totalEnergy(pos);          (energyOrig, force) = totalEnergy(pos);
122            // project force onto tangent plane
123            vec3 norm = ∇F@pos/|∇F@pos|;
124            force -= outer(norm, norm)*force
125          // ensures that step*force is a reasonable distance          // ensures that step*force is a reasonable distance
126          step = min(step, travelMax/|force|);          step = min(step, travelMax/|force|);
         if (step*|force| > travelMax) {  
            step = travelMax/|force|;  
         }  
127          do {          do {
128             (bool ok, posNew) = constrain(pos + step*force);             (bool ok, posNew) = constrain(pos + step*force);
129             if (!ok) {             if (!ok) {

Legend:
Removed from v.479  
changed lines
  Added in v.922

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