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

SCM Repository

[diderot] Diff of /branches/lamont/test/spatial/particle.diderot
ViewVC logotype

Diff of /branches/lamont/test/spatial/particle.diderot

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

revision 2120, Thu Feb 7 13:46:31 2013 UTC revision 2160, Tue Feb 19 13:27:00 2013 UTC
# Line 11  Line 11 
11   * All rights reserved.   * All rights reserved.
12   */   */
13  real{} posns = load("positions.nrrd");  real{} posns = load("positions.nrrd");
14  int numParticles = 64;  int numParticles = 9;
15  int dimSize = 2;  int dimSize = 2;
16  int strandSize = 2;  vec2 qGridDim = [4,4];
17    vec2 qCellDim = [100,100];
18  real query_radius = 10.0;  real query_radius = 10.0;
19    
20  strand Particle (int i, real x,real y) {  strand Particle (int i, real x,real y) {
21      vec2 pos = [x,y];      vec2 pos = [x,y];
22        int id = i;
23      output int neighborCount = 0;      output int neighborCount = 0;
24      update {      update {
25           int count = 0;           int count = 0;
26             print("======Strand id: #", id, " Neigbors======\n");
27           foreach(Particle p in sphere(query_radius)){           foreach(Particle p in sphere(query_radius)){
28              count = count + 1;              print("Neighbor id: ", p.id);
29                count = count;
30           }           }
31             print("==================================\n");
32           neighborCount = count;           neighborCount = count;
33           stabilize;           stabilize;
34      }      }

Legend:
Removed from v.2120  
changed lines
  Added in v.2160

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