diff --git a/openmc/mesh.py b/openmc/mesh.py index 734d04da42..196d7f6c00 100644 --- a/openmc/mesh.py +++ b/openmc/mesh.py @@ -1940,7 +1940,7 @@ class UnstructuredMesh(MeshBase): return cls(filename, library, mesh_id, '', length_multiplier) -def read_meshes(elem): +def _read_meshes(elem): """Generate dictionary of meshes from a given XML node Parameters @@ -1950,11 +1950,11 @@ def read_meshes(elem): Returns ------- - OrderedDict - An ordered dictionary with mesh IDs as keys and openmc.MeshBase + dict + A dictionary with mesh IDs as keys and openmc.MeshBase instanaces as values """ - out = OrderedDict() + out = dict() for mesh_elem in elem.findall('mesh'): mesh = MeshBase.from_xml_element(mesh_elem) out[mesh.id] = mesh diff --git a/openmc/settings.py b/openmc/settings.py index ff35a90cfb..39329a69ee 100644 --- a/openmc/settings.py +++ b/openmc/settings.py @@ -16,7 +16,7 @@ from openmc.stats.multivariate import MeshSpatial from . import RegularMesh, Source, VolumeCalculation, WeightWindows from ._xml import clean_indentation, get_text, reorder_attributes from openmc.checkvalue import PathLike -from .mesh import MeshBase, read_meshes +from .mesh import _read_meshes class RunMode(Enum): @@ -1762,5 +1762,5 @@ class Settings: """ tree = ET.parse(path) root = tree.getroot() - meshes = read_meshes(root) + meshes = _read_meshes(root) return cls.from_xml_element(root, meshes)