Skip to content

Commit

Permalink
Fixing docstring for setDimension (#1019)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Dec 13, 2022
1 parent aaaf7a5 commit 68d5c3b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions armi/reactor/components/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
from armi.materials import void
from armi.nucDirectory import nuclideBases
from armi import materials
from armi.reactor.flags import Flags

COMPONENT_LINK_REGEX = re.compile(r"^\s*(.+?)\s*\.\s*(.+?)\s*$")

Expand Down Expand Up @@ -791,23 +790,24 @@ def setDimension(self, key, val, retainLink=False, cold=True):
retainLink : bool, optional
If True, the val will be applied to the dimension of linked
component which indirectly changes this component's dimensions.
cold : book, optional
If True sets the component to the dimension that would cause
the hot dimension to be the specified value.
cold : bool, optional
If True sets the component cold dimension to the specified value.
"""
if not key:
return
if retainLink and self.dimensionIsLinked(key):
linkedComp, linkedDimName = self.p[key]
linkedComp.setDimension(linkedDimName, val, cold=cold)
else:
expansionFactor = (
self.getThermalExpansionFactor()
if key in self.THERMAL_EXPANSION_DIMS
else 1.0
)
val = val / expansionFactor if not cold else val
if not cold:
expansionFactor = (
self.getThermalExpansionFactor()
if key in self.THERMAL_EXPANSION_DIMS
else 1.0
)
val /= expansionFactor
self.p[key] = val

self.clearLinkedCache()

def getDimension(self, key, Tc=None, cold=False):
Expand Down

0 comments on commit 68d5c3b

Please sign in to comment.