Skip to content

Commit 7ec220c

Browse files
Adding test for changes in kernel.pyfunc
If kernel.pyfunc has changed, the kernel needs to be recompiled. This fixes #197
1 parent 1d4fd5b commit 7ec220c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

parcels/particleset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def execute(self, pyfunc=AdvectionRK4, starttime=None, endtime=None, dt=1.,
221221
kernel errors.
222222
:param show_movie: True shows particles; name of field plots that field as background
223223
"""
224-
if self.kernel is None:
224+
if self.kernel is None or self.kernel.pyfunc is not pyfunc:
225225
# Generate and store Kernel
226226
if isinstance(pyfunc, Kernel):
227227
self.kernel = pyfunc

0 commit comments

Comments
 (0)