forked from jan/fdfd_tools
Fix approx_inverse operator
This commit is contained in:
parent
c1f65f61c1
commit
ee9abb77d9
@ -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))
|
d_xyz = fftn(ifftn(e_xyz, axes=range(3)) * epsilon, axes=range(3))
|
||||||
|
|
||||||
# cross product and transform into mn basis crossinv_t2c
|
# cross product and transform into mn basis crossinv_t2c
|
||||||
h_m = numpy.sum(e_xyz * n, axis=3)[:, :, :, None] / +k_mag
|
h_m = numpy.sum(d_xyz * n, axis=3)[:, :, :, None] / +k_mag
|
||||||
h_n = numpy.sum(e_xyz * m, 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()))
|
return numpy.hstack((h_m.ravel(), h_n.ravel()))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user