update photon tally test to cover analog estimator

This commit is contained in:
liangjg 2019-03-28 20:00:27 -04:00
parent e36f67c5bb
commit a8e942b740
2 changed files with 13 additions and 4 deletions

View file

@ -47,4 +47,9 @@
<filters>1 2</filters>
<scores>current</scores>
</tally>
<tally id="2">
<filters>2</filters>
<scores>total</scores>
<estimator>analog</estimator>
</tally>
</tallies>

View file

@ -48,10 +48,14 @@ class SourceTestHarness(PyAPITestHarness):
surface_filter = openmc.SurfaceFilter(cyl)
particle_filter = openmc.ParticleFilter('photon')
tally = openmc.Tally()
tally.filters = [surface_filter, particle_filter]
tally.scores = ['current']
tallies = openmc.Tallies([tally])
current_tally = openmc.Tally()
current_tally.filters = [surface_filter, particle_filter]
current_tally.scores = ['current']
total_tally = openmc.Tally()
total_tally.filters = [particle_filter]
total_tally.scores = ['total']
total_tally.estimator = 'analog'
tallies = openmc.Tallies([current_tally, total_tally])
tallies.export_to_xml()
def _get_results(self):