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

SCM Repository

[diderot] View of /tests/DATm-bugs/tests/C8/observ.diderot
ViewVC logotype

View of /tests/DATm-bugs/tests/C8/observ.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5141 - (download) (annotate)
Thu Jul 20 17:07:50 2017 UTC (2 years, 2 months ago) by cchiw
File size: 1016 byte(s)
move test programs
tensor [2, 2]F0 = [[-1, -4], [3, -5]];
field#4(3)[]F1 = c4hexic⊛  image("rst/data/inputfile1.nrrd");
input real scale = 1;
field#4(3)[2, 2]G = inv((normalize(F0))*(F1));
int length =7;
strand f(int i) {

	output tensor [2, 2] out =  [ [0.0,0.0], [0.0,0.0]];
	    update {

		tensor [3] pos=[0,0,0];
		if(i==0){
			pos = ([-0.04, -0.36, 0.03]);
		}
		else if(i==1){
			pos = ([-0.04, -0.36, 0.03]);
		}
		else if(i==2){
			pos = ([-0.2, 0.32, -0.35]);
		}
		else if(i==3){
			pos = ([0.06, -0.3, -0.16]);
		}
		else if(i==4){
			pos = ([0.0, 0.06, -0.39]);
		}
		else if(i==5){
			pos = ([-0.39, -0.25, -0.32]);
		}
		else if(i==6){
			pos = ([0.3, -0.24, -0.12]);
		}
		else if(i==7){
			pos = ([-0.1, -0.17, 0.21]);
		}

	if((inside(pos,F1)) && true){
		if(((det(((normalize(F0))*(F1))(pos))>0.01) || (det(((normalize(F0))*(F1))(pos))< -0.01)))
			{	out = (G)(pos);}
		else{out =  [ [7.2,7.2], [7.2,7.2]];}
	}
	 else{out =  [ [7.2,7.2], [7.2,7.2]];}
        stabilize;
    }
}
initially [ f(i) | i in 0..length];

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