Skip to content

[docs] theory on PCG random number generator - #3134

Merged
paulromano merged 12 commits into
openmc-dev:developfrom
rzehumat:doc-pcg
Oct 4, 2024
Merged

paulromano merged 12 commits into
openmc-dev:developfrom
rzehumat:doc-pcg

Conversation

@rzehumat

@rzehumat rzehumat commented Sep 17, 2024 •

Copy link
Copy Markdown
Contributor

Description

This PR fixes #2486 - it contains

  • a short description of PCG random number generator + link to relevant sources
  • a link to source of the code, added to random_lcg.cpp - might be reverted, as this change is technically not releavant to the issue

Fixes #2486

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

This is my first pull request to OpenMC. Sorry in advance for any errors.

Comment thread src/random_lcg.cpp
Comment thread docs/source/methods/random_numbers.rst Outdated
Comment thread docs/source/methods/random_numbers.rst Outdated
Comment thread docs/source/methods/random_numbers.rst Outdated
@rzehumat
rzehumat marked this pull request as ready for review September 18, 2024 16:17

@paulromano paulromano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rzehumat Thanks a lot for this contribution! I ended up simplifying a lot of what was written here by explaining the basic concepts but leaving the details to other references. If someone really wants to know how it works, they are probably better served by reading the original reports or by looking through the source code.

@paulromano
paulromano enabled auto-merge (squash) October 3, 2024 21:18
@rzehumat

rzehumat commented Oct 3, 2024

Copy link
Copy Markdown
Contributor Author

Hi @paulromano , thanks for your review and edit. I agree my original explanation was messy so keeping it short and simple would be the best option. Furthermore, the referenced paper by M. O'Neill is open and - in my opinion - really well written.

@paulromano
paulromano merged commit 8364286 into openmc-dev:develop Oct 4, 2024
apingegno pushed a commit to apingegno/openmc that referenced this pull request May 7, 2026
Co-authored-by: Matej Rzehulka <matej.rzehulka@suro.cz>
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Theory documentation on random number generation outdated

2 participants