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

SCM Repository

[diderot] View of /branches/charisee/ertest/tests/curl2-x2/curl2-x2.diderot
ViewVC logotype

View of /branches/charisee/ertest/tests/curl2-x2/curl2-x2.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3066 - (download) (annotate)
Sat Mar 14 16:34:25 2015 UTC (4 years, 6 months ago) by cchiw
File size: 696 byte(s)
load->image, det(), S*T
field#2(2)[2] G2= image("../../../data/turb2d.nrrd") ⊛ bspln3;
field#1(2)[2] V2 = image("../../../data/const-curl2d.nrrd") ⊛ bspln3;

int imgSizeX = 1020;
int imgSizeY = 561;

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 real out=99;
    
       update
    {
        if (inside(pos2,G2) && inside(pos2,V2))
        {
            out=(∇×(V2+G2))(pos2);//lhs
            //out=(∇×V2+∇×G2)(pos2);//rhs
        }
  
    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