Skip to content

Commit

Permalink
Moved conv_fun in Mode.plot_component after xy component splitting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Passoni committed Oct 9, 2024
1 parent b5fd13d commit 1ab3b06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion femwell/maxwell/waveguide.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,9 @@ def plot_component(

if component == "x" or component == "y":
plot_basis = mfield_t_basis.with_element(ElementVector(ElementDG(ElementTriP1())))
mfield_xy = plot_basis.project(mfield_t_basis.interpolate(conv_func(mfield_t)))
mfield_xy = plot_basis.project(mfield_t_basis.interpolate(mfield_t))
(mfield_x, mfield_x_basis), (mfield_y, mfield_y_basis) = plot_basis.split(mfield_xy)
mfield_x, mfield_y = conv_func(mfield_x), conv_func(mfield_y)
if component == "x":
mfield_x_basis.plot(mfield_x, ax=ax, shading="gouraud")
else:
Expand Down

0 comments on commit 1ab3b06

Please sign in to comment.