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

SCM Repository

[diderot] View of /branches/vis15/src/tests/rtest/tests/curl2d/curl2d.diderot
ViewVC logotype

View of /branches/vis15/src/tests/rtest/tests/curl2d/curl2d.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4486 - (download) (annotate)
Fri Sep 2 23:59:49 2016 UTC (2 years, 9 months ago) by jhr
File size: 528 byte(s)
  Adde "#version 2.0" tags to those regression tests that need it.
#version 2.0
// process output with:
// unu quantize -i out.nrrd -b 8 -o curl-turb2d.png


int imgSizeX = 16;
int imgSizeY = 16;

field#1(2)[2] V = image("../../data/const-curl2d.nrrd") ⊛ bspln3;

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 = 0.0;

	update {
		out = ∇×V(pos);

		stabilize;
	}
}

grid(2) { 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