mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Update test_deplete_predictor to check depletion time
Due to where the results are saved for the predictor routine,
at the top of the for loop vs. the end, the positions
are incremented by one in the depletion time. This causes
a value of zero to be returned as the first item in the array
from get_depletion_time.
This save was moved in commit 87aed7a0b0
of PR #1014 to make the restart feature easier.
This commit is contained in:
parent
bd0a9a18e4
commit
71d31d6ea6
2 changed files with 4 additions and 2 deletions
|
|
@ -103,4 +103,4 @@ def predictor(operator, timesteps, power=None, power_density=None,
|
|||
op_results = [operator(x[0], power[-1])]
|
||||
|
||||
# Create results, write to disk
|
||||
Results.save(operator, x, op_results, [t, t], p, i_res + len(timesteps), proc_time)
|
||||
Results.save(operator, x, op_results, [t, t], p, i_res + len(timesteps), None)
|
||||
|
|
|
|||
|
|
@ -38,4 +38,6 @@ def test_predictor(run_in_tmpdir):
|
|||
|
||||
# Test structure of depletion time dataset
|
||||
|
||||
assert res.get_depletion_time().shape == (len(dt), 1)
|
||||
dep_time = res.get_depletion_time()
|
||||
assert dep_time.shape == (len(dt), 1)
|
||||
assert all(dep_time > 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue