CEMeNT-PSAAP / MCDC

MC/DC: Monte Carlo Dynamic Code
https://mcdc.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
23 stars 24 forks source link

iQMC Batch Method #223

Closed spasmann closed 2 months ago

spasmann commented 3 months ago

Description

The primary goals of this PR are to i) implement a randomized-QMC batching method for eigenvalue calculations ii) continue to increase the readability and maintainability of iQMC. Users can now specify an iQMC run mode with mode='fixed' or mode='batched' in the iQMC input settings, which toggles between the fixed seed and randomized-QMC batch methods. Additionally, the user can specify the sample_method and choose between either 'halton' or 'random'. Both sample methods can be used in either fixed seed or batched mode. halton refers to the halton sequence (standard and randomized) random refers to typical prng samples, which are currently generated with numpy.

The randomized-QMC batching method uses the randomized halton sequence to accumulate batch statistics in much the same way as batched Monte Carlo eigenvalue calculations. In fixed seed mode the change in the source strength every iteration comes only from convergence towards the solution. Whereas in batched mode the change in source strength is due to convergence towards the solution and some stochastic noise introduced from randomizing the samples. As a result, iQMC tallies now have a mean, sdev, and bin components like standard Monte Carlo tallies.

Additional Changes:

Planned Work

ilhamv commented 2 months ago

In fixed source mode the change in the source strength every iteration comes only from convergence towards the solution. Whereas in batched mode the change in source strength is due to convergence towards the solution and some stochastic noise introduced from randomizing the samples. As a result, iQMC tallies now have a mean, sdev, and bin components like standard Monte Carlo tallies.

Do you mean "fixed seed mode", @spasmann?

spasmann commented 2 months ago

Thank you @jpmorgan98 ! I've added the theory guide to my todo list.

Yes, fixed seed not fixed source. Thanks, @ilhamv.

spasmann commented 2 months ago

All tests passing! @ilhamv