-
Notifications
You must be signed in to change notification settings - Fork 78
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
On loadBalance(...) "addCornerCells" should be called "addEdgeCells"? #808
base: master
Are you sure you want to change the base?
Conversation
jenkins build this serial please |
3a776e7
to
71f3c18
Compare
jenkins build this serial please |
71f3c18
to
7916b3d
Compare
jenkins build this serial please |
7916b3d
to
07c812d
Compare
jenkins build this serial please |
which in particular means that cells that share corners or edges (and not faces) with interior cells are not considered/ | ||
seen by the process. Therefore, depending how the LGRs are distributed, there may be "multiple ids" for the same points.*/ | ||
seen by the process. Therefore, depending how the LGRs are distributed, there may be "multiple ids" for the same points. | ||
To achieve unique point global ids, IN SOME CASES, we invoke loanBalance( parts, false, true) where parts determines |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: loadBalance
for (int rank = 0; rank < 4; ++rank) { | ||
for (const auto& elemIdx : cells_per_rank[rank]) { | ||
parts[elemIdx] = rank; | ||
} | ||
} | ||
if(grid.comm().size()>1) | ||
{ | ||
grid.loadBalance(parts); | ||
grid.loadBalance(parts); // ownerFirst = false, addCornerCells = false, overlapLayerSize =1 | ||
// IT's not necessary to change the default values since the LGRs are fully interior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: It
@@ -397,9 +397,12 @@ void refinePatch_and_check(Dune::CpGrid& coarse_grid, | |||
BOOST_CHECK( static_cast<int>(allGlobalIds_cells.size()) == global_cells_count); | |||
BOOST_CHECK( allGlobalIds_cells.size() == allGlobalIds_cells_set.size() ); | |||
|
|||
/** [Bug] Uniqueness of point global ids cannot be checked in general since current code sets overlap layer size equal to 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did I get that right?
We call grid.loadBalance(parts, false, true) with addCornerCells = true to get unique IDs, correct?
Can you add that to the explanation here?
Otherwise I'd merge this PR :)
Only minor changes in the documentation 👍 |
In an attempt to assign unique point ids on a distributed grid with LGRs, I invoked loadBalance, enabling the inclusion of cells that share corners with interior cells on each process by setting addCornerCells = true (one of the function arguments in loadBalance). However, instead of adding corner-sharing cells, this configuration primarily adds cells that share edges, in addition to the overlap layer of size 1. As a result, cells that share only a corner are not included, which can impact the uniqueness of point ids in certain cases.
In the test addLgrsOnDistributedGrid_test.cpp, both escenarios are included:
cases where setting addCornerCells=true fix the issue of unique point ids
cases where setting addCornerCells=true is not enough to achieve unique point ids (cells that share only corners - and not edges - are not included).
Not relevant for the Reference Manual.
Replacement for #806