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

Overlap layer size 1 affects uniqueness of point global ids for CpGrid with LGRs #804

Open
aritorto opened this issue Nov 26, 2024 · 3 comments

Comments

@aritorto
Copy link
Member

aritorto commented Nov 26, 2024

When a CpGrid gets distributed, the overlap layer size is set to 1. In particular, cells that share only corners or edges (and do not share faces) with interior cells are not seen by the process, i.e., are not part of the overlap layer.

A few PRs (#802 and #803) intend to support adding LGRs on a distributed grid. This includes the definition/assignment of new ids for refined cells and points. We expect ids to be unique across all processes and to have only one id per Entity (cell or point). Unfortunately, uniqueness for point ids is not achievable and the reason behind that is the size of the overlap layer (equal to 1, considering only cells that share a face with an interior cell, but not only points/edges).

In #802, in addLgrsOnDistributedGrid_test.cpp there are many examples to illustrate this situation.

Do we want to modify the size of the overlap layer? In general? Only if LGRs are involved? Or should we move forward without unique point ids "in some cases"?

Calling loadBalance with addCornerCells = true solves the issue in SOME cases. See #806

@aritorto aritorto changed the title Overlap layer size 1 affect uniqueness of point global ids for CpGrid with LGRs Overlap layer size 1 affects uniqueness of point global ids for CpGrid with LGRs Nov 26, 2024
@atgeirr
Copy link
Member

atgeirr commented Nov 28, 2024

Do we want to modify the size of the overlap layer? In general? Only if LGRs are involved? >Or should we move forward without unique point ids "in some cases"?

Increasing the (default) size of the overlap layer would be a quite big change, and bring performance penalties. But the code should be able to cope with a larger overlap without any other consequences, so it may be good to investigate this.

@hnil I think you looked at this recently, what is your opinion?

@aritorto
Copy link
Member Author

Thanks @atgeirr for your comment! I agree on not changing the default. Maybe extending the functionality to also include cells that share only corners (not edges/faces) too, for cases when this is extremely important. Keeping the default and the performance on place when it's not.

@hnil
Copy link
Member

hnil commented Dec 19, 2024

I think that we should have option for overlap + add corner nodes. (This is included in one pull request regarding work on geomechancis). I think all node information should be correct also with global ids.

It seems more consistent that cells which is neighbor to nodes(end edge) which is part of an internal cell should be included in the partition. There exist other methods, but then node based discretization can assemble the full row of a matrix without communication.

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

No branches or pull requests

3 participants