Skip to content

Commit

Permalink
Removing unused method HexGrid.allPositionsInThird
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Feb 29, 2024
1 parent 6163e94 commit 96b6c1a
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions armi/reactor/grids/hexagonal.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
BOUNDARY_60_DEGREES,
BOUNDARY_CENTER,
)
from armi.reactor.grids.locations import IndexLocation, IJKType, IJType
from armi.reactor.grids.locations import IJKType, IJType
from armi.reactor.grids.structuredGrid import StructuredGrid

COS30 = sqrt(3) / 2.0
Expand Down Expand Up @@ -469,33 +469,3 @@ def generateSortedHexLocationList(self, nLocs: int):
)

return locList[:nLocs]

# TODO: this is only used by testing and another method that just needs the count of assemblies
# in a ring, not the actual positions
def allPositionsInThird(self, ring, includeEdgeAssems=False):
"""
Returns a list of all the positions in a ring (in the first third).
Parameters
----------
ring : int
The ring to check
includeEdgeAssems : bool, optional
If True, include repeated positions in odd ring numbers. Default: False
Notes
-----
Rings start at 1, positions start at 1
Returns
-------
positions : int
"""
positions = []
for pos in range(1, self.getPositionsInRing(ring) + 1):
i, j = self.getIndicesFromRingAndPos(ring, pos)
loc = IndexLocation(i, j, 0, None)
if self.isInFirstThird(loc, includeEdgeAssems):
positions.append(pos)

return positions

0 comments on commit 96b6c1a

Please sign in to comment.