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

SCM Repository

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

Diff of /branches/pure-cfg/test/iso2d.diderot

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

revision 1102, Wed May 4 20:55:19 2011 UTC revision 1129, Thu May 5 16:20:16 2011 UTC
# Line 24  Line 24 
24          // non-finite position; these will be filtered later.          // non-finite position; these will be filtered later.
25          // This is really what "die" is for, though (see below).          // This is really what "die" is for, though (see below).
26          if (!inside(pos, F) || steps > stepsMax) {          if (!inside(pos, F) || steps > stepsMax) {
27              pos = [nan,nan];              die;
             // HEY (BUG) we shouldn't even have to use non-finite values;  
             // we should be able to just say "die;".  Currently, using  
             // "die" leads to the program never finishing...  
             stabilize;  
28          }          }
29          vec2 grad = ∇F(pos);          vec2 grad = ∇F(pos);
30          real gmsq = grad • grad;          real gmsq = grad • grad;
31          // If |∇F|=0 we can't compute update; we have to bail          // If |∇F|=0 we can't compute update; we have to bail
32          if (gmsq == 0.0) {          if (gmsq == 0.0) {
33              pos = [nan,nan];              die;
             stabilize;  
34          }          }
35          // delta = Newton-Raphson step          // delta = Newton-Raphson step
36          vec2 delta = -(F(pos) - isoval)*grad/gmsq;          vec2 delta = -(F(pos) - isoval)*grad/gmsq;

Legend:
Removed from v.1102  
changed lines
  Added in v.1129

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