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

SCM Repository

[diderot] View of /branches/charisee/test/EIN/derivsV2.diderot
ViewVC logotype

View of /branches/charisee/test/EIN/derivsV2.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2855 - (download) (annotate)
Mon Dec 15 20:26:17 2014 UTC (6 years, 4 months ago) by cchiw
File size: 842 byte(s)
added examples
// unu reshape -i v2.txt -s 1020 561 | unu quantize -b 8  -o v2.png
image(2)[2] Fimg= load("../../data/turb2d.nrrd");

field#1(2)[2] F= Fimg ⊛ ctmr; //support 2
field#2(2)[2] G= Fimg ⊛ bspln3; //support 2
int imgSizeX = 1020;
int imgSizeY = 561;
strand fieldTest (int xi, int yi) {
       real xx = lerp(0.3, 6.75, 0.0, real(xi), real(imgSizeX)-1.0);
       real yy = lerp(0.6, 3.69, 0.0, real(yi), real(imgSizeY)-1.0);
       vec2 pos = [xx,yy];
       /*output vec2 r=F(pos);
        output real v2= ∇×F(pos);//curl
          output real r=∇•F(pos);//div
    
         output tensor[2,2,2] r=∇⊗∇⊗G(pos);  //hessian
         */
         output tensor[2,2] r=∇⊗F(pos);//jacobian


      update
    {
     
         stabilize;
 
    }
}

initially [ fieldTest(xi, yi) |  yi in 0..(imgSizeY-1), xi in 0..(imgSizeX-1)];


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