From e0aed3d2b3a1c938b0346cefa9f97bd83ab6cdf0 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Wed, 31 Mar 2021 22:56:03 -0500 Subject: [PATCH] Restoring old test (but using PyAPITestHarnes). Moving the new test into its own directory. --- .../regression_tests/rotation/inputs_true.dat | 19 +++++---------- .../rotation/results_true.dat | 4 ---- tests/regression_tests/rotation/test.py | 24 ++++++------------- 3 files changed, 13 insertions(+), 34 deletions(-) diff --git a/tests/regression_tests/rotation/inputs_true.dat b/tests/regression_tests/rotation/inputs_true.dat index 24b00199be..d90d498bf6 100644 --- a/tests/regression_tests/rotation/inputs_true.dat +++ b/tests/regression_tests/rotation/inputs_true.dat @@ -1,17 +1,10 @@ - - - - - - - - - - - - + + + + + @@ -27,7 +20,7 @@ eigenvalue - 10000 + 1000 10 5 diff --git a/tests/regression_tests/rotation/results_true.dat b/tests/regression_tests/rotation/results_true.dat index f0e7868a01..a58aa1c8ec 100644 --- a/tests/regression_tests/rotation/results_true.dat +++ b/tests/regression_tests/rotation/results_true.dat @@ -1,6 +1,2 @@ k-combined: -<<<<<<< HEAD -4.132181E-01 1.130226E-02 -======= 4.453328E-01 5.918369E-03 ->>>>>>> Updating test results for new problem. diff --git a/tests/regression_tests/rotation/test.py b/tests/regression_tests/rotation/test.py index 25aada5aad..6b68367b40 100644 --- a/tests/regression_tests/rotation/test.py +++ b/tests/regression_tests/rotation/test.py @@ -1,8 +1,7 @@ -import pytest import openmc +import pytest -from tests.testing_harness import PyAPITestHarness - +from tests.testing_harness import TestHarness, PyAPITestHarness @pytest.fixture def model(): @@ -16,27 +15,18 @@ def model(): h1.set_density('g/cc', 0.1) h1.add_nuclide('H1', 0.1) + outer_sphere = openmc.Sphere(r=10.0, boundary_type='vacuum') inner_sphere = openmc.Sphere(x0=1.0, r=5.0) fuel_cell = openmc.Cell(fill=fuel, region=-inner_sphere) hydrogen_cell = openmc.Cell(fill=h1, region=+inner_sphere) univ = openmc.Universe(cells=[fuel_cell, hydrogen_cell]) + outer_cell = openmc.Cell(fill=univ, region=-outer_sphere) + outer_cell.rotation = (10, 20, 30) - # Create one cell on top of the other. Only one - # has a rotation - box = openmc.rectangular_prism(15., 15., 'z', boundary_type='vacuum') - lower_z = openmc.ZPlane(-7.5, boundary_type='vacuum') - upper_z = openmc.ZPlane(22.5, boundary_type='vacuum') - middle_z = openmc.ZPlane(7.5) + model.geometry = openmc.Geometry(root=[outer_cell]) - lower_cell = openmc.Cell(fill=univ, region=box & +lower_z & -middle_z) - lower_cell.rotation = (10, 20, 30) - upper_cell = openmc.Cell(fill=univ, region=box & +middle_z & -upper_z) - upper_cell.translation = (0, 0, 15) - - model.geometry = openmc.Geometry(root=[lower_cell, upper_cell]) - - model.settings.particles = 10000 + model.settings.particles = 1000 model.settings.inactive = 5 model.settings.batches = 10 source_box = openmc.stats.Box((-4., -4., -4.), (4., 4., 4.))