Skip to content

Commit

Permalink
more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
onufer committed Aug 13, 2024
1 parent 5c708a2 commit b89984d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions armi/materials/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def getChildren(
"""Return empty list, representing that materials have no children."""
return []

def getGrandparent(self):
def getAssociatedBlock(self):
"""Return the grandparent (typically block) associated with this material"""
# would be nice to use composite.getAncestor, but material is not a composite
component = self.parent
Expand Down Expand Up @@ -868,15 +868,15 @@ def __init__(self):
def puFrac(self):
"""Get the Pu Frac."""
# ideally the parameters would be stored on component, not Block (parent, not grandparent)
myBlock = self.getGrandparent()
myBlock = self.getAssociatedBlock()
if myBlock is not None:
return myBlock.p.puFrac
runLog.warning(
"{self} has no block attached, deferring to internally stored Pu Frac. "
"Storing properties on the material objected will be deprecated in the near future.",
single=true,
)
return self_puFrac
return self._puFrac

@puFrac.setter
def puFrac(self, puFrac):
Expand Down

0 comments on commit b89984d

Please sign in to comment.