hyperion-rt / hyperion

Hyperion Radiative Transfer Code
http://www.hyperion-rt.org
BSD 2-Clause "Simplified" License
52 stars 26 forks source link

Expose sampling/function evaluation at top-level of VoronoiGrid #138

Closed astrofrog closed 9 years ago

astrofrog commented 9 years ago

@bluescarni - I decided to expose it in this way, which actually takes care of the function evaluation too, but I kept your docs since of course people will need to do that to do anything other than an average. Does this look ok?

bluescarni commented 9 years ago

@astrofrog It looks good to me!

Thanks for adding the unit test as well, as I understand it it checks that the average density in the cells decays exponentially in sync with exp(-r^2)?

astrofrog commented 9 years ago

@bluescarni - the values come from the function itself and I made sure they looked sensible but they are not an 'absolute truth', so in that sense, this is more to make sure that the output doesn't change in future rather than checking it's exactly correct (but I did check by eye)