From ee9abb77d9f42e79074357e95aee960e7588a566 Mon Sep 17 00:00:00 2001 From: jan Date: Mon, 15 Jan 2018 22:44:14 -0800 Subject: [PATCH] Fix approx_inverse operator --- fdfd_tools/bloch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fdfd_tools/bloch.py b/fdfd_tools/bloch.py index fd5f758..aabc96c 100644 --- a/fdfd_tools/bloch.py +++ b/fdfd_tools/bloch.py @@ -352,8 +352,8 @@ def inverse_maxwell_operator_approx(k0: numpy.ndarray, d_xyz = fftn(ifftn(e_xyz, axes=range(3)) * epsilon, axes=range(3)) # cross product and transform into mn basis crossinv_t2c - h_m = numpy.sum(e_xyz * n, axis=3)[:, :, :, None] / +k_mag - h_n = numpy.sum(e_xyz * m, axis=3)[:, :, :, None] / -k_mag + h_m = numpy.sum(d_xyz * n, axis=3)[:, :, :, None] / +k_mag + h_n = numpy.sum(d_xyz * m, axis=3)[:, :, :, None] / -k_mag return numpy.hstack((h_m.ravel(), h_n.ravel()))