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

Unique Entities #39

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

Unique Entities #39

wants to merge 3 commits into from

Conversation

termi-official
Copy link
Member

No description provided.

src/Entity.jl Outdated Show resolved Hide resolved
src/utils.jl Outdated Show resolved Hide resolved
src/utils.jl Outdated Show resolved Hide resolved
src/utils.jl Outdated Show resolved Hide resolved
@KnutAM
Copy link
Member

KnutAM commented May 21, 2024

Sorry, took some time before I had a look, just some thoughts...

  • Vertex, Edge, Face: I think these names would make sense to use in Ferrite for what is here called VertexRepresentation etc., since some places we dispatch on the tuple length to infer the entity, which is not very readable.
  • Would it make sense to replace the datatypes (e.g. current Vertex) containing Vector{VertexIndex} with a topology struct with a [Ordered]Dict{Vertex, Vector{VertexIndex}}? (either replacing the Matrix for <entity>_<entity>_neighbor in ExclusiveTopology or defining a different topology struct)
  • And then adding a topology struct giving information about entities shared with other nodes.

@termi-official
Copy link
Member Author

Sorry, took some time before I had a look, just some thoughts...

* `Vertex`, `Edge`, `Face`: I think these names would make sense to use in Ferrite for what is here called `VertexRepresentation` etc., since some places we dispatch on the tuple length to infer the entity, which is not very readable.

I mean we could rename these, but I designed them this way to differentiate between the pure identifier (*Representation) and the object containing the topology information. See below for more reasoning.

* Would it make sense to replace the datatypes (e.g. current `Vertex`) containing `Vector{VertexIndex}` with a topology struct with a `[Ordered]Dict{Vertex, Vector{VertexIndex}}`? (either replacing the `Matrix` for `<entity>_<entity>_neighbor` in `ExclusiveTopology` or defining a different topology struct)

* And then adding a topology struct giving information about entities shared with other nodes.

We could do this, but for me it does not make sense here. The topology is tightly tied to the distributed mesh data for 2 reasons. First, the mesh itself needs very specific topology information to build up the correct communication patterns (e.g. for distributed Dirichlet elimination) and second, there isn't a single algorithm which works without the distributed topology information. In this light I do not see the advantage of having a separate data type holding the topology information for distributed grids and passing in another argument into the algorithms.

For this reason most of the topology information for the distributed connectivity is directly stored in the shared entities, so we have very direct queries and do not need additional allocations as we would e.g. need when using the topology interface in Ferrite. Hence, for symmetry reasons, I also propose the Vertex, Edge and Face entities, which we could also use within Ferrite, in addition to the representations as tuples.

Does this explain it?

Co-authored-by: Maximilian Köhler <[email protected]>
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