From d13c95018907eaa0556689d409e76c0277a1f5e1 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 2 Dec 2015 13:52:32 -0600 Subject: [PATCH] Use bounding box feature in a few example inputs --- examples/python/boxes/build-xml.py | 4 +++- examples/python/reflective/build-xml.py | 4 +++- examples/xml/boxes/settings.xml | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/python/boxes/build-xml.py b/examples/python/boxes/build-xml.py index 4bac9fff4..9c28d37bb 100644 --- a/examples/python/boxes/build-xml.py +++ b/examples/python/boxes/build-xml.py @@ -1,3 +1,5 @@ +import numpy as np + import openmc ############################################################################### @@ -115,7 +117,7 @@ settings_file = openmc.SettingsFile() settings_file.batches = batches settings_file.inactive = inactive settings_file.particles = particles -settings_file.set_source_space('point', [0., 0., 0.]) +settings_file.set_source_space('box', np.concatenate(outer_cube.bounding_box)) settings_file.export_to_xml() ############################################################################### diff --git a/examples/python/reflective/build-xml.py b/examples/python/reflective/build-xml.py index 9eab4aec3..44b544d20 100644 --- a/examples/python/reflective/build-xml.py +++ b/examples/python/reflective/build-xml.py @@ -1,3 +1,5 @@ +import numpy as np + import openmc ############################################################################### @@ -82,5 +84,5 @@ settings_file = openmc.SettingsFile() settings_file.batches = batches settings_file.inactive = inactive settings_file.particles = particles -settings_file.set_source_space('box', [-1, -1, -1, 1, 1, 1]) +settings_file.set_source_space('box', np.concatenate(cell.region.bounding_box)) settings_file.export_to_xml() diff --git a/examples/xml/boxes/settings.xml b/examples/xml/boxes/settings.xml index 0ac26ec4d..eff7c1c10 100644 --- a/examples/xml/boxes/settings.xml +++ b/examples/xml/boxes/settings.xml @@ -10,7 +10,7 @@ - +