Skip to content

Commit

Permalink
Moved conv_func in Mode.plot_component between interpolation and proj…
Browse files Browse the repository at this point in the history
…ection for xy components.
  • Loading branch information
Marco Passoni committed Oct 10, 2024
1 parent 1ab3b06 commit f52ff33
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions femwell/maxwell/waveguide.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,8 @@ 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(mfield_t))
mfield_xy = plot_basis.project(conv_func(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 f52ff33

Please sign in to comment.