Subdomain Management #1129
Replies: 2 comments 1 reply
-
Just adding it here regarding the sets, one idea I had (not sure if it is good but putting it here anyway) to allow easier extension if more metadata would be desired to add to the grid would be to slim the grid even more, and have struct Grid{sdim, T, CT, MD}
nodes::Nodes{sdim, T}
cells::Vector{CT}
metadata::MD # Or something else more specific name perhaps
end
const GS{T} = Dict{String, OrderedSet{T}} where T # Just to abbreviate below
struct GridSets # Default metadata
facetsets::GS{FacetIndex}
vertexsets::GS{VertexIndex}
cellsets::GS{Int}
end |
Beta Was this translation helpful? Give feedback.
-
I think @kimauth did quite a lot of benchmarking before deciding to not go for the |
Beta Was this translation helpful? Give feedback.
-
I think it can be advantageous to expand on the subdomain API for grids in Ferrite.
I currently see two major issues with the current API:
First, we are currently not having a way to mark ridges (or edges in 3D). They become relevant for more specialized problems (e.g. when the weak form includes integrals over edges for some 3D cells). It is kinda weird that users should declare their
GridWithRidgeset <: AbstractGrid
, which does the same plus the single additional field.Second, we recommend for the assembly to iterate over subdofhandlers/facetset. Subdofhandlers need to have a single reference shape. Physical subdomains can have a mixture of elements (e.g. quads and triangles). This creates two issues with the current way of handling subdomains: a) There is a possible performance hit associated with this for some problems, which we should be aware of and b) there is a disconnect between the sets in the grid and the recommended way to iterate over them. Especially for FaceIterator to work on grids with mixed elements (or containing elements with mixed face types) we should at least provide some kind of utils for users.
Beta Was this translation helpful? Give feedback.
All reactions