Skip to content

Move implementation of .iter methods on driver classes to Python

Vicentini Filippo requested to merge github/fork/femtobit/iterator into master

Created by: femtobit

Implementing the iterator interface for the simulation drivers is quite a bit more complicated in C++ than to do it in Python (also compare #195 (closed), #198).

Now that we also have a straightforward way to add functionality in Python (#193), we can replace this with, essentially, something like

for i in range(n_iter):
    driver.advance()
    yield i

which is done in this PR.

Merge request reports