Wednesday, September 4, 2013
Assignment 2 - Particles
http://web.eecs.utk.edu/~jcotham/cs462/parallelProg02/parallelProg02.tgz
http://cosc462.newton.utk.edu/jcotham/parallelProg02.tgz
Sample outputs:
numParticles 10000
shape disk
radius 1.000000
xMean 0.007981
yMean 0.001801
xVariance 0.251990
yVariance 0.249922
distanceMean 0.907270
distanceVariance 0.501912
distanceInverseSquaredMean 19.511139
distanceInverseSquaredVariance 22907.612434
numParticles 10000
shape square
radius 1.000000
xMean 0.002533
yMean 0.006514
xVariance 0.330165
yVariance 0.334416
distanceMean 1.041235
distanceVariance 0.664582
distanceInverseSquaredMean 15.483685
distanceInverseSquaredVariance 28928.666000
For both the square and the disk, the xMean and yMean should be almost 0, as the shapes are centered at the origin. Thus, the sample values are about what is expected. The xVariance and yVariance are both consistent for each shape, as expected, and the variance is smaller for the circle than for the square, which makes sense.
The lecture notes cite the average pairwise distance for particles in a circle to be about .90541*r. This is very close to my mean of .907. The distanceMean for the square is close but slightly larger, as would be expected. The variance seems reasonable.
I'm not really sure what the distanceInverseSquaredMean is supposed to measure, but the values are close to the sample values. The distanceInverseSquaredVariance seems to be way off, but I'm not sure what might be going on with it.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment