mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Added warnings for features not in a release version of openmc
This commit is contained in:
parent
4ddfc23897
commit
5378a9d8bf
2 changed files with 32 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import warnings
|
||||
|
||||
import openmc
|
||||
from openmc.checkvalue import *
|
||||
from openmc.clean_xml import *
|
||||
|
|
@ -218,6 +220,10 @@ class Material(object):
|
|||
|
||||
def set_otf_mat_file(self, name):
|
||||
|
||||
# TODO: remove this when distributed materials are merged
|
||||
warnings.warn('This feature is not yet implemented in a release ' \
|
||||
'version of openmc')
|
||||
|
||||
if not is_string(name):
|
||||
msg = 'Unable to add OTF material file to Material ID={0} with a ' \
|
||||
'non-string name {1}'.format(self._id, name)
|
||||
|
|
@ -228,6 +234,10 @@ class Material(object):
|
|||
|
||||
def set_as_distrib_comp(self):
|
||||
|
||||
# TODO: remove this when distributed materials are merged
|
||||
warnings.warn('This feature is not yet implemented in a release ' \
|
||||
'version of openmc')
|
||||
|
||||
self._convert_to_distrib_comps = True
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import warnings
|
||||
|
||||
from openmc.checkvalue import *
|
||||
from openmc.clean_xml import *
|
||||
from xml.etree import ElementTree as ET
|
||||
|
|
@ -712,6 +714,10 @@ class SettingsFile(object):
|
|||
|
||||
def set_dd_mesh_dimension(self, dimension):
|
||||
|
||||
# TODO: remove this when domain decomposition is merged
|
||||
warnings.warn('This feature is not yet implemented in a release ' \
|
||||
'version of openmc')
|
||||
|
||||
if not isinstance(dimension, tuple) and \
|
||||
not isinstance(dimension, list):
|
||||
msg = 'Unable to set DD mesh upper right corner to {0} which is ' \
|
||||
|
|
@ -728,6 +734,10 @@ class SettingsFile(object):
|
|||
|
||||
def set_dd_mesh_lower_left(self, lower_left):
|
||||
|
||||
# TODO: remove this when domain decomposition is merged
|
||||
warnings.warn('This feature is not yet implemented in a release ' \
|
||||
'version of openmc')
|
||||
|
||||
if not isinstance(lower_left, (tuple, list, np.ndarray)):
|
||||
msg = 'Unable to set DD mesh lower left corner to {0} which is ' \
|
||||
'not a Python tuple or list'.format(lower_left)
|
||||
|
|
@ -743,6 +753,10 @@ class SettingsFile(object):
|
|||
|
||||
def set_dd_mesh_upper_right(self, upper_right):
|
||||
|
||||
# TODO: remove this when domain decomposition is merged
|
||||
warnings.warn('This feature is not yet implemented in a release ' \
|
||||
'version of openmc')
|
||||
|
||||
if not isinstance(upper_right, tuple) and \
|
||||
not isinstance(upper_right, list):
|
||||
msg = 'Unable to set DD mesh upper right corner to {0} which is ' \
|
||||
|
|
@ -759,6 +773,10 @@ class SettingsFile(object):
|
|||
|
||||
def set_dd_nodemap(self, nodemap):
|
||||
|
||||
# TODO: remove this when domain decomposition is merged
|
||||
warnings.warn('This feature is not yet implemented in a release ' \
|
||||
'version of openmc')
|
||||
|
||||
if not isinstance(nodemap, tuple) and \
|
||||
not isinstance(nodemap, list):
|
||||
msg = 'Unable to set DD nodemap {0} which is ' \
|
||||
|
|
@ -783,6 +801,10 @@ class SettingsFile(object):
|
|||
|
||||
def set_dd_allow_leakage(self, allow):
|
||||
|
||||
# TODO: remove this when domain decomposition is merged
|
||||
warnings.warn('This feature is not yet implemented in a release ' \
|
||||
'version of openmc')
|
||||
|
||||
if not type(allow) == bool:
|
||||
msg = 'Unable to set DD allow_leakage {0} which is ' \
|
||||
'not a Python bool'.format(dimension)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue