mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
not printing nuclides with 0 percent to terminal (option 2 ) (#3448)
This commit is contained in:
parent
68e894c4b0
commit
e878aeb82f
2 changed files with 1 additions and 2 deletions
|
|
@ -233,7 +233,7 @@ class StepResult:
|
|||
) from e
|
||||
for nuc, _ in sorted(self.index_nuc.items(), key=lambda x: x[1]):
|
||||
atoms = self[0, mat_id, nuc]
|
||||
if atoms < 0.0:
|
||||
if atoms <= 0.0:
|
||||
continue
|
||||
atom_per_bcm = atoms / vol * 1e-24
|
||||
material.add_nuclide(nuc, atom_per_bcm)
|
||||
|
|
|
|||
|
|
@ -220,5 +220,4 @@ def test_stepresult_get_material(res):
|
|||
# Spot check number densities
|
||||
densities = mat1.get_nuclide_atom_densities()
|
||||
assert densities['Xe135'] == pytest.approx(1e-14)
|
||||
assert densities['I135'] == pytest.approx(1e-21)
|
||||
assert densities['U234'] == pytest.approx(1.00506e-05)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue