mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Fix several failing tests
This commit is contained in:
parent
091241070f
commit
4783b34fe2
5 changed files with 31 additions and 26 deletions
|
|
@ -1,13 +1,13 @@
|
|||
k-combined:
|
||||
1.902610E+00 1.901530E-02
|
||||
1.933305E+00 1.300360E-02
|
||||
tally 1:
|
||||
9.580351E+01
|
||||
1.031580E+03
|
||||
2.745984E+01
|
||||
8.430494E+01
|
||||
9.422158E+01
|
||||
9.919885E+02
|
||||
2.174849E+02
|
||||
5.292948E+03
|
||||
2.174849E+02
|
||||
5.292948E+03
|
||||
9.552846E+01
|
||||
1.019358E+03
|
||||
2.887973E+01
|
||||
9.308509E+01
|
||||
9.732441E+01
|
||||
1.059022E+03
|
||||
2.217326E+02
|
||||
5.486892E+03
|
||||
2.217326E+02
|
||||
5.486892E+03
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ current batch:
|
|||
current generation:
|
||||
1.000000E+00
|
||||
particle id:
|
||||
9.020000E+02
|
||||
2.540000E+02
|
||||
run mode:
|
||||
eigenvalue
|
||||
particle weight:
|
||||
1.000000E+00
|
||||
particle energy:
|
||||
3.691964E+06
|
||||
2.220048E+06
|
||||
particle xyz:
|
||||
-5.047439E+01 2.730535E+01 -2.619863E+01
|
||||
-4.820850E+01 2.432936E+01 4.397668E+01
|
||||
particle uvw:
|
||||
-6.278670E-01 1.419818E-01 -7.652609E-01
|
||||
-3.148565E-01 9.184190E-01 2.395245E-01
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ from tests.testing_harness import ParticleRestartTestHarness
|
|||
|
||||
|
||||
def test_particle_restart_eigval():
|
||||
harness = ParticleRestartTestHarness('particle_11_902.h5')
|
||||
harness = ParticleRestartTestHarness('particle_11_254.h5')
|
||||
harness.main()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from math import sin, cos, pi
|
||||
|
||||
import openmc
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from tests.testing_harness import PyAPITestHarness
|
||||
|
|
@ -24,17 +25,14 @@ def model():
|
|||
# (it essentially defines a circle of half-cylinders), but it is
|
||||
# designed so that periodic and reflective BCs will give different
|
||||
# answers.
|
||||
theta1 = (-1/6 + 1/2) * np.pi
|
||||
theta2 = (1/6 - 1/2) * np.pi
|
||||
plane1 = openmc.Plane(a=np.cos(theta1), b=np.sin(theta1),
|
||||
boundary_type='periodic')
|
||||
plane2 = openmc.Plane(a=np.cos(theta2), b=np.sin(theta2),
|
||||
boundary_type='periodic')
|
||||
theta1 = (-1/6 + 1/2) * pi
|
||||
theta2 = (1/6 - 1/2) * pi
|
||||
plane1 = openmc.Plane(a=cos(theta1), b=sin(theta1), boundary_type='periodic')
|
||||
plane2 = openmc.Plane(a=cos(theta2), b=sin(theta2), boundary_type='periodic')
|
||||
|
||||
x_max = openmc.XPlane(x0=5., boundary_type='reflective')
|
||||
x_max = openmc.XPlane(5., boundary_type='reflective')
|
||||
|
||||
z_cyl = openmc.ZCylinder(x0=3*np.cos(np.pi/6), y0=3*np.sin(np.pi/6),
|
||||
r=2.0)
|
||||
z_cyl = openmc.ZCylinder(x0=3*cos(pi/6), y0=3*sin(pi/6), r=2.0)
|
||||
|
||||
outside_cyl = openmc.Cell(1, fill=water, region=(
|
||||
+plane1 & +plane2 & -x_max & +z_cyl))
|
||||
|
|
|
|||
|
|
@ -276,6 +276,13 @@ class ParticleRestartTestHarness(TestHarness):
|
|||
|
||||
return outstr
|
||||
|
||||
def _cleanup(self):
|
||||
"""Delete particle restart files."""
|
||||
super()._cleanup()
|
||||
output = glob.glob('particle*.h5')
|
||||
for f in output:
|
||||
os.remove(f)
|
||||
|
||||
|
||||
class PyAPITestHarness(TestHarness):
|
||||
def __init__(self, statepoint_name, model=None, inputs_true=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue