You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.
defcreate_material(material_tag: str, material_entry):
ifisinstance(material_entry, str):
openmc_material=nmm.Material.from_library(
name=material_entry, material_id=None
).openmc_materialelifisinstance(material_entry, openmc.Material):
# sets the material name in the event that it had not been setopenmc_material=material_entryelifisinstance(material_entry, (nmm.Material)):
# sets the material tag in the event that it had not been setopenmc_material=material_entry.openmc_materialelse:
raiseTypeError(
"materials must be either a str, \ openmc.Material, nmm.MultiMaterial or nmm.Material object \ not a ",
type(material_entry),
material_entry,
)
openmc_material.name=material_tagreturnopenmc_material
I find it more intuitive if it's just
defcreate_material(material_entry):
ifisinstance(material_entry, str):
openmc_material=nmm.Material.from_library(
name=material_entry, material_id=None
).openmc_materialelifisinstance(material_entry, openmc.Material):
# sets the material name in the event that it had not been setopenmc_material=material_entryelifisinstance(material_entry, (nmm.Material)):
# sets the material tag in the event that it had not been setopenmc_material=material_entry.openmc_materialelse:
raiseTypeError(
"materials must be either a str, \ openmc.Material, nmm.MultiMaterial or nmm.Material object \ not a ",
type(material_entry),
material_entry,
)
returnopenmc_material
and the name of the material is assigned in odw.Materials.set_openmc_materials
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I find it more intuitive if it's just
and the name of the material is assigned in
odw.Materials.set_openmc_materials
The text was updated successfully, but these errors were encountered: