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

Example of using DelaunayTriangulation.jl for mesh generation #1040

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

Conversation

DanielVandH
Copy link

Closes #975

Wasn't too sure where to put the example, so I just put in the howto section.

I explain some things that are also explained in more detail in DelaunayTriangulation.jl's docs since I wanted to
try to make this example somewhat self-contained, but I give links to my docs for more information. The mesh refinement here is pretty simple, but I note in the explanation that it could be easily adapted for things like graded meshes or adaptive refinement.

Copy link

codecov bot commented Aug 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.61%. Comparing base (c29f953) to head (c40cee9).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1040   +/-   ##
=======================================
  Coverage   93.61%   93.61%           
=======================================
  Files          39       39           
  Lines        5893     5893           
=======================================
  Hits         5517     5517           
  Misses        376      376           

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

# The solution can be visualised as in previous tutorials. Alternatively, we can use `tricontourf` which
# knows how to use DelaunayTriangulation.jl's `Triangulation`.
sol = evaluate_at_grid_nodes(dh, u, :u)
tricontourf(tri, sol)
Copy link
Member

Choose a reason for hiding this comment

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

IMHO it would be advantageous to plot with FerriteViz

Copy link
Author

Choose a reason for hiding this comment

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

I wanted to do that originally but didn't because it doesn't work on Ferrite master. I could dev in Ferrite-FEM/FerriteViz.jl#103 to make it work?

Copy link
Member

Choose a reason for hiding this comment

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

thats fine in my opinion but ping @KnutAM @termi-official @fredrikekre

Copy link
Member

Choose a reason for hiding this comment

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

Seems like a good idea to too!
The only downside I see, is that it requires that branch to be continuously kept up to date with Ferrite#master changes now in the time before releasing. But not sure how hard / much work that is?

Copy link
Member

Choose a reason for hiding this comment

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

I agree with Maxi, but let us do this after 1.0 release, so we can make a FerriteViz release instead of relying on me keeping the FerriteViz branch up to date.

Copy link
Author

@DanielVandH DanielVandH Aug 4, 2024

Choose a reason for hiding this comment

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

Keeping the branch up to date probably puts more work on you than is necessary. Another alternative is to just remove the visualisation step and simply note that it could be done, if you would rather drop the Makie usage (I could also remove triplot). I just thought of tricontourf since it is something that also works directly with DelaunayTriangulation.jl. I don't really mind what is done here.

Copy link
Author

Choose a reason for hiding this comment

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

Is there anything waiting on me here?

Copy link
Member

Choose a reason for hiding this comment

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

We need a few more days on our side and will report back afterwards. Trying to wrap up the Ferrite 1.0 release, so we can update the subsequent packages and merge PRs like this one here in order. Thanks again already for your work!

Copy link
Author

Choose a reason for hiding this comment

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

No worries at all, there's no rush. Was just checking in case you were waiting on me to do something 😅 Thanks

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.

Example integrating with DelaunayTriangulation.jl
4 participants