Skip to content

Commit

Permalink
n
Browse files Browse the repository at this point in the history
  • Loading branch information
paulxshen committed Nov 27, 2024
1 parent dfd506e commit e28bc81
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 1,015 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ docs/build/
*.*.pyc
*.pyo
_*.py
# /src/sim
/src/sim
/src/pic

Manifest.*
_.png
Expand Down
12 changes: 7 additions & 5 deletions src/core/modes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,17 @@ function solvemodes(ϵ, dx, λ, neigs)
end
# global _as = ϵ, x, y
solver = VectorModesolver.VectorialModesolver(λ, x, y, boundary, f)
modes = VectorModesolver.solve(solver, neigs, tol)
modes = VectorModesolver.solve(solver, 2, tol)
# plot_mode_fields(modes[1]) |> display
# error()
# display(heatmap(ϵ))
# display(heatmap(real(transpose(modes[1].Ex))))
# Ex = modes[1].Ex
# e = mean(Ex .* ϵ, dims=2) ./ mean(Ex, dims=2)
# display(lines(abs.(vec(e))))
# error()
for i = 1:2
Ex = modes[i].Ex
e = mean(Ex .* ϵ, dims=2) ./ mean(Ex, dims=2)
display(lines(abs.(vec(e))))
end
error()
modes = [namedtuple([k => getfield(mode, k)[:, m+1:end-n] for k = (:Ex, :Ey, :Hx, :Hy)]) for mode in modes]


Expand Down
Loading

0 comments on commit e28bc81

Please sign in to comment.