Replies: 1 comment
-
|
A poorly documented test. My apologies. I didn't write the first version of it, but I've touched it twice. You can't create a spatial grid if you mix items with multiplicity 1 with items of multiplicity N. From the auto create spatial Friday docstring: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I stumbled on
test_gridNumPinsAndLocationsand it kind of tripped my brain.armi/armi/reactor/tests/test_blocks.py
Lines 2439 to 2464 in 661a11d
It's testing that creating the grid should fail, but it isn't immediately clear from the test why it should fail.
The magic number 168 is the problem. Someone deeply versed in magic hexagon numbers will know that 169 is a tiling number for hexagons: you can fit 169 closely packed circles into a hexagonal lattice and fully fill seven rings.
And the test does fail because 168 actual pins (components with mult == 168) does not match the expected full lattice pins of 169.
And the name of the test implies something with locations but there's nothing really with locations asserted?
If the point of the test is to check
autoCreateSpatialGridsrefuses to make an incomplete hex lattice, I think we should do the following:test_autoGridFailsWithPartialGridor somethingI'm not making the PR now because I'm not sure if there's intended to be more in the test. I'm happy to if my understanding of what the test is supposed to do is correct.
Beta Was this translation helpful? Give feedback.
All reactions