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 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  //  //
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;
# 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