Update documentation for hex lattice

This commit is contained in:
Paul Romano 2019-06-04 14:42:57 -05:00
parent a465dcdb16
commit 3794c3eec4
2 changed files with 12 additions and 1 deletions

View file

@ -318,6 +318,13 @@ the following attributes or sub-elements:
*Default*: None
:orientation:
The orientation of the hexagonal lattice. The string "x" indicates that two
sides of the lattice are perpendicular to the x-axis, whereas the string "y"
indicates that two sides are perpendicular to the y-axis.
*Default*: "y"
:center:
The coordinates of the center of the lattice. If the lattice does not have
axial sections then only the x- and y-coordinates are specified.

View file

@ -884,6 +884,10 @@ class HexLattice(Lattice):
:attr:`HexLattice.universes` property, the array indices do not correspond
to natural indices.
.. versionchanged:: 0.11
The orientation of the lattice can now be changed with the
:attr:`orientation` attribute.
Parameters
----------
lattice_id : int, optional
@ -1295,7 +1299,7 @@ class HexLattice(Lattice):
self._outer.create_xml_subelement(xml_element)
lattice_subelement.set("n_rings", str(self._num_rings))
# If orientation is "OX" export it to XML
# If orientation is "x" export it to XML
if self._orientation == 'x':
lattice_subelement.set("orientation", "x")