From a5627e03712209b27b1764e7c141821152ebb7ca Mon Sep 17 00:00:00 2001 From: Ian Williamson Date: Thu, 1 Jul 2021 07:30:39 -0700 Subject: [PATCH] Flip sign of `amp` based on group velocity direction --- src/mpb.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mpb.cpp b/src/mpb.cpp index 3e4fbe417..a3b736c31 100644 --- a/src/mpb.cpp +++ b/src/mpb.cpp @@ -832,6 +832,7 @@ void fields::add_eigenmode_source(component c0, const src_time &src, direction d // magnetic current N = -nHat \times E */ /*--------------------------------------------------------------*/ if (global_eigenmode_data->group_velocity < 0) + master_printf("vg is negative!\n"); amp *= -1; // equivalent to flipping the direction of nhat. if (is_D(c0)) c0 = direction_component(Ex, component_direction(c0)); if (is_B(c0)) c0 = direction_component(Hx, component_direction(c0));