Home My Page Projects Code Snippets Project Openings diderot

# SCM Repository

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

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

revision 4653, Wed Sep 28 18:09:52 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  //  //
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;
# 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.4653 changed lines Added in v.4701