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

SCM Repository

[diderot] Diff of /tests/lamont-tests/unit-circle-pc3.diderot
ViewVC logotype

Diff of /tests/lamont-tests/unit-circle-pc3.diderot

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

revision 4700, Wed Oct 5 16:34:14 2016 UTC revision 4701, Wed Oct 5 18:18:18 2016 UTC
# Line 1  Line 1 
1    #version 2
2  // unit-circle  // unit-circle
3  //  //
4  // Demo of distributing particles on the unit circle  // Demo of distributing particles on the unit circle
5  //  //
6  input vec2{} initPos = load("vec2.nrrd");  input vec2[] initPos = load_sequence("vec2.nrrd");
7  //input vec2[] initPos = {[0.15606558, -0.56803983]}; // BUG  //input vec2[] initPos = {[0.15606558, -0.56803983]}; // BUG
8  input int iterMax ("maximum number of iterations to run") = 1;  input int iterMax ("maximum number of iterations to run") = 1;
9  input real rad ("radius of particle's energy support") = 0.2;  input real rad ("radius of particle's energy support") = 0.2;
# Line 93  Line 94 
94     }     }
95  }  }
96    
97  global {  update {
98     //print("(iter ", iter, ") hello from global\n");     //print("(iter ", iter, ") hello from global\n");
99     real mvmt = max { |P.delta|/rad | P in Particle.all};     real mvmt = max { |P.delta|/rad | P in Particle.all};
100     if (numActive() > 1 && mvmt < mvmtEps) {     if (numActive() > 1 && mvmt < mvmtEps) {
# Line 107  Line 108 
108     }     }
109  }  }
110    
111  initially {Particle(-1, ii, initPos[ii], hhInit)  create_collection {Particle(-1, ii, initPos[ii], hhInit)
112             | ii in 0 .. length(initPos)-1 };             | ii in 0 .. length(initPos)-1 }
   

Legend:
Removed from v.4700  
changed lines
  Added in v.4701

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