Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Mode.plot_component #178

Merged
merged 2 commits into from
Oct 16, 2024
Merged

Update Mode.plot_component #178

merged 2 commits into from
Oct 16, 2024

Conversation

mpasson
Copy link

@mpasson mpasson commented Oct 9, 2024

Plotting 'abs' func with field component 'x' or 'y' shows some problems #170.

This is my attempt to solve it. Please fell free to disregard if I missed something in the fix.
Best,

Copy link
Owner

@HelgeGehring HelgeGehring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

I think this solves the problem, but I'm not sure if that's actually the clean way.
It works I think as we projected on linear lagrange which makes projection and applying such a function almost exchangable

I would somehow expect (especially for anything higher order), that we'd need to

  • interpolate -> apply the function -> project
    That way we'd need to apply it to the values at the interpolation points instead of on the degrees of freedom 🤔

I made a proposal, but I think it's a little more complicated - the function would need to be applied on each component (once we interpolated, we have a three dimensional vector (with another dimension over the quadrature points)) - don't know if numpy would do it like this 🤔

Could you give it a try?

I.e. apply the function somewhere between interpolate and project?

(otherwise, we could also merge this as it's better than what we do right now. But I'd guess we're close to having it completely correct)

femwell/maxwell/waveguide.py Outdated Show resolved Hide resolved
@HelgeGehring
Copy link
Owner

I'll merge once the CICD sucessfully ran

@HelgeGehring HelgeGehring merged commit 3553585 into HelgeGehring:main Oct 16, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants