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

Add example for plotting with plots.jl #1134

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

TheFibonacciEffect
Copy link

Show how the PointEvalHandler can be used to evaluate the solution for plotting using Plots.jl in the case of the heat uquation.

Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (43db37c) to head (b9e67df).

❗ There is a different number of reports uploaded between BASE (43db37c) and HEAD (b9e67df). Click for more details.

HEAD has 5 uploads less than BASE
Flag BASE (43db37c) HEAD (b9e67df)
6 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #1134       +/-   ##
==========================================
- Coverage   93.59%   0.00%   -93.60%     
==========================================
  Files          39      39               
  Lines        6087    6009       -78     
==========================================
- Hits         5697       0     -5697     
- Misses        390    6009     +5619     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@KnutAM
Copy link
Member

KnutAM commented Feb 3, 2025

Thank you for the suggestion. However, in my opinion, this is not a recommended way to plot an FE solution in Ferrite, so we shouldn't recommend that in the docs.

FerriteViz.jl aims to make such plots easy (but currently unfortunately requires using a development branch).

@termi-official
Copy link
Member

I think maybe we can still add this to the how-to section and elaborate in detail why this should not be used in general.

I will try to update FerriteViz in the meantime.

@TheFibonacciEffect
Copy link
Author

TheFibonacciEffect commented Feb 9, 2025

I think it shouldnt be used generally, because you would have to find a way to sample from the more complex geometries and display it with plots.jl, which is what FerriteViz should be used for instead.

However I think it would be nice to add it, because it shows how to sample from a solution, which is important for solving optimization problems involving FEM. I couldnt find an example for that in the docs yet.

Explaining in more detail on why it shouldnt be used and pointing to the relevant branch FerriteViz, would be nice, but I am new to Ferrite, so I dont have the knowledge to write a section like that. So someone else would need to do that. To me however it seems evident why this shouldnt be used in general, more complex cases in which either FerriteViz (once its updated) or Paraview would be better used (especially 3D).

@termi-official
Copy link
Member

Thanks for elaborating. It was not ment to offload writing up this section to you, no worries.

However I think it would be nice to add it, because it shows how to sample from a solution, which is important for solving optimization problems involving FEM. I couldnt find an example for that in the docs yet.

Sorry, I think I do not understand. Is there something missing in https://ferrite-fem.github.io/Ferrite.jl/stable/howto/postprocessing/ (which should be visible from https://ferrite-fem.github.io/Ferrite.jl/stable/howto/) or do you have something different in mind? If you want to solve optimization stuff with FEM (or PDEs in general), then I would highly recommend you to take a look into adjoint methods, as this might, without further knowledge about your specific form, make you optimization problem easier to handle.

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.

3 participants