From 7006b5e6e4c73c81284bf73009968ac53cc1df0b Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 26 Aug 2019 00:27:05 -0700 Subject: [PATCH] Flip propagation direction by flipping H --- meanas/fdfd/waveguide_mode.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meanas/fdfd/waveguide_mode.py b/meanas/fdfd/waveguide_mode.py index 2f32c89..7776ce2 100644 --- a/meanas/fdfd/waveguide_mode.py +++ b/meanas/fdfd/waveguide_mode.py @@ -115,8 +115,7 @@ def solve_waveguide_mode(mode_number: int, fields_2d['wavenumber'] = 2/dx_prop * numpy.arcsin(fields_2d['wavenumber'] * dx_prop/2) # Adjust for propagation direction - fields_2d['E'][2] *= polarity - fields_2d['H'][2] *= polarity + fields_2d['H'] *= polarity # Apply phase shift to H-field fields_2d['H'] *= numpy.exp(-polarity * 1j * 0.5 * fields_2d['wavenumber'] * dx_prop)