sort the particle histories in time order (since they may have been spread across multiple processors / files. finalize() should only be called after all particle data has been read in
(self)
| 206 | |
| 207 | |
| 208 | def finalize(self): |
| 209 | """ |
| 210 | sort the particle histories in time order (since they may |
| 211 | have been spread across multiple processors / files. |
| 212 | |
| 213 | finalize() should only be called after all particle data |
| 214 | has been read in |
| 215 | """ |
| 216 | |
| 217 | # sort the history by time -- the particleInstance objects use |
| 218 | # time as their value for comparison, so sort() should handle |
| 219 | # this nicely for us. |
| 220 | self.history.sort() |
| 221 | |
| 222 | self.finalized = 1 |
| 223 | |
| 224 | |
| 225 |
no test coverage detected