mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Use bounding box feature in a few example inputs
This commit is contained in:
parent
48d5f2219d
commit
d13c950189
3 changed files with 7 additions and 3 deletions
|
|
@ -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()
|
||||
|
||||
###############################################################################
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<!-- Starting source -->
|
||||
<source>
|
||||
<space type="point" parameters="0. 0. 0." />
|
||||
<space type="box" parameters="-10. -10. -10. 10. 10. 10." />
|
||||
</source>
|
||||
|
||||
</settings>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue