Skip to content

Commit

Permalink
Simplify logic in updateDeltaDPApastIncubationDose.
Browse files Browse the repository at this point in the history
Removed a redundant check to isBeyondIncubationDose.
updateDeltaDPApastIncubationDose is only called after
isBeyondIncubationDose evaluates as true, so the check does not need to
be repeated within updateDeltaDPApastIncubationDose.
  • Loading branch information
mgjarrett committed Mar 11, 2021
1 parent a97aab7 commit 1c8db6b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions armi/materials/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,12 +615,7 @@ def updateDeltaDPApastIncubation(self, totalDPA, deltaDPA):
runLog.warning(msg, single=True, label="Missing incubation dose")
return deltaDPA
else:
if (totalDPA > self.modelConst["Rincu"]) and (
(totalDPA - self.modelConst["Rincu"]) < deltaDPA
):
return totalDPA - self.modelConst["Rincu"]
else:
return deltaDPA
return min(totalDPA - self.modelConst["Rincu"], deltaDPA)

def densityTimesHeatCapacity(self, Tk=None, Tc=None):
r"""
Expand Down

0 comments on commit 1c8db6b

Please sign in to comment.