summaryrefslogtreecommitdiff
path: root/sim.py
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2011-08-17 15:51:56 -0400
committerStan Seibert <stan@mtrr.org>2011-08-17 15:51:56 -0400
commitb73e04e2e917d568159e146ddd5310881cc812ff (patch)
treec3aea42fb38fb325555635c7e014c31f617738d2 /sim.py
parentdcdd67ffbeacc26fdbd8c8dcf41e4dd53c39c512 (diff)
downloadchroma-b73e04e2e917d568159e146ddd5310881cc812ff.tar.gz
chroma-b73e04e2e917d568159e146ddd5310881cc812ff.tar.bz2
chroma-b73e04e2e917d568159e146ddd5310881cc812ff.zip
Add flag to Simulation() and Geometry.build() to ignore the BVH cache.
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)