From fd492926d1723a1e80b992b3ffdff982ccb85cff Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Sun, 5 Nov 2023 23:29:35 -0800 Subject: [PATCH] fix scaling --- src/Maxwell/Waveguide/Waveguide.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Maxwell/Waveguide/Waveguide.jl b/src/Maxwell/Waveguide/Waveguide.jl index 946eb4b0..da1b1b98 100644 --- a/src/Maxwell/Waveguide/Waveguide.jl +++ b/src/Maxwell/Waveguide/Waveguide.jl @@ -165,6 +165,14 @@ function calculate_modes( if radius == Inf vecs[num_free_dofs(V1)+1:end, :] ./= 1im * sqrt.(vals)' / k0^2 else + for i = 1:size(vecs)[2] + vecs[num_free_dofs(V1)+1:end, i] = get_free_dof_values( + interpolate( + FEFunction(V2, vecs[num_free_dofs(V1)+1:end, i]) * (x -> radius / x[1]), + V2, + ), + ) + end vecs[num_free_dofs(V1)+1:end, :] ./= 1im * sqrt.(vals)' end