Skip to content

Commit

Permalink
roll back type check
Browse files Browse the repository at this point in the history
  • Loading branch information
albeanth committed Apr 3, 2023
1 parent 19d0cc6 commit d9d138b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
5 changes: 0 additions & 5 deletions armi/reactor/converters/axialExpansionChanger.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,11 +849,6 @@ def determineTargetComponent(self, b, flagOfInterest=None):
componentWFlag = [c for c in b.getChildren() if c.p.flags in b.p.flags]
else:
componentWFlag = [c for c in b.getChildren() if c.hasFlags(flagOfInterest)]
if len(componentWFlag) == 0:
# didn't match flags so check type before failing
componentWFlag = [
c for c in b if (c.p.type in b.p.type or b.p.type in c.p.type)
]
if len(componentWFlag) == 0:
# if only 1 solid, be smart enought to snag it
solidMaterials = list(
Expand Down
23 changes: 0 additions & 23 deletions armi/reactor/converters/tests/test_axialExpansionChanger.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,29 +759,6 @@ def test_specifyTargetComponent_singleSolid(self):
msg=f"determineTargetComponent failed to recognize intended component: {duct}",
)

def test_specifyTargetComponent_viaType(self):
"""set target component via type and not flags
Notes
-----
For the case in which a block contains a component that does not have Flags defined.
So instead of matching on flags, we match on type.
"""
b = HexBlock("detector", height=10.0)
detectorDims = {"Tinput": 25.0, "Thot": 25.0, "widthOuter": 1.1, "mult": 1.0}
ductDims = {"Tinput": 25.0, "Thot": 25.0, "op": 17, "ip": 0.0, "mult": 1.0}
detector = Rectangle("detector neutron", "FakeMat", **detectorDims)
duct = Hexagon("duct", "FakeMat", **ductDims)
b.add(duct)
b.add(detector)
b.add(self.coolant)
b.setType("detector")
self.expData.determineTargetComponent(b)
self.assertTrue(
self.expData.isTargetComponent(detector),
msg=f"determineTargetComponent failed to recognize intended component: {detector}",
)

def test_specifyTargetComponet_MultipleFound(self):
"""ensure RuntimeError is hit when multiple target components are found
Expand Down

0 comments on commit d9d138b

Please sign in to comment.