raysect / source

The main source repository for the Raysect project.
http://www.raysect.org
BSD 3-Clause "New" or "Revised" License
86 stars 23 forks source link

Proposal: adaptive integration #416

Open MMoscheni opened 1 year ago

MMoscheni commented 1 year ago

Dear Raysect team,

we believe that a non-uniform/adaptive integration in InhomogeneousVolumeEmitter would be ideal to speed up the process.

The leading idea would be to allow the user to define a mathematical rule to arbitrarily space source samples along the ray direction. While the current uniform integration places samples at a constant distance step (deafult = 1 cm), an adaptive integration would allow to put more closely-spaced samples in regions of interest (e.g. close to the maximum emission), and more coarsely-spaced elsewhere (e.g. where the emission approaches its minimum / vanishes). This has been preliminarily proven to reduce the computational cost of more than a factor 10, with no associated decrease in the precision.

Quoting the wise strategy suggested by @vsnever (from this issue)

What do you think? Thank you! Cheers, Matteo

CnlPepper commented 1 year ago

An expanded integration system, where materials inform the integrator what step size is appropriate is slated for version 1.0. However this is a breaking change and would require cherab's materials to be completely rewritten. The current design is unsatisfactory and not worth extending.

CnlPepper commented 1 year ago

See #357.