mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Updating DAGMC test, harness, and statepoint read.
This commit is contained in:
parent
b2751f25f0
commit
275df356b4
4 changed files with 11 additions and 15 deletions
|
|
@ -266,7 +266,10 @@ class Geometry(object):
|
|||
Dictionary mapping cell IDs to :class:`openmc.Cell` instances
|
||||
|
||||
"""
|
||||
return self.root_universe.get_all_cells()
|
||||
if self.root_universe is not None:
|
||||
return self.root_universe.get_all_cells()
|
||||
else:
|
||||
return []
|
||||
|
||||
def get_all_universes(self):
|
||||
"""Return all universes in the geometry.
|
||||
|
|
|
|||
5
tests/regression_tests/dagmc/results_true.dat
Normal file
5
tests/regression_tests/dagmc/results_true.dat
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
k-combined:
|
||||
1.115067E+00 5.423808E-02
|
||||
tally 1:
|
||||
8.543144E+00
|
||||
1.530584E+01
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from tests.testing_harness import CADTestHarness
|
||||
from tests.testing_harness import TestHarness
|
||||
import os
|
||||
import pytest
|
||||
|
||||
|
|
@ -7,5 +7,5 @@ pytestmark = pytest.mark.skipif(
|
|||
reason="DAGMC CAD geometry is not enabled.")
|
||||
|
||||
def test_dagmc():
|
||||
harness = CADTestHarness('statepoint.5.h5')
|
||||
harness = TestHarness('statepoint.5.h5')
|
||||
harness.main()
|
||||
|
|
|
|||
|
|
@ -312,15 +312,3 @@ class HashedPyAPITestHarness(PyAPITestHarness):
|
|||
def _get_results(self):
|
||||
"""Digest info in the statepoint and return as a string."""
|
||||
return super()._get_results(True)
|
||||
|
||||
|
||||
class CADTestHarness(TestHarness):
|
||||
|
||||
def execute_test(self):
|
||||
"""Run OpenMC with the appropriate arguments and check the outputs."""
|
||||
try:
|
||||
self._run_openmc()
|
||||
self._test_output_created()
|
||||
finally:
|
||||
self._cleanup()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue