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

SCM Repository

[diderot] View of /branches/vis12/rtest2/tests/tracefield2-x1/tracefield2-x1.diderot
ViewVC logotype

View of /branches/vis12/rtest2/tests/tracefield2-x1/tracefield2-x1.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2864 - (download) (annotate)
Wed Feb 4 04:50:28 2015 UTC (6 years, 4 months ago) by cchiw
File size: 751 byte(s)
missed files
int imgSizeX = 16;
int imgSizeY = 16;

field#1(2)[2] V = image("../../../data/const-curl2d.nrrd") āŠ› bspln3;
field#1(2)[2] F=  image("../../../data/turb2d.nrrd") āŠ› ctmr;

strand CURL (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 pos = [xx,yy];


         output real out = 99;


       update {
                if(inside(pos,V)&&inside(pos,F)){
      
                 //tensor[2,2] m=(VāŠ—F)(pos);//lhs
                    tensor[2,2] m=V(pos)āŠ—F(pos);
                 out=trace(m);           

}
    else{out=99;}
	      	  stabilize;
		  }
}

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