mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
changed particle restart to reflect new particle that is lost
This commit is contained in:
parent
c951261535
commit
0b1f785c42
3 changed files with 5 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ import particle_restart as pr
|
|||
if len(sys.argv) > 1:
|
||||
p = pr.Particle(sys.argv[1])
|
||||
else:
|
||||
p = pr.Particle('particle_10_394.binary')
|
||||
p = pr.Particle('particle_12_192.binary')
|
||||
|
||||
# set up output string
|
||||
outstr = ''
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<settings>
|
||||
|
||||
<eigenvalue>
|
||||
<batches>10</batches>
|
||||
<batches>12</batches>
|
||||
<inactive>5</inactive>
|
||||
<particles>1000</particles>
|
||||
</eigenvalue>
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_restart():
|
||||
particle = glob.glob(cwd + '/particle_10_394.*')
|
||||
particle = glob.glob(cwd + '/particle_12_192.*')
|
||||
assert len(particle) == 1, 'Either multiple or no particle restart files exist.'
|
||||
assert particle[0].endswith('binary') or \
|
||||
particle[0].endswith('h5'), 'Particle restart file not a binary or hdf5 file.'
|
||||
|
||||
def test_results():
|
||||
particle = glob.glob(cwd + '/particle_10_394.*')
|
||||
particle = glob.glob(cwd + '/particle_12_192.*')
|
||||
call(['python', 'results.py', particle[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,7 +38,7 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def test_run_restart():
|
||||
particle = glob.glob(cwd + '/particle_10_394.*')
|
||||
particle = glob.glob(cwd + '/particle_12_192.*')
|
||||
proc = Popen([opts.exe, '-r', particle[0], cwd], stderr=PIPE, stdout=PIPE)
|
||||
stdout, stderr = proc.communicate()
|
||||
assert stderr == '', 'Particle restart not successful.'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue