Skip to content

Commit

Permalink
Added serpent xsdir library check
Browse files Browse the repository at this point in the history
  • Loading branch information
sbradnam committed Feb 21, 2024
1 parent 0b0b62b commit 0b376f8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions jade/libmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,21 @@ def __init__(
self.data[code][library] = xsdir
else:
logging.warning(
"Library %s not present in XSDIR file: %s", library, path
"Library %s not present in MCNP XSDIR file: %s", library, path
)

elif code == "openmc":
self.data[code][library] = OpenMCXsdir(path, self, library)

elif code == "serpent":
self.data[code][library] = SerpentXsdir(path)
xsdir = SerpentXsdir(path)
available_libs = set(np.array(xsdir.tablenames)[:, 1])
if library in available_libs:
self.data[code][library] = xsdir
else:
logging.warning(
"Library %s not present in Serpent XSDIR file: %s", library, path
)

elif code == "d1s":
xsdir = Xsdir(path)
Expand All @@ -190,7 +197,7 @@ def __init__(
self.data[code][library] = xsdir
else:
logging.warning(
"Library %s not present in XSDIR file: %s", library, path
"Library %s not present in D1S XSDIR file: %s", library, path
)

else:
Expand Down

0 comments on commit 0b376f8

Please sign in to comment.