From a8e942b7405b4da3d8e1fe7670a17a9628ea189e Mon Sep 17 00:00:00 2001 From: liangjg Date: Thu, 28 Mar 2019 20:00:27 -0400 Subject: [PATCH] update photon tally test to cover analog estimator --- .../photon_production/inputs_true.dat | 5 +++++ tests/regression_tests/photon_production/test.py | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/regression_tests/photon_production/inputs_true.dat b/tests/regression_tests/photon_production/inputs_true.dat index 427078c889..bfee6a7129 100644 --- a/tests/regression_tests/photon_production/inputs_true.dat +++ b/tests/regression_tests/photon_production/inputs_true.dat @@ -47,4 +47,9 @@ 1 2 current + + 2 + total + analog + diff --git a/tests/regression_tests/photon_production/test.py b/tests/regression_tests/photon_production/test.py index ac39b065c0..4e51271090 100644 --- a/tests/regression_tests/photon_production/test.py +++ b/tests/regression_tests/photon_production/test.py @@ -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):