mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
adding back files to be reviewed
This commit is contained in:
parent
ae28233110
commit
bc09d1ef55
1244 changed files with 301904 additions and 0 deletions
0
tests/regression_tests/sourcepoint_batch/__init__.py
Normal file
0
tests/regression_tests/sourcepoint_batch/__init__.py
Normal file
8
tests/regression_tests/sourcepoint_batch/geometry.xml
Normal file
8
tests/regression_tests/sourcepoint_batch/geometry.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0"?>
|
||||
<geometry>
|
||||
|
||||
<!-- Sphere with radius 10 -->
|
||||
<surface id="1" type="sphere" coeffs="0 0 0 10" boundary="vacuum"/>
|
||||
<cell id="1" material="1" region="-1" />
|
||||
|
||||
</geometry>
|
||||
9
tests/regression_tests/sourcepoint_batch/materials.xml
Normal file
9
tests/regression_tests/sourcepoint_batch/materials.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<materials>
|
||||
|
||||
<material id="1">
|
||||
<density value="4.5" units="g/cc" />
|
||||
<nuclide name="U235" ao="1.0" />
|
||||
</material>
|
||||
|
||||
</materials>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
k-combined:
|
||||
2.976389E-01 3.770725E-03
|
||||
1.892327E+00 -3.385257E+00 6.702632E-01
|
||||
18
tests/regression_tests/sourcepoint_batch/settings.xml
Normal file
18
tests/regression_tests/sourcepoint_batch/settings.xml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0"?>
|
||||
<settings>
|
||||
|
||||
<state_point batches="2 3 4 5 8"/>
|
||||
<source_point batches="2 5 8"/>
|
||||
|
||||
<run_mode>eigenvalue</run_mode>
|
||||
<batches>10</batches>
|
||||
<inactive>5</inactive>
|
||||
<particles>1000</particles>
|
||||
|
||||
<source>
|
||||
<space type="box">
|
||||
<parameters>-4 -4 -4 4 4 4</parameters>
|
||||
</space>
|
||||
</source>
|
||||
|
||||
</settings>
|
||||
31
tests/regression_tests/sourcepoint_batch/test.py
Normal file
31
tests/regression_tests/sourcepoint_batch/test.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import glob
|
||||
|
||||
from openmc import StatePoint
|
||||
|
||||
from tests.testing_harness import TestHarness
|
||||
|
||||
|
||||
class SourcepointTestHarness(TestHarness):
|
||||
def _test_output_created(self):
|
||||
"""Make sure statepoint files have been created."""
|
||||
statepoint = glob.glob('statepoint.*.h5')
|
||||
assert len(statepoint) == 5, 'Five statepoint files must exist.'
|
||||
|
||||
def _get_results(self):
|
||||
"""Digest info in the statepoint and return as a string."""
|
||||
# Get the eigenvalue information.
|
||||
outstr = TestHarness._get_results(self)
|
||||
|
||||
# Read the statepoint file.
|
||||
with StatePoint(self._sp_name) as sp:
|
||||
# Add the source information.
|
||||
xyz = sp.source[0]['r']
|
||||
outstr += ' '.join(['{0:12.6E}'.format(x) for x in xyz])
|
||||
outstr += "\n"
|
||||
|
||||
return outstr
|
||||
|
||||
|
||||
def test_sourcepoint_batch():
|
||||
harness = SourcepointTestHarness('statepoint.08.h5')
|
||||
harness.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue