OpenMC/tests/regression_tests/random_ray_halton_samples/test.py
Sam Pasmann d96e6860e6
Randomized Quasi-Monte Carlo Sampling in The Random Ray Method (#3268)
Co-authored-by: John Tramm <john.tramm@gmail.com>
2025-02-19 03:44:15 +00:00

19 lines
503 B
Python

import os
from openmc.examples import random_ray_lattice
from tests.testing_harness import TolerantPyAPITestHarness
class MGXSTestHarness(TolerantPyAPITestHarness):
def _cleanup(self):
super()._cleanup()
f = 'mgxs.h5'
if os.path.exists(f):
os.remove(f)
def test_random_ray_halton_samples():
model = random_ray_lattice()
model.settings.random_ray['sample_method'] = 'halton'
harness = MGXSTestHarness('statepoint.10.h5', model)
harness.main()