Skip to content

Commit e878aeb

Browse files
authored
not printing nuclides with 0 percent to terminal (option 2 ) (#3448)
1 parent 68e894c commit e878aeb

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

openmc/deplete/stepresult.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def get_material(self, mat_id):
233233
) from e
234234
for nuc, _ in sorted(self.index_nuc.items(), key=lambda x: x[1]):
235235
atoms = self[0, mat_id, nuc]
236-
if atoms < 0.0:
236+
if atoms <= 0.0:
237237
continue
238238
atom_per_bcm = atoms / vol * 1e-24
239239
material.add_nuclide(nuc, atom_per_bcm)

tests/unit_tests/test_deplete_resultslist.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,5 +220,4 @@ def test_stepresult_get_material(res):
220220
# Spot check number densities
221221
densities = mat1.get_nuclide_atom_densities()
222222
assert densities['Xe135'] == pytest.approx(1e-14)
223-
assert densities['I135'] == pytest.approx(1e-21)
224223
assert densities['U234'] == pytest.approx(1.00506e-05)

0 commit comments

Comments
 (0)