-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Adding NgonFace like types for volumetric elements (e.g. polyhedra) #217
Comments
Things are unfortunately a bit more complicated. We had something similar in an old Ferrite version and we moved away from this idea (see Ferrite-FEM/Ferrite.jl#679 and related discussions). Basically we had an element parametrized by the triplet (dimension, number of vertices, number of faces). Turns out this is already ambiguous. I think the simplest construction here is a quadrilateral vs bubble triangle. Both have 4 nodes. There are more subtle ones when it comes to nonlinear geometry, e.g. uniform spaces quadrilateral vs Lobatto quadrilateral. Our solution for now is basically to have one type per element. I also tried now multiple times to define something useful (see e.g. #161 and #204) but could not get something satisfactory for now. |
@termi-official thanks for the comment. I understand what you're saying. In what I propose |
I also think so, but I also cannot say with 100% confindence what the others think.
In my opinion this design is problematic, because users might think that they can write a function which specifically dispatches on e.g.
Totally agree. My point is that GeometryBasics.jl could rather provide an abstract interface which users can extend with their own geometry types rather than providing an exhaustive interface. But since you distinguish between polyhedron and n-hedron, what is the difference in definition for you? |
And I was wondering if this abstraction could be something like what I propose e.g.
Actually I do not distinguish between the two. An So could a type be added to GeometryBasics that is for polyhedra (any volumetric element) with N-points? And to let that be the abstraction that users build their things on? I would say that the type should say nothing about the face connectivity (that all depends as we've highlighted...) and in my opinion should not ship with "per element points" so to leave the actual coordinates out. I think this type is currently missing if I'm not mistaken, hence my Thanks for your replies here! |
@termi-official just updated my comment. I misread |
@termi-official if you are in agreement I can try to add this as a PR. I think the naming Would it be to add something like this? : abstract type AbstractPolyhedron{N,T} <: StaticVector{N,T} end
abstract type AbstractNhedron{N,T} <: AbstractPolyhedron{N,T} end
@fixed_vector Nhedron = AbstractNhedron |
This is a feature request. I am interested in using GeometryBasics in combination with volumetric meshing for finite element analysis, which features tetra-, hexa-, pentahedral elements for instance (both linear and higher order variants). I know there is some volumetric element stuff there in GeometryBasics, however unless I am mistaken they all "come with the points" e.g.
P
here:In addition, I think it would be useful to have a polyhedron description where the points and point indices are separate. It would be great to have something equivalent to
NgonFace
but for polyhedra. Therefore I proposeNhedraElement
* and perhaps it can be achieved by adding something like this (which I believe is fully in line with howNgonFace
is defined:Next we can define useful aliases, e.g. similar to
TriangleFace
orQuadFace
. In the same vein one could proposeTetrahedronElement
andHexahedronElement
. However I am proposing the shortertet4
andhex8
(although I could also just implement them as aliases):I am partial to, but not hung up on, these names. However I choose them in anticipation of support for higher-order finite elements (which may also feature mid-edge and mid-face points) e.g. something like:
Let me know if this is of interest, I'm relatively new to Julia but I'd be happy to try add it and submit a PR.
*In an
NgonFace
theN
should formally stand for the number of edges but it happens to be equal also to the number of points, certainly, functionally the code treats it as the latter. For theNhedraElement
I propose it would be for the number of points (as the number of faces can be and often is different). The mathematical purist may feel upset though thatN
does not stand for the number of faces, however functionally, like withNgonFace
theN
really relates to the number of points we have to account for, so I'd be happy with this naming convention.I'd also be interested to see what @fverdugo @santiagobadia @termi-official @fredrikekre @KristofferC feel about the above. They may have "baked their own cookies" over at their respective finite element related packages, but may still be able to offer insight in what they would ideally like to see on this in GeometryBasics.
The text was updated successfully, but these errors were encountered: