Skip to content

Commit

Permalink
Removing unused method HexGrid.allPositionsInThird (#1655)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science authored Mar 4, 2024
1 parent 6163e94 commit bb6ba5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions 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
1 change: 1 addition & 0 deletions doc/release/0.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ API Changes
-----------
#. Renaming ``structuredgrid.py`` to camelCase. (`PR#1650 <https://github.com/terrapower/armi/pull/1650>`_)
#. Removing unused argument from ``Block.coords()``. (`PR#1651 <https://github.com/terrapower/armi/pull/1651>`_)
#. Removing unused method ``HexGrid.allPositionsInThird()``. (`PR#1655 <https://github.com/terrapower/armi/pull/1655>`_)
#. TBD

Bug Fixes
Expand Down

0 comments on commit bb6ba5c

Please sign in to comment.