From a6c099e29ae5e9c3b1795aeea3dd5030706dcb5d Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 17 Jun 2019 06:24:45 -0500 Subject: [PATCH] A few more fixes pointed out by @smharper --- openmc/lattice.py | 16 ++++++++-------- src/relaxng/geometry.rnc | 2 +- src/relaxng/geometry.rng | 32 ++++++++++++++++---------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/openmc/lattice.py b/openmc/lattice.py index 663d051e3c..4776222da2 100644 --- a/openmc/lattice.py +++ b/openmc/lattice.py @@ -1085,7 +1085,7 @@ class HexLattice(Lattice): # Check the center ring. if len(axial_slice[-1]) != 1: msg = 'HexLattice ID={0:d} has the wrong number of ' \ - 'elements in the innermost ring.Only 1 element is ' \ + 'elements in the innermost ring. Only 1 element is ' \ 'allowed in the innermost ring.'.format(self._id) raise ValueError(msg) @@ -1093,7 +1093,7 @@ class HexLattice(Lattice): for r in range(self._num_rings-1): if len(axial_slice[r]) != 6*(self._num_rings - 1 - r): msg = 'HexLattice ID={0:d} has the wrong number of ' \ - 'elements in ring number{1:d}(counting from the '\ + 'elements in ring number {1:d} (counting from the '\ 'outermost ring). This ring should have {2:d} ' \ 'elements.'.format(self._id, r, 6*(self._num_rings - 1 - r)) @@ -1788,15 +1788,15 @@ class HexLattice(Lattice): setting the :attr:`HexLattice.universes` property. For example,running this method with num_rings=3 will return the similar diagram:: - (0, 4) (0, 3) (0, 2) - - (0, 5) (1, 2) (1, 1) (0, 1) - - (0, 6) (1, 3) (2, 0) (1, 0) (0, 0) + (0, 8) (0, 9) (0,10) (0, 7) (1, 4) (1, 5) (0,11) - (0, 8) (0, 9) (0,10) + (0, 6) (1, 3) (2, 0) (1, 0) (0, 0) + + (0, 5) (1, 2) (1, 1) (0, 1) + + (0, 4) (0, 3) (0, 2) Parameters ---------- diff --git a/src/relaxng/geometry.rnc b/src/relaxng/geometry.rnc index c349340717..e3c88c445c 100644 --- a/src/relaxng/geometry.rnc +++ b/src/relaxng/geometry.rnc @@ -36,7 +36,6 @@ element geometry { attribute dimension { list { xsd:positiveInteger+ } }) & (element lower_left { list { xsd:double+ } } | attribute lower_left { list { xsd:double+ } }) & (element pitch { list { xsd:double+ } } | attribute pitch { list { xsd:double+ } }) & - (element orientation { ( "x" | "y" ) } | attribute orientation { ( "x" | "y" ) })? & (element universes { list { xsd:int+ } } | attribute universes { list { xsd:int+ } }) & (element outer { xsd:int } | attribute outer { xsd:int })? }* @@ -49,6 +48,7 @@ element geometry { (element n_axial { xsd:int } | attribute n_axial { xsd:int })? & (element center { list { xsd:double+ } } | attribute center { list { xsd:double+ } }) & (element pitch { list { xsd:double+ } } | attribute pitch { list { xsd:double+ } }) & + (element orientation { ( "x" | "y" ) } | attribute orientation { ( "x" | "y" ) })? & (element universes { list { xsd:int+ } } | attribute universes { list { xsd:int+ } }) & (element outer { xsd:int } | attribute outer { xsd:int })? }* diff --git a/src/relaxng/geometry.rng b/src/relaxng/geometry.rng index 52b9825be8..56bf385807 100644 --- a/src/relaxng/geometry.rng +++ b/src/relaxng/geometry.rng @@ -294,22 +294,6 @@ - - - - - x - y - - - - - x - y - - - - @@ -414,6 +398,22 @@ + + + + + x + y + + + + + x + y + + + +