From 8cbb0e9864e260dd80ce23c2745c7e643dcb5f29 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Fri, 16 Oct 2020 19:32:35 -0700 Subject: [PATCH] call update_s during loop --- opencl_fdtd/simulation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opencl_fdtd/simulation.py b/opencl_fdtd/simulation.py index b708411..5f52e35 100644 --- a/opencl_fdtd/simulation.py +++ b/opencl_fdtd/simulation.py @@ -26,7 +26,7 @@ class Simulation(object): """ Constructs and holds the basic FDTD operations and related fields - After constructing this object, call the (update_E, update_H) members + After constructing this object, call the (update_E, update_H, update_S) members to perform FDTD updates on the stored (E, H, S) fields: pmls = [{'axis': a, 'polarity': p} for a in 'xyz' for p in 'np'] @@ -43,6 +43,8 @@ class Simulation(object): # Perturb the field (i.e., add a soft current source) sim.E[ind] += numpy.sin(omega * t * sim.dt) event = sim.update_H([]) + if sim.update_S: + event = sim.update_S([event]) event.wait() with lzma.open('saved_simulation', 'wb') as f: