Bump up tolerance for flaky activation test (#3560)

This commit is contained in:
Paul Romano 2025-09-03 11:35:11 -05:00 committed by GitHub
parent eaed400987
commit 5918564727
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,7 +45,7 @@ ENERGIES = np.logspace(log10(1e-5), log10(2e7), 100)
@pytest.mark.parametrize("reaction_rate_mode,reaction_rate_opts,tolerance", [
("direct", {}, 1e-5),
("flux", {'energies': ENERGIES}, 0.01),
("flux", {'energies': ENERGIES}, 0.1),
("flux", {'energies': ENERGIES, 'reactions': ['(n,gamma)']}, 1e-5),
("flux", {'energies': ENERGIES, 'reactions': ['(n,gamma)'], 'nuclides': ['W186', 'H3']}, 1e-2),
])
@ -61,11 +61,10 @@ def test_activation(run_in_tmpdir, model, reaction_rate_mode, reaction_rate_opts
w186 = openmc.deplete.Nuclide('W186')
w186.add_reaction('(n,gamma)', None, 0.0, 1.0)
chain.add_nuclide(w186)
chain.export_to_xml('test_chain.xml')
# Create transport operator
op = openmc.deplete.CoupledOperator(
model, 'test_chain.xml',
model, chain,
normalization_mode="source-rate",
reaction_rate_mode=reaction_rate_mode,
reaction_rate_opts=reaction_rate_opts,