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

SCM Repository

[diderot] Diff of /branches/charisee/ertest/vispaper/viso3d/resamp.diderot
ViewVC logotype

Diff of /branches/charisee/ertest/vispaper/viso3d/resamp.diderot

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2910, Mon Mar 2 21:30:41 2015 UTC revision 2911, Mon Mar 2 21:43:27 2015 UTC
# Line 1  Line 1 
   
1  /*  /*
2    
3  to run:  to run:
# Line 9  Line 8 
8      unu dnorm -o tmp.nrrd \      unu dnorm -o tmp.nrrd \
9   && unu minmax tmp.nrrd   && unu minmax tmp.nrrd
10    
11  Using second "BUG" line should produce min,max ~= 1.0  BUG1 line won't compile
12    
13    BUG2 line should lead to "unu minmax tmp.nrrd" output of min,max ~= 1.0
14    
15  */  */
16    
# Line 26  Line 27 
27  vec3 orig = -(xdir*(sz0-1) + ydir*(sz1-1) + zdir*(sz2-1))/2;  vec3 orig = -(xdir*(sz0-1) + ydir*(sz1-1) + zdir*(sz2-1))/2;
28    
29  field#2(3)[3] V= bspln3 ⊛ load("helix0.nrrd");  field#2(3)[3] V= bspln3 ⊛ load("helix0.nrrd");
30    //field#2(3)[3] V= bspln3 ⊛ image("helix0.nrrd"); // for compiling with vis12 branch
31    
32    // BUG1: does not compile (• not lifted)
33    field#1(3)[] func= [0,0,1]•(∇×V);
34    
35  // seem ok -----------------------  // BUG2: does compile, but values can't be right (not in range [-1,1]); maybe related to resamp-cnm.diderot?
36    //field#1(3)[] func= (V•(∇×V))/(|∇×V|*|V|);
37    
38    // (seem ok) __________________________________
39  //field#1(3)[] func= |V|;  // compiles  //field#1(3)[] func= |V|;  // compiles
40  //field#1(3)[] func= |∇×V|; // compiles  //field#1(3)[] func= |∇×V|; // compiles
41  //field#1(3)[] func= V•(∇×V); // helicity (non-normalized) compiles  //field#1(3)[] func= V•(∇×V); // helicity (non-normalized) compiles
42  //field#1(3)[] func= |V|*|∇×V|; // does not compile (different differentiabilities in * operands)  //field#1(3)[] func= |V|*|∇×V|; // does not compile (different differentiabilities in * operands)
43  //field#1(3)[] func= |∇×V|*|V|; // ah ha- *does* compile!  //field#1(3)[] func= |∇×V|*|V|; // ah ha- *does* compile!
44    // (seem ok) """"""""""""""""""""""""""""""""""
45    
46    
 // BUG: does not compile (• not lifted)  
 field#1(3)[] func= [0,0,1]•(∇×V);  
   
 // BUG: does compile, but values can't be right (not in range [-1,1])  
 // see also resamp-cnm.diderot  
 field#1(3)[] func= (V•(∇×V))/(|∇×V|*|V|);  
   
47  strand sample(int xi, int yi, int zi) {  strand sample(int xi, int yi, int zi) {
48    output real vv = 0;    output real vv = 0;
49    update {    update {
50      vec3 p  = orig + xi*xdir + yi*ydir + zi*zdir;      vec3 p  = orig + xi*xdir + yi*ydir + zi*zdir;
51      vv = func(p);      vv = func(p);
52      // ----------- these are here for GLK's debugging      // ----------- these are here for GLK's debugging
53        //vv = (V(p))•(∇×V(p)); // to generate volume to double-check hiso3d
54      // vv = func(p)/(|V(p)|*|∇×V(p)|); // hack for normalized helicity      // vv = func(p)/(|V(p)|*|∇×V(p)|); // hack for normalized helicity
55      // vv = (∇×V(p))[2]; // to pick off components of curl      // vv = (∇×V(p))[2]; // to pick off components of curl
56      //vv = (V(p)/|V(p)|) • ((∇×V(p))/(|∇×V(p)|));  // alternate expression of normalized helicity      //vv = (V(p)/|V(p)|) • ((∇×V(p))/(|∇×V(p)|));  // alternate expression of normalized helicity

Legend:
Removed from v.2910  
changed lines
  Added in v.2911

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