From d590aa7ad745e862d4a372f072d3d48ec48613e3 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Thu, 8 Sep 2022 13:01:42 -0500 Subject: [PATCH] Remove RELAX NG schema and openmc-validate-xml script --- CMakeLists.txt | 1 - docs/source/devguide/user-input.rst | 11 - docs/source/usersguide/basics.rst | 5 +- docs/source/usersguide/install.rst | 29 +- docs/source/usersguide/scripts.rst | 28 - schemas.xml | 9 - scripts/openmc-validate-xml | 102 --- src/relaxng/cross_sections.rnc | 12 - src/relaxng/cross_sections.rng | 42 -- src/relaxng/geometry.rnc | 55 -- src/relaxng/geometry.rng | 447 -------------- src/relaxng/materials.rnc | 41 -- src/relaxng/materials.rng | 165 ----- src/relaxng/mg_cross_sections.rnc | 61 -- src/relaxng/mg_cross_sections.rng | 314 ---------- src/relaxng/plots.rnc | 41 -- src/relaxng/plots.rng | 293 --------- src/relaxng/readme.rst | 19 - src/relaxng/settings.rnc | 204 ------ src/relaxng/settings.rng | 921 ---------------------------- src/relaxng/tallies.rnc | 114 ---- src/relaxng/tallies.rng | 480 --------------- 22 files changed, 2 insertions(+), 3392 deletions(-) delete mode 100644 schemas.xml delete mode 100755 scripts/openmc-validate-xml delete mode 100644 src/relaxng/cross_sections.rnc delete mode 100644 src/relaxng/cross_sections.rng delete mode 100644 src/relaxng/geometry.rnc delete mode 100644 src/relaxng/geometry.rng delete mode 100644 src/relaxng/materials.rnc delete mode 100644 src/relaxng/materials.rng delete mode 100644 src/relaxng/mg_cross_sections.rnc delete mode 100644 src/relaxng/mg_cross_sections.rng delete mode 100644 src/relaxng/plots.rnc delete mode 100644 src/relaxng/plots.rng delete mode 100644 src/relaxng/readme.rst delete mode 100644 src/relaxng/settings.rnc delete mode 100644 src/relaxng/settings.rng delete mode 100644 src/relaxng/tallies.rnc delete mode 100644 src/relaxng/tallies.rng diff --git a/CMakeLists.txt b/CMakeLists.txt index 9954803724..521b46cfc6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -525,7 +525,6 @@ install(EXPORT openmc-targets NAMESPACE OpenMC:: DESTINATION ${INSTALL_CONFIGDIR}) -install(DIRECTORY src/relaxng DESTINATION ${CMAKE_INSTALL_DATADIR}/openmc) install(FILES "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/OpenMCConfig.cmake" "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/OpenMCConfigVersion.cmake" diff --git a/docs/source/devguide/user-input.rst b/docs/source/devguide/user-input.rst index 0bde0fb058..a26f98b197 100644 --- a/docs/source/devguide/user-input.rst +++ b/docs/source/devguide/user-input.rst @@ -49,14 +49,6 @@ following steps should be followed to make changes to user input: written out to the statepoint or summary files and that the :class:`openmc.StatePoint` and :class:`openmc.Summary` classes read them in. -7. Finally, a set of `RELAX NG`_ schemas exists that enables validation of input - files. You should modify the RELAX NG schema for the file you changed. The - easiest way to do this is to change the `compact syntax`_ file - (e.g. ``src/relaxng/geometry.rnc``) and then convert it to regular XML syntax - using trang_:: - - trang geometry.rnc geometry.rng - For most user input additions and changes, it is simple enough to follow a "monkey see, monkey do" approach. When in doubt, contact your nearest OpenMC developer or send a message to the `developers mailing list`_. @@ -65,7 +57,4 @@ developer or send a message to the `developers mailing list`_. .. _property attribute: https://docs.python.org/3.6/library/functions.html#property .. _XML Schema Part 2: http://www.w3.org/TR/xmlschema-2/ .. _boolean: http://www.w3.org/TR/xmlschema-2/#boolean -.. _RELAX NG: https://relaxng.org/ -.. _compact syntax: https://relaxng.org/compact-tutorial-20030326.html -.. _trang: https://relaxng.org/jclark/trang.html .. _developers mailing list: https://groups.google.com/forum/?fromgroups=#!forum/openmc-dev diff --git a/docs/source/usersguide/basics.rst b/docs/source/usersguide/basics.rst index 250255f45a..3394c17a63 100644 --- a/docs/source/usersguide/basics.rst +++ b/docs/source/usersguide/basics.rst @@ -75,10 +75,7 @@ person. The nested tags *firstname*, *lastname*, *age*, and *occupation* indicate characteristics about the person being described. In much the same way, OpenMC input uses XML tags to describe the geometry, the -materials, and settings for a Monte Carlo simulation. Note that because the XML -files have a well-defined structure, they can be validated using the -:ref:`scripts_validate` script or using :ref:`Emacs nXML mode -`. +materials, and settings for a Monte Carlo simulation. Creating Input Files -------------------- diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index 3d48828fb2..b579588147 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -545,8 +545,7 @@ distributions. Uncertainties are used for decay data in the :mod:`openmc.data` module. `lxml `_ - lxml is used for the :ref:`scripts_validate` script and various other - parts of the Python API. + lxml is used for various parts of the Python API. .. admonition:: Optional :class: note @@ -590,31 +589,5 @@ wrapper is used when installing h5py: CC= HDF5_MPI=ON HDF5_DIR= pip install --no-binary=h5py h5py -.. _usersguide_nxml: - ------------------------------------------------------ -Configuring Input Validation with GNU Emacs nXML mode ------------------------------------------------------ - -The `GNU Emacs`_ text editor has a built-in mode that extends functionality for -editing XML files. One of the features in nXML mode is the ability to perform -real-time `validation`_ of XML files against a `RELAX NG`_ schema. The OpenMC -source contains RELAX NG schemas for each type of user input file. In order for -nXML mode to know about these schemas, you need to tell emacs where to find a -"locating files" description. Adding the following lines to your ``~/.emacs`` -file will enable real-time validation of XML input files: - -.. code-block:: common-lisp - - (require 'rng-loc) - (add-to-list 'rng-schema-locating-files "~/openmc/schemas.xml") - -Make sure to replace the last string on the second line with the path to the -schemas.xml file in your own OpenMC source directory. - -.. _GNU Emacs: http://www.gnu.org/software/emacs/ -.. _validation: https://en.wikipedia.org/wiki/XML_validation -.. _RELAX NG: https://relaxng.org/ -.. _ctest: https://cmake.org/cmake/help/latest/manual/ctest.1.html .. _Conda: https://conda.io/en/latest/ .. _pip: https://pip.pypa.io/en/stable/ diff --git a/docs/source/usersguide/scripts.rst b/docs/source/usersguide/scripts.rst index f2ba816052..c433ffe2c3 100644 --- a/docs/source/usersguide/scripts.rst +++ b/docs/source/usersguide/scripts.rst @@ -171,34 +171,6 @@ the latest HDF5-based format. -i IN, --input IN Input XML file -o OUT, --output OUT Output file in HDF5 format -.. _scripts_validate: - ------------------------ -``openmc-validate-xml`` ------------------------ - -Input files can be checked before executing OpenMC using the -``openmc-validate-xml`` script which is installed alongside the Python API. Two -command line arguments can be set when running ``openmc-validate-xml``: - --i, --input-path Location of OpenMC input files. --r, --relaxng-path Location of OpenMC RelaxNG files - -If the RelaxNG path is not set, the script will search for these files because -it expects that the user is either running the script located in the install -directory ``bin`` folder or in ``src/utils``. Once executed, it will match -OpenMC XML files with their RelaxNG schema and check if they are valid. Below -is a table of the messages that will be printed after each file is checked. - -======================== =================================== -Message Description -======================== =================================== -[XML ERROR] Cannot parse XML file. -[NO RELAXNG FOUND] No RelaxNG file found for XML file. -[NOT VALID] XML file does not match RelaxNG. -[VALID] XML file matches RelaxNG. -======================== =================================== - .. _scripts_voxel: --------------------------- diff --git a/schemas.xml b/schemas.xml deleted file mode 100644 index 3e586ec6ac..0000000000 --- a/schemas.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/scripts/openmc-validate-xml b/scripts/openmc-validate-xml deleted file mode 100755 index e3aeb1039b..0000000000 --- a/scripts/openmc-validate-xml +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env python3 - -import os -import sys -import glob -import lxml.etree as etree -from optparse import OptionParser - -def validate_xml(inputs, relaxng): - - # Colored output - if sys.stdout.isatty(): - OK = '\033[92m' - FAIL = '\033[91m' - NOT_FOUND = '\033[93m' - ENDC = '\033[0m' - BOLD = '\033[1m' - else: - OK = '' - FAIL = '' - ENDC = '' - BOLD = '' - NOT_FOUND = '' - - # Get absolute paths - if relaxng is not None: - relaxng_path = os.path.abspath(relaxng) - if inputs is not None: - inputs_path = os.path.abspath(inputs) - - # Search for relaxng path if not set - if relaxng is None: - xml_validate_path = os.path.abspath(os.path.dirname(sys.argv[0])) - if "bin" in xml_validate_path: - relaxng_path = os.path.join(xml_validate_path, "..", "share", "relaxng") - elif os.path.join("src", "utils") in xml_validate_path: - relaxng_path = os.path.join(xml_validate_path, "..", "relaxng") - else: - raise Exception("Set RelaxNG path with -r command line option.") - if not os.path.exists(relaxng_path): - raise Exception(f"RelaxNG path: {relaxng_path} does not exist, set " - "with -r command line option.") - - # Make sure there are .rng files in RelaxNG path - rng_files = glob.glob(os.path.join(relaxng_path, "*.rng")) - if len(rng_files) == 0: - raise Exception(f"No .rng files found in RelaxNG path: {relaxng_path}.") - - # Get list of xml input files - xml_files = glob.glob(os.path.join(inputs_path, "*.xml")) - if len(xml_files) == 0: - raise Exception(f"No .xml files found at input path: {inputs_path}.") - - # Begin loop around input files - for xml_file in xml_files: - - text = f"Validating {os.path.basename(xml_file)}" - print(text + '.'*(30 - len(text)), end="") - - # Validate the XML file - try: - xml_tree = etree.parse(xml_file) - except etree.XMLSyntaxError as e: - print(BOLD + FAIL + '[XML ERROR]' + ENDC) - print(f" {e}") - continue - - # Get xml_filename prefix - xml_prefix = os.path.basename(xml_file) - xml_prefix = xml_prefix.split(".")[0] - - # Search for rng file - rng_file = os.path.join(relaxng_path, xml_prefix + ".rng") - if rng_file in rng_files: - - # read in RelaxNG - relaxng_doc = etree.parse(rng_file) - relaxng = etree.RelaxNG(relaxng_doc) - - # validate xml file again RelaxNG - try: - relaxng.assertValid(xml_tree) - print(BOLD + OK + '[VALID]' + ENDC) - except (etree.DocumentInvalid, TypeError) as e: - print(BOLD + FAIL + '[NOT VALID]' + ENDC) - print(f" {e}") - - # RNG file does not exist - else: - print(BOLD + NOT_FOUND + '[NO RELAXNG FOUND]' + ENDC) - - -if __name__ == "__main__": - # Command line parsing - parser = OptionParser() - parser.add_option('-r', '--relaxng-path', dest='relaxng', - help="Path to RelaxNG files.") - parser.add_option('-i', '--input-path', dest='inputs', default=os.getcwd(), - help="Path to OpenMC input files." ) - (options, args) = parser.parse_args() - - validate_xml(inputs=options.inputs, relaxng=options.relaxng) diff --git a/src/relaxng/cross_sections.rnc b/src/relaxng/cross_sections.rnc deleted file mode 100644 index 7fbc610a28..0000000000 --- a/src/relaxng/cross_sections.rnc +++ /dev/null @@ -1,12 +0,0 @@ -element cross_sections { - element library { - (element materials { xsd:string } | - attribute materials { xsd:string }) & - (element type { xsd:string } | - attribute type { xsd:string }) & - (element path { xsd:string } | - attribute path { xsd:string }) - }* & - - element directory { xsd:string { maxLength = "255" } }? -} \ No newline at end of file diff --git a/src/relaxng/cross_sections.rng b/src/relaxng/cross_sections.rng deleted file mode 100644 index 435f7fa843..0000000000 --- a/src/relaxng/cross_sections.rng +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 255 - - - - - diff --git a/src/relaxng/geometry.rnc b/src/relaxng/geometry.rnc deleted file mode 100644 index e3c88c445c..0000000000 --- a/src/relaxng/geometry.rnc +++ /dev/null @@ -1,55 +0,0 @@ -element geometry { - element cell { - (element id { xsd:int } | attribute id { xsd:int }) & - (element name { xsd:string { maxLength="52" } } | - attribute name { xsd:string { maxLength="52" } })? & - (element universe { xsd:int } | attribute universe { xsd:int })? & - ( - (element fill { xsd:int } | attribute fill { xsd:int }) | - (element material { list { ( xsd:int | "void" )+ } } | - attribute material { list { ( xsd:int | "void" )+ } }) - ) & - (element temperature { list { xsd:double+ } } | - attribute temperature { list { xsd:double+ } } )? & - (element region { xsd:string } | attribute region { xsd:string })? & - (element rotation { list { xsd:double+ } } | attribute rotation { list { xsd:double+ } })? & - (element translation { list { xsd:double+ } } | attribute translation { list { xsd:double+ } })? - }* - - & element surface { - (element id { xsd:int } | attribute id { xsd:int }) & - (element name { xsd:string { maxLength="52" } } | - attribute name { xsd:string { maxLength="52" } })? & - (element type { xsd:string { maxLength = "15" } } | - attribute type { xsd:string { maxLength = "15" } }) & - (element coeffs { list { xsd:double+ } } | attribute coeffs { list { xsd:double+ } }) & - (element boundary { ( "transmit" | "reflective" | "vacuum" | "periodic" ) } | - attribute boundary { ( "transmit" | "reflective" | "vacuum" | "periodic" ) })? & - (element periodic_surface_id { xsd:int } | attribute periodic_surface_id { xsd:int })? - }* - - & element lattice { - (element id { xsd:int } | attribute id { xsd:int }) & - (element name { xsd:string { maxLength="52" } } | - attribute name { xsd:string { maxLength="52" } })? & - (element dimension { list { xsd:positiveInteger+ } } | - 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 universes { list { xsd:int+ } } | attribute universes { list { xsd:int+ } }) & - (element outer { xsd:int } | attribute outer { xsd:int })? - }* - - & element hex_lattice { - (element id { xsd:int } | attribute id { xsd:int }) & - (element name { xsd:string { maxLength="52" } } | - attribute name { xsd:string { maxLength="52" } })? & - (element n_rings { xsd:int } | attribute n_rings { xsd:int }) & - (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 deleted file mode 100644 index 56bf385807..0000000000 --- a/src/relaxng/geometry.rng +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - - - - - - - - - - - - - 52 - - - - - 52 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void - - - - - - - - - - void - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 52 - - - - - 52 - - - - - - - - 15 - - - - - 15 - - - - - - - - - - - - - - - - - - - - - - - - transmit - reflective - vacuum - periodic - - - - - transmit - reflective - vacuum - periodic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 52 - - - - - 52 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 52 - - - - - 52 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - x - y - - - - - x - y - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/relaxng/materials.rnc b/src/relaxng/materials.rnc deleted file mode 100644 index c82ecfeaac..0000000000 --- a/src/relaxng/materials.rnc +++ /dev/null @@ -1,41 +0,0 @@ -element materials { - element material { - (element id { xsd:int } | attribute id { xsd:int }) & - - (element name { xsd:string } | attribute name { xsd:string })? & - - (element depletable { xsd:boolean } | attribute depletable { xsd:boolean })? & - - (element volume { xsd:double } | attribute volume { xsd:double })? & - - (element temperature { xsd:double } | attribute temperature { xsd:double })? & - - element density { - (element value { xsd:double } | attribute value { xsd:double })? & - (element units { xsd:string { maxLength = "10" } } | - attribute units { xsd:string { maxLength = "10" } }) - } & - - element nuclide { - (element name { xsd:string } | attribute name { xsd:string }) & - ( - (element ao { xsd:double } | attribute ao { xsd:double }) | - (element wo { xsd:double } | attribute wo { xsd:double }) - ) - }* & - - element isotropic { xsd:string }? & - - element macroscopic { - (element name { xsd:string } | - attribute name { xsd:string }) - }* & - - element sab { - (element name { xsd:string } | attribute name { xsd:string }) & - (element fraction { xsd:double } | attribute fraction { xsd:double })? - }* - }+ & - - element cross_sections { xsd:string { maxLength = "255" } }? -} diff --git a/src/relaxng/materials.rng b/src/relaxng/materials.rng deleted file mode 100644 index e99fb7adfe..0000000000 --- a/src/relaxng/materials.rng +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 - - - - - 10 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 255 - - - - - diff --git a/src/relaxng/mg_cross_sections.rnc b/src/relaxng/mg_cross_sections.rnc deleted file mode 100644 index b2aaec4d40..0000000000 --- a/src/relaxng/mg_cross_sections.rnc +++ /dev/null @@ -1,61 +0,0 @@ -element cross_sections { - - element groups { xsd:int } & - - element group_structure { list { xsd:double+ } } & - - element inverse_velocities { list { xsd:double+ } }? & - - element xsdata { - (element name { xsd:string { maxLength = "15" } } | - attribute name { xsd:string { maxLength = "15" } }) & - (element alias { xsd:string { maxLength = "15" } } | - attribute alias { xsd:string { maxLength = "15" } })? & - (element kT { xsd:double } | attribute kT { xsd:double })? & - (element fissionable { ( "true" | "false" ) } | - attribute fissionable { ( "true" | "false" ) }) & - (element representation { ( "isotropic" | "angle" ) } | - attribute representation { ( "isotropic" | "angle" ) })? & - (element num_azimuthal { xsd:positiveInteger } | - attribute num_azimuthal { xsd:positiveInteger })? & - (element num_polar { xsd:positiveInteger } | - attribute num_polar { xsd:positiveInteger })? & - (element scatt_type { ( "legendre" | "histogram" | "tabular" ) } | - attribute scatt_type { ( "legendre" | "histogram" | "tabular" ) })? & - (element order { xsd:positiveInteger } | - attribute order { xsd:positiveInteger }) & - element tabular_legendre { - (element enable { ( "true" | "false" ) } | - attribute enable { ( "true" | "false" ) })? & - (element num_points { xsd:positiveInteger } | - attribute num_points { xsd:positiveInteger })? - }? & - - (element total { list { xsd:double+ } } | - attribute total { list { xsd:double+ } })? & - - (element absorption { list { xsd:double+ } } | - attribute absorption { list { xsd:double+ } }) & - - (element scatter { list { xsd:double+ } } | - attribute scatter { list { xsd:double+ } }) & - - (element fission { list { xsd:double+ } } | - attribute fission { list { xsd:double+ } })? & - - (element fission { list { xsd:double+ } } | - attribute fission { list { xsd:double+ } })? & - - (element k_fission { list { xsd:double+ } } | - attribute k_fission { list { xsd:double+ } })? & - - (element chi { list { xsd:double+ } } | - attribute chi { list { xsd:double+ } })? & - - (element nu_fission { list { xsd:double+ } } | - attribute nu_fission { list { xsd:double+ } })? - - }* - - -} \ No newline at end of file diff --git a/src/relaxng/mg_cross_sections.rng b/src/relaxng/mg_cross_sections.rng deleted file mode 100644 index b293cddbe4..0000000000 --- a/src/relaxng/mg_cross_sections.rng +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 15 - - - - - 15 - - - - - - - - 15 - - - - - 15 - - - - - - - - - - - - - - - - - - true - false - - - - - true - false - - - - - - - - isotropic - angle - - - - - isotropic - angle - - - - - - - - - - - - - - - - - - - - - - - - - - - - - legendre - histogram - tabular - - - - - legendre - histogram - tabular - - - - - - - - - - - - - - - - - - - - true - false - - - - - true - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/relaxng/plots.rnc b/src/relaxng/plots.rnc deleted file mode 100644 index e53cc15f72..0000000000 --- a/src/relaxng/plots.rnc +++ /dev/null @@ -1,41 +0,0 @@ -element plots { - element plot { - (element id { xsd:int } | attribute id { xsd:int })? & - (element filename { xsd:string { maxLength = "50" } } | - attribute filename { xsd:string { maxLength = "50" } })? & - (element type { "slice" | "voxel" } | - attribute type { "slice" | "voxel" })? & - (element color_by { ( "cell" | "material" ) } | - attribute color_by { ( "cell" | "material" ) })? & - (element level { xsd:int } | attribute level { xsd:int })? & - (element origin { list { xsd:double+ } } | - attribute origin { list { xsd:double+ } })? & - (element width { list { xsd:double+ } } | - attribute width { list { xsd:double+ } })? & - (element basis { ( "xy" | "yz" | "xz" ) } | - attribute basis { ( "xy" | "yz" | "xz" ) })? & - (element pixels { list { xsd:int+ } } | - attribute pixels { list { xsd:int+ } })? & - (element background { list { xsd:int+ } } | - attribute background { list { xsd:int+ } })? & - element color { - (element id { xsd:int } | attribute id { xsd:int }) & - (element rgb { list { xsd:int+ } } | - attribute rgb { list { xsd:int+ } }) - }* & - element mask { - (element components { list { xsd:int+ } } | - attribute components { list { xsd:int+ } }) & - (element background { list { xsd:int+ } } | - attribute background { list { xsd:int+ } }) - }* & - element meshlines { - (element meshtype { ( "tally" | "entropy" | "ufs" | "cmfd" ) } | - attribute meshtype { ( "tally" | "entropy" | "ufs" | "cmfd" ) }) & - (element id { xsd:int } | attribute id { xsd:int })? & - (element linewidth { xsd:int } | attribute linewidth { xsd:int }) & - (element color { list { xsd:int+ } } | - attribute color { list { xsd:int+ } })? - }* - }* -} diff --git a/src/relaxng/plots.rng b/src/relaxng/plots.rng deleted file mode 100644 index 55d69008ee..0000000000 --- a/src/relaxng/plots.rng +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - - - - - - - - - - - - - - - 50 - - - - - 50 - - - - - - - - - slice - voxel - - - - - slice - voxel - - - - - - - - - cell - material - - - - - cell - material - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - xy - yz - xz - - - - - xy - yz - xz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tally - entropy - ufs - cmfd - - - - - tally - entropy - ufs - cmfd - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/relaxng/readme.rst b/src/relaxng/readme.rst deleted file mode 100644 index 9660e3f8ce..0000000000 --- a/src/relaxng/readme.rst +++ /dev/null @@ -1,19 +0,0 @@ -===================== -Editing RelaxNG files -===================== - -All direct edits to RelaxNG files should be in the .rnc files. The program -TRANG_ should be used to generate a correcsponding .rng file. For Ubuntu, you -can install with: - -.. code-block:: bash - - sudo apt-get install trang - -To convert the .rnc file to .rng, use the following syntax: - -.. code-block:: bash - - trang {filename}.rnc {filename}.rng - -.. _TRANG: http://www.thaiopensource.com/relaxng/trang.html diff --git a/src/relaxng/settings.rnc b/src/relaxng/settings.rnc deleted file mode 100644 index f9877a3f98..0000000000 --- a/src/relaxng/settings.rnc +++ /dev/null @@ -1,204 +0,0 @@ -element settings { - element batches { xsd:positiveInteger }? & - - element confidence_intervals { xsd:boolean }? & - - element create_fission_neutrons { xsd:boolean }? & - - element cutoff { - (element weight { xsd:double } | attribute weight { xsd:double })? & - (element weight_avg { xsd:double } | attribute weight_avg { xsd:double })? & - (element energy_neutron { xsd:double } | attribute energy_neutron { xsd:double })? & - (element energy_photon { xsd:double } | attribute energy_photon { xsd:double })? & - (element energy_electron { xsd:double } | attribute energy_electron { xsd:double })? & - (element energy_positron { xsd:double } | attribute energy_positron { xsd:double })? - }? & - - element delayed_photon_scaling { xsd:boolean }? & - - element electron_treatment { ( "led" | "ttb" ) }? & - - element energy_grid { ( "nuclide" | "log" | "logarithm" | "logarithmic" | "material-union" | "union" ) }? & - - element energy_mode { ( "continuous-energy" | "ce" | "CE" | "multi-group" | "mg" | "MG" ) }? & - - element entropy_mesh { xsd:positiveInteger }? & - - element event_based { xsd:boolean }? & - - element generations_per_batch { xsd:positiveInteger }? & - - element inactive { xsd:nonNegativeInteger }? & - - element keff_trigger { - (element type { xsd:string } | attribute type { xsd:string }) & - (element threshold { xsd:double} | attribute threshold { xsd:double }) - }? & - - element log_grid_bins { xsd:positiveInteger }? & - - element material_cell_offsets { xsd:boolean }? & - - element max_particles_in_flight { xsd:positiveInteger }? & - - element max_order { xsd:nonNegativeInteger }? & - - 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 no_reduce { xsd:boolean }? & - - element output { - (element summary { xsd:boolean } | attribute summary { xsd:boolean })? & - (element tallies { xsd:boolean } | attribute tallies { xsd:boolean })? & - (element path { xsd:string } | attribute path { xsd:string })? - }? & - - element particles { xsd:positiveInteger }? & - - element photon_transport { xsd:boolean }? & - - element ptables { xsd:boolean }? & - - element dagmc { xsd:boolean }? & - - element run_mode { xsd:string }? & - - element seed { xsd:positiveInteger }? & - - element source { - grammar { - start = - (element particle { xsd:string } | attribute particle { xsd:string })? & - (element strength { xsd:double } | attribute strength { xsd:double })? & - (element file { xsd:string } | attribute file { xsd:string })? & - element space { - (element type { xsd:string } | attribute type { xsd:string }) & - (element parameters { list { xsd:double+ } } | - attribute parameters { list { xsd:double+ } })? & - element x { distribution }? & - element y { distribution }? & - element z { distribution }? & - element r { distribution }? & - element theta { distribution }? & - element phi { distribution }? & - element origin { list { xsd:double, xsd:double, xsd:double } }? - }? & - element angle { - (element type { xsd:string } | attribute type { xsd:string }) & - (element reference_uvw { list { xsd:double, xsd:double, xsd:double } } | - attribute reference_uvw { list { xsd:double, xsd:double, xsd:double } })? & - element mu { distribution }? & - element phi { distribution }? - }? & - element energy { distribution }? - distribution = - (element type { xsd:string { maxLength = "16" } } | - attribute type { xsd:string { maxLength = "16" } }) & - (element interpolation { xsd:string } | - attribute interpolation { xsd:string })? & - (element parameters { list { xsd:double+ } } | - attribute parameters { list { xsd:double+ } })? - } - }* & - - element state_point { - ( - (element batches { list { xsd:positiveInteger+ } } | - attribute batches { list { xsd:positiveInteger+ } }) | - (element interval { xsd:positiveInteger } | - attribute interval { xsd:positiveInteger }) - ) - }? & - - element source_point { - ( - (element batches { list { xsd:positiveInteger+ } } | - attribute batches { list { xsd:positiveInteger+ } }) | - (element interval { xsd:positiveInteger } | - attribute interval { xsd:positiveInteger }) - )? & - (element separate { xsd:boolean } | - attribute separate { xsd:boolean })? & - (element write { xsd:boolean } | - attribute write { xsd:boolean })? & - (element overwrite_latest { xsd:boolean} | - attribute overwrite_latest {xsd:boolean})? - }? & - - element surf_source_read { - (element path { xsd:string } | attribute path { xsd:string }) - }? & - - element surf_source_write { - (element surface_ids { list { xsd:positiveInteger+ } } | - attribute surface_ids { list { xsd:positiveInteger+ } }) & - (element max_particles { xsd:positiveInteger } | - attribute max_particles { xsd:positiveInteger }) - }? & - - element survival_biasing { xsd:boolean }? & - - element temperature_default { xsd:double }? & - - element temperature_method { xsd:string }? & - - element temperature_multipole { xsd:boolean }? & - - element temperature_range { list { xsd:double, xsd:double } }? & - - element temperature_tolerance { xsd:double }? & - - element threads { xsd:positiveInteger }? & - - element trace { list { xsd:positiveInteger+ } }? & - - element track { list { xsd:positiveInteger+ } }? & - - element trigger { - (element active { xsd:boolean } | attribute active { xsd:boolean }) & - (element max_batches { xsd:positiveInteger } | attribute max_batches { xsd:positiveInteger }) & - (element batch_interval { xsd:positiveInteger } | attribute batch_interval { xsd:positiveInteger })? - }? & - - element ufs_mesh { xsd:positiveInteger }? & - - element verbosity { xsd:positiveInteger }? & - - element volume_calc { - (element domain_type { xsd:string } | - attribute domain_type { xsd:string }) & - (element domain_ids { list { xsd:integer+ } } | - attribute domain_ids { list { xsd:integer+ } }) & - (element samples { xsd:positiveInteger } | - attribute samples { 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 write_initial_source { xsd:boolean }? & - - element resonance_scattering { - (element enable { xsd:boolean } | attribute enable { xsd:boolean })? & - (element method { xsd:string } | attribute method { xsd:string })? & - (element energy_min { xsd:double } | attribute energy_min { xsd:double })? & - (element energy_max { xsd:double } | attribute energy_max { xsd:double })? & - (element nuclides { list { xsd:string+ } } | - attribute nuclides { list { xsd:string+ } })? - }? -} diff --git a/src/relaxng/settings.rng b/src/relaxng/settings.rng deleted file mode 100644 index 07b8a6d1d7..0000000000 --- a/src/relaxng/settings.rng +++ /dev/null @@ -1,921 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - led - ttb - - - - - - - nuclide - log - logarithm - logarithmic - material-union - union - - - - - - - continuous-energy - ce - CE - multi-group - mg - MG - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - regular - - - regular - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 16 - - - - - 16 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/relaxng/tallies.rnc b/src/relaxng/tallies.rnc deleted file mode 100644 index 4e46c45a17..0000000000 --- a/src/relaxng/tallies.rnc +++ /dev/null @@ -1,114 +0,0 @@ -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 { ( "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+ } }) - ) | ( - (element type { ( "cylindrical" ) } | - attribute type { ( "cylindrical" ) }) & - (element r_grid { list { xsd:double+ } } | - attribute r_grid { list { xsd:double+ } }) & - (element phi_grid { list { xsd:double+ } } | - attribute phi_grid { list { xsd:double+ } }) & - (element z_grid { list { xsd:double+ } } | - attribute z_grid { list { xsd:double+ } }) - ) | ( - (element type { ( "spherical" ) } | - attribute type { ( "spherical" ) }) & - (element r_grid { list { xsd:double+ } } | - attribute r_grid { list { xsd:double+ } }) & - (element theta_grid { list { xsd:double+ } } | - attribute theta_grid { list { xsd:double+ } }) & - (element phi_grid { list { xsd:double+ } } | - attribute phi_grid { list { xsd:double+ } }) - ) - ) - }* & - - element derivative { - (element id { xsd:int } | attribute id { xsd:int }) & - (element material { xsd:int } | attribute material { xsd:int }) & - ( (element variable { ( "density") } - | attribute variable { ( "density" ) } ) | - ( - (element variable { ( "nuclide_density" ) } - | attribute variable { ( "nuclide_density" ) } ) - & - (element nuclide { xsd:string { maxLength = "12" } } - | attribute nuclide { xsd:string { maxLength = "12" } } ) - ) | - (element variable { ( "temperature") } - | attribute variable { ( "temperature" ) } ) - ) - }* & - - element filter { - (element id { xsd:int } | attribute id { xsd:int }) & - ( - ( (element type { ( "cell" | "cellfrom" | "cellborn" | "material" | - "universe" | "surface" | "distribcell" | "mesh" | "energy" | - "energyout" | "mu" | "polar" | "azimuthal" | "delayedgroup" | - "energyfunction" | "meshsurface" | "cellinstance") } | - attribute type { ( "cell" | "cellfrom" | "cellborn" | "material" | - "universe" | "surface" | "distribcell" | "mesh" | "energy" | - "energyout" | "mu" | "polar" | "azimuthal" | "delayedgroup" | - "energyfunction" | "meshsurface" | "cellinstance") }) & - (element bins { list { xsd:double+ } } | - attribute bins { list { xsd:double+ } }) - ) | - ( - (element type { ("energyfunction") } | - attribute type { ("energyfunction") }) & - (element energy { list { xsd:double+ } } | - attribute energy { list { xsd:double+ } }) & - (element y { list { xsd:double+ } } | - attribute y { list { xsd:double+ } }) - ) - ) - }* & - - element tally { - (element id { xsd:int } | attribute id { xsd:int }) & - (element name { xsd:string { maxLength="52" } } | - attribute name { xsd:string { maxLength="52" } })? & - (element estimator { ( "analog" | "tracklength" | "collision" ) } | - attribute estimator { ( "analog" | "tracklength" | "collision" ) })? & - (element filters { list { xsd:int+ } } | - attribute filters { list { xsd:int+ } })? & - element nuclides { - list { xsd:string { maxLength = "12" }+ } - }? & - element scores { - list { xsd:string { maxLength = "20" }+ } - } & - element trigger { - (element type { xsd:string } | attribute type { xsd:string }) & - (element threshold { xsd:double} | attribute threshold { xsd:double }) & - (element scores { list { xsd:string { maxLength = "20" }+ } } | attribute scores { list { xsd:string { maxLength = "20"}+ } } )? - }* & - (element derivative { xsd:int } | attribute derivative { xsd:int } )? - }* & - - element assume_separate { xsd:boolean }? -} diff --git a/src/relaxng/tallies.rng b/src/relaxng/tallies.rng deleted file mode 100644 index 350c3cb4aa..0000000000 --- a/src/relaxng/tallies.rng +++ /dev/null @@ -1,480 +0,0 @@ - - - - - - - - - - - - - - - - - - - regular - - - regular - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - rectilinear - - - rectilinear - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - density - - - density - - - - - - nuclide_density - - - nuclide_density - - - - - - 12 - - - - - 12 - - - - - - - temperature - - - temperature - - - - - - - - - - - - - - - - - - - - - - - cell - cellfrom - cellborn - material - universe - surface - distribcell - mesh - energy - energyout - mu - polar - azimuthal - delayedgroup - energyfunction - meshsurface - cellinstance - - - - - cell - cellfrom - cellborn - material - universe - surface - distribcell - mesh - energy - energyout - mu - polar - azimuthal - delayedgroup - energyfunction - meshsurface - cellinstance - - - - - - - - - - - - - - - - - - - - - - - - energyfunction - - - energyfunction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 52 - - - - - 52 - - - - - - - - - analog - tracklength - collision - - - - - analog - tracklength - collision - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12 - - - - - - - - - - 20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - - - - - - - - - 20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -