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

SCM Repository

[diderot] Diff of /examples/iso2d-spatial/iso2d-glk.diderot
ViewVC logotype

Diff of /examples/iso2d-spatial/iso2d-glk.diderot

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

revision 3005, Sat Mar 7 22:25:40 2015 UTC revision 3006, Sat Mar 7 22:31:02 2015 UTC
# Line 27  Line 27 
27  input int forceIterMax = 20;  input int forceIterMax = 20;
28  /////////////////////////////////////////////////////////////////////////////  /////////////////////////////////////////////////////////////////////////////
29    
 // GLK asks: what would it take to add functions to this branch?  
 // it would simplify expression of the inter-particle energy potential  
 // current phi(r) = (1 - |r|)^4  
   
30  strand Particle (int ID, vec2 pos0) {  strand Particle (int ID, vec2 pos0) {
31    // world is 1x1 centered at (0.5, 0.5)    // world is 1x1 centered at (0.5, 0.5)
32      vec2 pos = [pos0[0] + pos0[1]/gridSize, pos0[1] + pos0[0]/gridSize];      vec2 pos = [pos0[0] + pos0[1]/gridSize, pos0[1] + pos0[0]/gridSize];
# Line 123  Line 119 
119     real energyMean = mean{P.energy | P in Particle.all};     real energyMean = mean{P.energy | P in Particle.all};
120     evariance = mean{ (P.energy - energyMean) * (P.energy - energyMean) | P in Particle.all};     evariance = mean{ (P.energy - energyMean) * (P.energy - energyMean) | P in Particle.all};
121    
    // GLK asks: what can we do with evariance?  can we stabilize all strands  
    // once variance goes below some threshold?  
   
122     // GLK asks: can we please make print() work from here?  Or how else     // GLK asks: can we please make print() work from here?  Or how else
123     // can we learn how variance is changing between iterations?  Is it only     // can we learn how variance is changing between iterations?  Is it only
124     // via the C API to the library-compiled-to-program that we can learn     // via the C API to the library-compiled-to-program that we can learn

Legend:
Removed from v.3005  
changed lines
  Added in v.3006

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