mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
Source biasing capabilities (#3460)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
37e2feb34b
commit
0486e433d2
24 changed files with 2003 additions and 252 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue