Add ResultsList.get_depletion_time method

Returns a numpy array with the time spent depleting materials
between transport steps. This array has shape
(N-1, 1), where N is the number of transport steps
This commit is contained in:
Andrew Johnson 2019-06-21 09:41:29 -05:00
parent d55c77a65f
commit a31e6ced65
No known key found for this signature in database
GPG key ID: 253418E91B7F6FEB

View file

@ -103,3 +103,18 @@ class ResultsList(list):
eigenvalue[i] = result.k[0]
return time, eigenvalue
def get_depletion_time(self):
"""Return an array of time spent depleting materials
..note::
Will have one fewer row than number of other methods,
like :meth:`get_eigenvalues`, because no depletion
is performed at the final transport stage
"""
times = np.empty((len(self) - 1, 1))
for ix, res in enumerate(self[:-1]):
times[ix] = res.proc_time[0]
return times