OpenMC/tests/regression_tests/random_ray_adjoint_k_eff/test.py
John Tramm 172867b1df
Random Ray Adjoint Mode (#3191)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2024-11-20 20:15:41 +00:00

20 lines
485 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_basic():
model = random_ray_lattice()
model.settings.random_ray['adjoint'] = True
harness = MGXSTestHarness('statepoint.10.h5', model)
harness.main()