Addressing latest comments from @paulromano

This commit is contained in:
Patrick Shriwise 2023-02-13 09:52:17 -06:00
parent 75fe7f00a9
commit 3d548c882f
2 changed files with 6 additions and 6 deletions

View file

@ -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

View file

@ -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)