diff --git a/armi/reactor/grids/structuredgrid.py b/armi/reactor/grids/structuredgrid.py index a518edffe8..ae23c62842 100644 --- a/armi/reactor/grids/structuredgrid.py +++ b/armi/reactor/grids/structuredgrid.py @@ -290,7 +290,12 @@ def restoreBackup(self): self._unitSteps, self._bounds, self._offset = self._backup def getCoordinates(self, indices, nativeCoords=False) -> numpy.ndarray: - """Return the coordinates of the center of the mesh cell at the given given indices in cm.""" + """Return the coordinates of the center of the mesh cell at the given given indices in cm. + + .. test:: Get the coordinates from a location in a grid. + :id: T_ARMI_GRID_GLOBAL_POS + :tests: R_ARMI_GRID_GLOBAL_POS + """ indices = numpy.array(indices) return self._evaluateMesh( indices, self._centroidBySteps, self._centroidByBounds diff --git a/armi/reactor/grids/tests/test_grids.py b/armi/reactor/grids/tests/test_grids.py index 4a51741b01..e70540ad2c 100644 --- a/armi/reactor/grids/tests/test_grids.py +++ b/armi/reactor/grids/tests/test_grids.py @@ -436,6 +436,10 @@ def test_adjustPitch(self): .. test:: Construct a hexagonal lattice with three rings. :id: T_ARMI_GRID_HEX :tests: R_ARMI_GRID_HEX + + .. test:: Return the grid coordinates of different locations. + :id: T_ARMI_GRID_GLOBAL_POS0 + :tests: R_ARMI_GRID_GLOBAL_POS """ grid = grids.HexGrid.fromPitch(1.0, numRings=3) v1 = grid.getCoordinates((1, 0, 0))