mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
simpler if else statement for normalization
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
This commit is contained in:
parent
e4d54d49a8
commit
c036403c98
1 changed files with 4 additions and 2 deletions
|
|
@ -929,8 +929,10 @@ class Material(IDManagerMixin):
|
|||
|
||||
if normalization == 'total':
|
||||
multiplier = self.volume
|
||||
else:
|
||||
multiplier = 1 if normalization == 'volume' else 1.0 / self.get_mass_density()
|
||||
elif normalization == 'volume':
|
||||
multiplier = 1
|
||||
elif normalization == 'mass':
|
||||
multiplier = 1.0 / self.get_mass_density()
|
||||
|
||||
activity = {}
|
||||
for nuclide, atoms_per_bcm in self.get_nuclide_atom_densities().items():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue