mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Added count_interactions to dd settings
This commit is contained in:
parent
9decb858e2
commit
908b4ce1f6
1 changed files with 20 additions and 0 deletions
|
|
@ -77,6 +77,7 @@ class SettingsFile(object):
|
|||
self._dd_mesh_upper_right = None
|
||||
self._dd_nodemap = None
|
||||
self._dd_allow_leakage = False
|
||||
self._dd_count_interactions = False
|
||||
|
||||
self._settings_file = ET.Element("settings")
|
||||
self._eigenvalue_element = None
|
||||
|
|
@ -813,6 +814,19 @@ class SettingsFile(object):
|
|||
|
||||
self._dd_allow_leakage = allow
|
||||
|
||||
def set_dd_count_interactions(self, interactions):
|
||||
|
||||
# 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(interactions) == bool:
|
||||
msg = 'Unable to set DD count_interactions {0} which is ' \
|
||||
'not a Python bool'.format(dimension)
|
||||
raise ValueError(msg)
|
||||
|
||||
self._dd_count_interactions = interactions
|
||||
|
||||
def create_eigenvalue_subelement(self):
|
||||
|
||||
self.create_particles_subelement()
|
||||
|
|
@ -1190,6 +1204,12 @@ class SettingsFile(object):
|
|||
else:
|
||||
subelement.text = 'false'
|
||||
|
||||
subelement = ET.SubElement(element, "count_interactions")
|
||||
if self._dd_count_interactions:
|
||||
subelement.text = 'true'
|
||||
else:
|
||||
subelement.text = 'false'
|
||||
|
||||
|
||||
def export_to_xml(self):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue