From f5a0caa51a10c29980c8049340ee20660f4c759e Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 19 Apr 2021 07:35:32 -0500 Subject: [PATCH] Add simple test with periodic hexagonal prism (currently fails) --- .../regression_tests/periodic_hex/__init__.py | 0 .../periodic_hex/inputs_true.dat | 24 ++++++++++++++++ tests/regression_tests/periodic_hex/test.py | 28 +++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 tests/regression_tests/periodic_hex/__init__.py create mode 100644 tests/regression_tests/periodic_hex/inputs_true.dat create mode 100644 tests/regression_tests/periodic_hex/test.py diff --git a/tests/regression_tests/periodic_hex/__init__.py b/tests/regression_tests/periodic_hex/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/regression_tests/periodic_hex/inputs_true.dat b/tests/regression_tests/periodic_hex/inputs_true.dat new file mode 100644 index 0000000000..00e539d4bf --- /dev/null +++ b/tests/regression_tests/periodic_hex/inputs_true.dat @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + eigenvalue + 1000 + 5 + 0 + diff --git a/tests/regression_tests/periodic_hex/test.py b/tests/regression_tests/periodic_hex/test.py new file mode 100644 index 0000000000..a21819b1ad --- /dev/null +++ b/tests/regression_tests/periodic_hex/test.py @@ -0,0 +1,28 @@ +import openmc +import pytest + +from tests.testing_harness import PyAPITestHarness + + +@pytest.fixture +def hex_model(): + model = openmc.model.Model() + + fuel = openmc.Material() + fuel.add_nuclide('U235', 1.0) + fuel.set_density('g/cc', 4.5) + + hex_region = openmc.model.hexagonal_prism(10.0, boundary_type='periodic') + cell = openmc.Cell(fill=fuel, region=hex_region) + model.geometry = openmc.Geometry([cell]) + + # Define settings + model.settings.particles = 1000 + model.settings.batches = 5 + model.settings.inactive = 0 + return model + + +def test_periodic_hex(hex_model): + harness = PyAPITestHarness('statepoint.5.h5', hex_model) + harness.main()