2016-10-06 21:39:57 -05:00
|
|
|
from openmc.checkvalue import check_type
|
2015-11-14 13:33:05 -05:00
|
|
|
|
|
|
|
|
|
2017-11-29 22:23:47 -06:00
|
|
|
class Macroscopic(str):
|
2016-02-05 05:37:50 -05:00
|
|
|
"""A Macroscopic object that can be used in a material.
|
2015-11-14 13:33:05 -05:00
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
|
name : str
|
|
|
|
|
Name of the macroscopic data, e.g. UO2
|
|
|
|
|
|
|
|
|
|
Attributes
|
|
|
|
|
----------
|
|
|
|
|
name : str
|
|
|
|
|
Name of the nuclide, e.g. UO2
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
2017-11-29 22:23:47 -06:00
|
|
|
def __new__(cls, name):
|
2017-12-24 16:06:05 +07:00
|
|
|
check_type('name', name, str)
|
2017-12-24 16:34:25 +07:00
|
|
|
return super().__new__(cls, name)
|
2015-11-14 13:33:05 -05:00
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
def name(self):
|
2017-11-29 22:23:47 -06:00
|
|
|
return self
|