diff --git a/openmc/_xml.py b/openmc/_xml.py index b4e08c751..450c8a99b 100644 --- a/openmc/_xml.py +++ b/openmc/_xml.py @@ -11,7 +11,7 @@ def clean_indentation(element, level=0, spaces_per_level=2, trailing_indent=True spaces_per_level : int Number of spaces per indentation level (default 2) trailing_indent : bool - Whether or not to include an indentation after closing the element + Whether or not to add indentation after closing the element """ i = "\n" + level*spaces_per_level*" " diff --git a/openmc/model/model.py b/openmc/model/model.py index 9c38d27c3..145a2151b 100644 --- a/openmc/model/model.py +++ b/openmc/model/model.py @@ -469,7 +469,7 @@ class Model: Whether or not to remove redundant surfaces from the geometry when exporting. filename : str - Name of the single XML file to create (only used :math:`separate_xmls` if False) + Name of the single XML file to create (only used :math:`separate_xmls` is False) .. versionadded:: 0.13.1 diff --git a/src/initialize.cpp b/src/initialize.cpp index a6a6b5a77..212b2f7bd 100644 --- a/src/initialize.cpp +++ b/src/initialize.cpp @@ -359,11 +359,7 @@ bool read_model_xml() { fmt::format("No node present in the {} file.", xml_filename)); } - // find materials node this object cannot be used after being passed to the - // cross section reading function below - auto materials_node = root.child("materials"); - read_cross_sections_xml(materials_node); - + read_cross_sections_xml(root.child("materials")); read_materials_xml(root.child("materials")); // Read geometry diff --git a/tests/regression_tests/adj_cell_rotation/__init__.py b/tests/regression_tests/adj_cell_rotation/__init__.py index 7efe44865..e69de29bb 100644 --- a/tests/regression_tests/adj_cell_rotation/__init__.py +++ b/tests/regression_tests/adj_cell_rotation/__init__.py @@ -1,2 +0,0 @@ - -from .test import model \ No newline at end of file diff --git a/tests/regression_tests/energy_laws/__init__.py b/tests/regression_tests/energy_laws/__init__.py index 29fbfcc0c..e69de29bb 100644 --- a/tests/regression_tests/energy_laws/__init__.py +++ b/tests/regression_tests/energy_laws/__init__.py @@ -1 +0,0 @@ -from .test import model \ No newline at end of file diff --git a/tests/regression_tests/lattice_multiple/__init__.py b/tests/regression_tests/lattice_multiple/__init__.py index 29fbfcc0c..e69de29bb 100644 --- a/tests/regression_tests/lattice_multiple/__init__.py +++ b/tests/regression_tests/lattice_multiple/__init__.py @@ -1 +0,0 @@ -from .test import model \ No newline at end of file diff --git a/tests/regression_tests/model_xml/test.py b/tests/regression_tests/model_xml/test.py index 0dc2cc289..52f67f76f 100644 --- a/tests/regression_tests/model_xml/test.py +++ b/tests/regression_tests/model_xml/test.py @@ -9,10 +9,10 @@ from tests.testing_harness import PyAPITestHarness, colorize # use a few models from other tests to make sure the same results are # produced when using a single model.xml file as input -from ..adj_cell_rotation import model as adj_cell_rotation_model -from ..lattice_multiple import model as lattice_mult_model -from ..energy_laws import model as energy_laws_model -from ..photon_production import model as photon_prod_model +from ..adj_cell_rotation.test import model as adj_cell_rotation_model +from ..lattice_multiple.test import model as lattice_mult_model +from ..energy_laws.test import model as energy_laws_model +from ..photon_production.test import model as photon_prod_model class ModelXMLTestHarness(PyAPITestHarness): diff --git a/tests/regression_tests/photon_production/__init__.py b/tests/regression_tests/photon_production/__init__.py index 29fbfcc0c..e69de29bb 100644 --- a/tests/regression_tests/photon_production/__init__.py +++ b/tests/regression_tests/photon_production/__init__.py @@ -1 +0,0 @@ -from .test import model \ No newline at end of file