mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
Apply suggestions from @paulromano code review
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
63b517aebc
commit
3271c08d22
1 changed files with 1 additions and 5 deletions
|
|
@ -917,7 +917,6 @@ class Material(IDManagerMixin):
|
|||
|
||||
Returns
|
||||
-------
|
||||
|
||||
Union[dict, float]
|
||||
If by_nuclide is True then a dictionary whose keys are nuclide
|
||||
names and values are activity is returned. Otherwise the activity
|
||||
|
|
@ -939,10 +938,7 @@ class Material(IDManagerMixin):
|
|||
inv_seconds = openmc.data.decay_constant(nuclide)
|
||||
activity[nuclide] = inv_seconds * 1e24 * atoms_per_bcm * multiplier
|
||||
|
||||
if by_nuclide:
|
||||
return activity
|
||||
else:
|
||||
return sum(activity.values())
|
||||
return activity if by_nuclide else sum(activity.values())
|
||||
|
||||
def get_nuclide_atoms(self):
|
||||
"""Return number of atoms of each nuclide in the material
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue