SCM Repository
[diderot] / trunk / test / iso2d.diderot |
Diff of /trunk/test/iso2d.diderot
Parent Directory
|
Revision Log
|
Patch
revision 1115, Thu May 5 04:42:18 2011 UTC | revision 1131, Thu May 5 18:53:48 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; |
|
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |