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

Legend:
Removed from v.4648  
changed lines
  Added in v.4653

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