Source biasing capabilities (#3460)

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Jack Fletcher 2026-01-12 10:51:12 -05:00 committed by GitHub
parent 37e2feb34b
commit 0486e433d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 2003 additions and 252 deletions

View file

@ -28,7 +28,7 @@ TEST_CASE("Test alias method sampling of a discrete distribution")
int counter = 0;
for (size_t i = 0; i < n_samples; i++) {
auto sample = dist.sample(&seed);
auto sample = dist.sample(&seed).first;
std += sample * sample / n_samples;
dist_mean += sample;
@ -61,7 +61,7 @@ TEST_CASE("Test alias sampling method for pugixml constructor")
// Initialize discrete distribution and seed
openmc::Discrete dist(energy);
uint64_t seed = openmc::init_seed(0, 0);
auto sample = dist.sample(&seed);
auto sample = dist.sample(&seed).first;
// Assertions
REQUIRE(dist.x().size() == 3);