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 3011, Mon Mar 9 07:24:33 2015 UTC revision 3012, Mon Mar 9 11:24:46 2015 UTC
# Line 3  Line 3 
3  // Demo of finding isocontours via Newton-Raphson method.  // Demo of finding isocontours via Newton-Raphson method.
4  // Initializes positions on a grid, and each update applies one  // Initializes positions on a grid, and each update applies one
5  // step of Newton-Raphson.  // step of Newton-Raphson.
 //  
 // Process output with:  
 // unu jhisto -i iso2d.txt -b 512 512 -min 0 0 -max 1 1 | unu 2op neq - 0 | unu quantize -b 8  -o iso2d.png  
6    
7  int gridSize = 10;  int gridSize = 10;
8  real isoval = 1;  real isoval = 1;
# Line 112  Line 109 
109  global{  global{
110     real energyMean = mean{P.energy | P in Particle.all};     real energyMean = mean{P.energy | P in Particle.all};
111     evariance = mean{ (P.energy - energyMean) * (P.energy - energyMean) | P in Particle.all};     evariance = mean{ (P.energy - energyMean) * (P.energy - energyMean) | P in Particle.all};
112       // printing here does work
113     // GLK asks: can we please make print() work from here?  Or how else     //print("evariance = ", evariance, "\n");
    // can we learn how variance is changing between iterations?  Is it only  
    // via the C API to the library-compiled-to-program that we can learn  
    // this value at run-time?  
114  }  }
115    
116  initially { Particle(ui + gridSize*vi,  initially { Particle(ui + gridSize*vi,

Legend:
Removed from v.3011  
changed lines
  Added in v.3012

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