This is another option for speeding up the slicing.
This runs openmc in plot mode and loads up the resulting ppm into a 2d pixel array.
The main disadvantage is that we currently need nuclear data when running in plot mode. Perhaps this is something that can be changed in openmc
TODO
cell id slicing function
include nuclear data in repo as datafile
include cross_sections.xml in repo as datafile
make a minimal h5 data file from an empty ACE file (or use He4 which is a small h5 file)
handy function for timing the method to see the speed improvement
import time
for x in range(2):
start_time = time.time()
data_slice = my_geometry.get_slice_of_material_ids(view_direction='x')
print("--- %s seconds ---" % (time.time() - start_time))
method is about 10 times quicker than current method for tokamak example
This is another option for speeding up the slicing.
This runs openmc in plot mode and loads up the resulting ppm into a 2d pixel array.
The main disadvantage is that we currently need nuclear data when running in plot mode. Perhaps this is something that can be changed in openmc
TODO
handy function for timing the method to see the speed improvement
method is about 10 times quicker than current method for tokamak example