diff --git a/docs/source/io_formats/tallies.rst b/docs/source/io_formats/tallies.rst index 23a0201ca..0e1cd16f4 100644 --- a/docs/source/io_formats/tallies.rst +++ b/docs/source/io_formats/tallies.rst @@ -312,21 +312,30 @@ a separate element with the tag name ````. This element has the following attributes/sub-elements: :type: - The type of structured mesh. The only valid option is "regular". + The type of structured mesh. This can be either "regular" or "rectilinear". :dimension: - The number of mesh cells in each direction. + The number of mesh cells in each direction. (For regular mesh only.) :lower_left: The lower-left corner of the structured mesh. If only two coordinates are - given, it is assumed that the mesh is an x-y mesh. + given, it is assumed that the mesh is an x-y mesh. (For regular mesh only.) :upper_right: The upper-right corner of the structured mesh. If only two coordinates are - given, it is assumed that the mesh is an x-y mesh. + given, it is assumed that the mesh is an x-y mesh. (For regular mesh only.) :width: - The width of mesh cells in each direction. + The width of mesh cells in each direction. (For regular mesh only.) + + :x_grid: + The mesh divisions along the x-axis. (For rectilinear mesh only.) + + :y_grid: + The mesh divisions along the y-axis. (For rectilinear mesh only.) + + :z_grid: + The mesh divisions along the z-axis. (For rectilinear mesh only.) .. note:: One of ```` or ```` must be specified, but not both diff --git a/docs/source/pythonapi/base.rst b/docs/source/pythonapi/base.rst index 8cf65a997..0a6fbbbc0 100644 --- a/docs/source/pythonapi/base.rst +++ b/docs/source/pythonapi/base.rst @@ -125,6 +125,7 @@ Constructing Tallies openmc.ZernikeRadialFilter openmc.ParticleFilter openmc.Mesh + openmc.RectilinearMesh openmc.Trigger openmc.TallyDerivative openmc.Tally diff --git a/src/relaxng/tallies.rnc b/src/relaxng/tallies.rnc index 204284c48..ec511481f 100644 --- a/src/relaxng/tallies.rnc +++ b/src/relaxng/tallies.rnc @@ -1,17 +1,30 @@ element tallies { element mesh { (element id { xsd:int } | attribute id { xsd:int }) & - (element type { ( "regular" ) } | - attribute type { ( "regular" ) }) & - (element dimension { list { xsd:positiveInteger+ } } | - attribute dimension { list { xsd:positiveInteger+ } }) & - (element lower_left { list { xsd:double+ } } | - attribute lower_left { list { xsd:double+ } }) & ( - (element upper_right { list { xsd:double+ } } | - attribute upper_right { list { xsd:double+ } }) | - (element width { list { xsd:double+ } } | - attribute width { list { xsd:double+ } }) + ( + (element type { ( "regular" ) } | + attribute type { ( "regular" ) }) & + (element dimension { list { xsd:positiveInteger+ } } | + attribute dimension { list { xsd:positiveInteger+ } }) & + (element lower_left { list { xsd:double+ } } | + attribute lower_left { list { xsd:double+ } }) & + ( + (element upper_right { list { xsd:double+ } } | + attribute upper_right { list { xsd:double+ } }) | + (element width { list { xsd:double+ } } | + attribute width { list { xsd:double+ } }) + ) + ) | ( + (element type { ( "rectilinear" ) } | + attribute type { ( "rectilinear" ) }) & + (element x_grid { list { xsd:double+ } } | + attribute x_grid { list { xsd:double+ } }) & + (element y_grid { list { xsd:double+ } } | + attribute y_grid { list { xsd:double+ } }) & + (element z_grid { list { xsd:double+ } } | + attribute z_grid { list { xsd:double+ } }) + ) ) }* & diff --git a/src/relaxng/tallies.rng b/src/relaxng/tallies.rng index 15b6f5b24..98a48eeb8 100644 --- a/src/relaxng/tallies.rng +++ b/src/relaxng/tallies.rng @@ -13,78 +13,140 @@ - - regular - - - regular - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + regular + + + regular + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rectilinear + + + rectilinear + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +