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

# SCM Repository

[diderot] Diff of /branches/pure-cfg/test/zslice-k1k2.diderot
 [diderot] / branches / pure-cfg / test / zslice-k1k2.diderot

# Diff of /branches/pure-cfg/test/zslice-k1k2.diderot

revision 813, Tue Apr 12 18:02:15 2011 UTC revision 814, Tue Apr 12 18:02:35 2011 UTC
# Line 29  Line 29
29                // HEY NEED: (matlab) "eye(3)", or (pylab) "identity(3)"                // HEY NEED: (matlab) "eye(3)", or (pylab) "identity(3)"
30                // HEY NEED: tensor product of two vectors u⊗v;                // HEY NEED: tensor product of two vectors u⊗v;
31                // should be: tensor[3,3] P = identity(3) - n⊗n;                // should be: tensor[3,3] P = identity(3) - n⊗n;
32                tensor[3,3] P = [[1.0,0.0,0.0],[0.0,1.0,0.0],[0.0,0.0,1.0]]; // fake                tensor[3,3] P = I; // fake
33                // HEY NEED: matrix • matrix multiply                // HEY NEED: matrix • matrix multiply
34                // should be: G = (P•H•P)/|g|;                // should be: G = (P•H•P)/|g|;
35                G = H; // fake                G = P•H•P; // fake
36             }             }
37             // HEY NEED: norm works on tensor[3,3], e.g. |G|             // HEY NEED: norm works on tensor[3,3], e.g. |G|
38             real Gnorm = 2.0*trace(G); // fake; should be |G|             real Gnorm = 2.0*trace(G); // fake; should be |G|
// HEY want: sqrt(x) (I thought we had this?)
39             // HEY want: x^y == x*x*... for integral y < 5 and pow(x,y) otherwise             // HEY want: x^y == x*x*... for integral y < 5 and pow(x,y) otherwise
40             real disc = pow(2.0*Gnorm*Gnorm - trace(G)*trace(G),0.5);             real disc = sqrt(2.0*Gnorm*Gnorm - trace(G)*trace(G));
41             // should be: real disc = sqrt(2*|G|^2 - trace(G)^2);             // should be: real disc = sqrt(2*|G|^2 - trace(G)^2);
42             k1k2 = [trace(G) + disc, trace(G) - disc]/2.0;             k1k2 = [trace(G) + disc, trace(G) - disc]/2.0;
43          }          }

Legend:
 Removed from v.813 changed lines Added in v.814

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