-
Notifications
You must be signed in to change notification settings - Fork 9
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
1D Elements #41
Comments
Related to this and if I remember correctly, then quads and triangles in 3D also do not work yet. |
Maybe we should rearrange the plotter struct to hold sets of triangles and additionally sets of lines for e.g 1D elements, wireframes, streamlines and so on. This way we only have one point where we need to update lines to fix e.g. deformed domains. Should also fix #26 . |
I assume the MakiePlotter struct's definition is here, Lines 34 to 48 in 0eeec9a
and it looks like cells are triangulated and assembled here, Lines 63 to 82 in 0eeec9a
so maybe we could filter all line elements out of cells before they go into the triangulation loop, and apply some preprocessing? I'd be happy to do a first implementation (branched off from #103 of course) with some guidance from you all! |
Thanks for your interest on this Anshul! Happy to give you some guidance on this. You are right, we have the plotter struct, which acts essentially as a cache. This cache contains some kind of remeshing of the Ferrite mesh that is comaptible with Makie (to overcome the issue that GeometryBasics has no sane way to handle nonlinear geometries yet). My idea here was slightly different. In this loop we could just set ntriangles to 0 and also just do a no-op in the discretization function To render the lines we can then add an additional fields to the struct to track 1D elements separately as Makie.lines, analogue to the way we handle triangles. An alternative idea is that we can also mesh line elements as cylinder geometries with some associated thickness. I am open to experiment here. If 103 does not work, then I will find some time tomorrow to update it. This should be easy on my side. Out of interest, what is your application? Do you "just" want to plot some solution in 1D with a 1D discretization or is this one more about beams, wires, ... in 2D/3D? If you want to make the former work, then we can get away with something much simpler by "just" adding specialized dispatches for dim=1. |
Thanks for the advice! I'm primarily looking at 1D discretizations, but if I'm putting the effort in anyway, may as well write it for 2/3D too :D I'd lean towards the |
Sure, let us start there. :)
Note that we have a different approach. Instead of providing textures directly we discretize the geometry manually on our end and map colors to the vertices of the triangles. |
How to triangulate
Line
,Line2D
,Line3D
? Maybe justlines
from Makie? How to incorporate this properly? https://makie.juliaplots.org/stable/examples/plotting_functions/lines/#example_11610848752349455524The text was updated successfully, but these errors were encountered: