mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Finishing test setup.
This commit is contained in:
parent
d072adc050
commit
bff4f091c7
5 changed files with 69 additions and 0 deletions
0
tests/regression_tests/dagmc/__init__.py
Normal file
0
tests/regression_tests/dagmc/__init__.py
Normal file
0
tests/regression_tests/dagmc/refl/__init__.py
Normal file
0
tests/regression_tests/dagmc/refl/__init__.py
Normal file
23
tests/regression_tests/dagmc/refl/inputs_true.dat
Normal file
23
tests/regression_tests/dagmc/refl/inputs_true.dat
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<settings>
|
||||
<run_mode>eigenvalue</run_mode>
|
||||
<particles>100</particles>
|
||||
<batches>5</batches>
|
||||
<inactive>0</inactive>
|
||||
<source strength="1.0">
|
||||
<space type="box">
|
||||
<parameters>-4 -4 -4 4 4 4</parameters>
|
||||
</space>
|
||||
</source>
|
||||
<dagmc>true</dagmc>
|
||||
</settings>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<tallies>
|
||||
<filter id="1" type="cell">
|
||||
<bins>1</bins>
|
||||
</filter>
|
||||
<tally id="1">
|
||||
<filters>1</filters>
|
||||
<scores>total</scores>
|
||||
</tally>
|
||||
</tallies>
|
||||
5
tests/regression_tests/dagmc/refl/results_true.dat
Normal file
5
tests/regression_tests/dagmc/refl/results_true.dat
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
k-combined:
|
||||
2.053871E+00 7.718195E-03
|
||||
tally 1:
|
||||
1.171003E+01
|
||||
2.864565E+01
|
||||
41
tests/regression_tests/dagmc/refl/test.py
Normal file
41
tests/regression_tests/dagmc/refl/test.py
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import openmc
|
||||
import openmc.capi
|
||||
from openmc.stats import Box
|
||||
from openmc.material import Materials
|
||||
|
||||
import pytest
|
||||
from tests.testing_harness import PyAPITestHarness
|
||||
|
||||
pytestmark = pytest.mark.skipif(
|
||||
not openmc.capi._dagmc_enabled(),
|
||||
reason="DAGMC CAD geometry is not enabled.")
|
||||
|
||||
class UWUWTest(PyAPITestHarness):
|
||||
|
||||
def _build_inputs(self):
|
||||
model = openmc.model.Model()
|
||||
|
||||
# settings
|
||||
model.settings.batches = 5
|
||||
model.settings.inactive = 0
|
||||
model.settings.particles = 100
|
||||
|
||||
source = openmc.Source(space=Box([-4, -4, -4],
|
||||
[ 4, 4, 4]))
|
||||
model.settings.source = source
|
||||
|
||||
model.settings.dagmc = True
|
||||
|
||||
model.settings.export_to_xml()
|
||||
|
||||
# tally
|
||||
tally = openmc.Tally()
|
||||
tally.scores = ['total']
|
||||
tally.filters = [openmc.CellFilter(1)]
|
||||
model.tallies = [tally]
|
||||
|
||||
model.tallies.export_to_xml()
|
||||
|
||||
def test_uwuw():
|
||||
harness = UWUWTest('statepoint.5.h5')
|
||||
harness.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue