OpenMC/openmc/macroscopic.py
2018-02-05 23:14:30 -05:00

25 lines
477 B
Python

from openmc.checkvalue import check_type
class Macroscopic(str):
"""A Macroscopic object that can be used in a material.
Parameters
----------
name : str
Name of the macroscopic data, e.g. UO2
Attributes
----------
name : str
Name of the nuclide, e.g. UO2
"""
def __new__(cls, name):
check_type('name', name, str)
return super().__new__(cls, name)
@property
def name(self):
return self