Minor tweaks to Operator, EnergyScoreHelper

Per reviewer comments
This commit is contained in:
Andrew Johnson 2019-09-17 12:18:51 -05:00
parent cfbd4f2fd6
commit 2ab3ad7b78
No known key found for this signature in database
GPG key ID: 253418E91B7F6FEB
2 changed files with 2 additions and 7 deletions

View file

@ -205,7 +205,7 @@ class EnergyScoreHelper(EnergyHelper):
the number of MPI processes
"""
super().reset()
if not comm.rank:
if comm.rank == 0:
self._energy = self._tally.results[0, 0, 1]
# ------------------------------------

View file

@ -84,8 +84,7 @@ class Operator(TransportOperator):
Indicator for computing system energy. ``"energy-deposition"`` will
compute with a single energy deposition tally, taking fission energy
release data and heating into consideration. ``"fission-q"`` will
use the fission Q values from the depletion chain, not taking
heating into consideration.
use the fission Q values from the depletion chain
fission_q : dict, optional
Dictionary of nuclides and their fission Q values [eV]. If not given,
values will be pulled from the ``chain_file``. Only applicable
@ -261,8 +260,6 @@ class Operator(TransportOperator):
# Update status
self.number.set_density(vec)
time_start = time.time()
# Update material compositions and tally nuclides
self._update_materials()
nuclides = self._get_tally_nuclides()
@ -274,8 +271,6 @@ class Operator(TransportOperator):
openmc.lib.reset()
openmc.lib.run()
time_openmc = time.time()
# Extract results
op_result = self._unpack_tallies_and_normalize(power)