armi.reactor.tests.test_grids module

Tests for grids

class armi.reactor.tests.test_grids.MockLocator(i, j, k, grid)[source]

Bases: armi.reactor.grids.IndexLocation

Locator subclass that with direct location -> location paternity (to avoid needing blocks, assems).

property parentLocation
class armi.reactor.tests.test_grids.MockCoordLocator(i, j, k, grid)[source]

Bases: armi.reactor.grids.CoordinateLocation

property parentLocation
class armi.reactor.tests.test_grids.MockArmiObject(parent=None)[source]

Bases: object

Any sort of object that can serve as a grid’s armiObject attribute.

class armi.reactor.tests.test_grids.TestSpatialLocator(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_add()[source]
test_recursion()[source]

Make sure things work as expected with a chain of locators/grids/locators.

This makes a Cartesian-like reactor out of unit cubes. The origin is in the center of the central cube radially and the bottom axially due to the different way steps and bounds are set up.

test_recursionPin()[source]

Ensure pin the center assem has axial coordinates consistent with a pin in an off-center assembly.

class armi.reactor.tests.test_grids.TestGrid(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_basicPosition()[source]

Ensure a basic Cartesian grid works as expected.

The default stepped grid defines zero at the center of the (0,0,0)th cell. Its centroid is 0., 0., 0). This convention is nicely compatible with 120-degree hex grid.

Full core Cartesian meshes will want to be shifted to bottom left of 0th cell.

test_neighbors()[source]
test_label()[source]
test_isAxialOnly()[source]
test_lookupFactory()[source]
test_quasiReduce()[source]

Make sure our DB-friendly version of reduce works.

test_getitem()[source]

Test that locations are created on demand, and the multi-index locations are returned when necessary.

class armi.reactor.tests.test_grids.TestHexGrid(methodName='runTest')[source]

Bases: unittest.case.TestCase

A set of tests for the Hexagonal Grid

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_positions()[source]
test_neighbors()[source]
test_ringPosFromIndices()[source]

Test conversion from<–>to ring/position based on hand-prepared right answers.

test_label()[source]
test_overlapsWhichSymmetryLine()[source]
test_getSymmetricIdenticalsThird()[source]
test_triangleCoords()[source]
test_getIndexBounds()[source]
test_getAllIndices()[source]
test_buildLocations()[source]
test_is_pickleable()[source]
test_adjustPitch()[source]
test_badIndices()[source]
test_isInFirstThird()[source]
test_indicesAndEdgeFromRingAndPos()[source]
class armi.reactor.tests.test_grids.TestBoundsDefinedGrid(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_positions()[source]
test_base()[source]
test_positionsMixedDefinition()[source]
test_getIndexBounds()[source]
class armi.reactor.tests.test_grids.TestThetaRZGrid(methodName='runTest')[source]

Bases: unittest.case.TestCase

A set of tests for the RZTheta Grid

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_positions()[source]
class armi.reactor.tests.test_grids.TestCartesianGrid(methodName='runTest')[source]

Bases: unittest.case.TestCase

A set of tests for the Cartesian Grid

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_ringPosNoSplit()[source]
test_ringPosSplit()[source]
test_symmetry()[source]