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

SCM Repository

[diderot] View of /branches/charisee/ertest/test2/divergence2-x3/divergence2-x3.diderot
ViewVC logotype

View of /branches/charisee/ertest/test2/divergence2-x3/divergence2-x3.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2870 - (download) (annotate)
Wed Feb 25 21:47:43 2015 UTC (4 years, 7 months ago) by cchiw
File size: 809 byte(s)
added sqrt,pow, and examples
field#2(2)[2] G2= load("../../../data/turb2d.nrrd") ⊛ bspln3;
field#1(2)[2] V2 = load("../../../data/const-curl2d.nrrd") ⊛ bspln3;

int imgSizeX = 1020;
int imgSizeY = 561;


field#1(2)[] k=V2 •G2;  //takes first k 
strand tensorTest (int xi,int yi)
{

   	real xx = lerp(2.00, 17.0, 0.0, real(xi), real(imgSizeX)-1.0);
	real yy = lerp(2.00, 17.0, 0.0, real(yi), real(imgSizeY)-1.0);
        vec2 pos2 = [xx,yy];
        output tensor[2] out=[99,99];
    
       update
    {
        if (inside(pos2,G2))
        {
            //out=∇•(V2⊗G2)(pos2);//lhs
            tensor[2] t1=(V2*(∇•G2))(pos2);
            tensor[2] t2=((∇⊗V2)•G2)(pos2);
 

             out=t1+t2;
        }
  
    stabilize;
  }
}

initially [ tensorTest(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