summaryrefslogtreecommitdiff
path: root/sim.py
diff options
context:
space:
mode:
Diffstat (limited to 'sim.py')
-rwxr-xr-xsim.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sim.py b/sim.py
index 2d772bb..fce559e 100755
--- a/sim.py
+++ b/sim.py
@@ -23,7 +23,8 @@ def pick_seed():
class Simulation(object):
def __init__(self, detector, detector_material,
- seed=None, cuda_device=None, geant4_processes=4, bvh_bits=11):
+ seed=None, cuda_device=None, geant4_processes=4, bvh_bits=11,
+ use_cache=True):
self.detector = detector
if seed is None:
@@ -44,7 +45,7 @@ class Simulation(object):
self.photon_generator = None
print >>sys.stderr, 'Creating BVH with %d bits...' % (bvh_bits)
- detector.build(bits=bvh_bits)
+ detector.build(bits=bvh_bits, use_cache=use_cache)
print >>sys.stderr, 'Initializing GPU...'
self.gpu_worker = gpu.GPU(cuda_device)