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
Fix renumbering in parallel for hp. #7185
Conversation
When renumbering in parallel, the input are the new indices for all locally owned DoFs on the current process. This means that we need to be careful when we set new DoFs to only touch those DoF indices that we actually own -- not doing so yields invalid accesses that current abort the program. The first part of the patch is therefore to only touch DoFs for which we really know that we have a valid new index; for all others, we need to set the index to numbers::invalid_dof_index for the moment. The second part is that we need to merge/unify DoF indices for adjacent pairs of finite elements where the DoF on one side may be unified with one on the neighboring cell. Because the current cell may be locally owned but the neighboring cell be a ghost cell, the right time to do this unification is between the two exchange phases on ghost cells. This is indeed the same place where the unification also happens on during the initial enumeration process in distribute_dofs().
@marcfehling -- FYI. In pursuit of #3511. |
/run-tests I'll run the tester, but I suspect that the test is not actually triggered on the testers. This passed the testsuite for me. |
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.
This looks good to me. I think it would be easier to read, though, if indices
was named locally_owned_dofs
instead. Would you mind renaming it as such?
I've pushed another commit that renames the |
Ping? |
No one else has commented so lets merge. |
When renumbering in parallel, the input are the new indices for
all locally owned DoFs on the current process. This means that we
need to be careful when we set new DoFs to only touch those DoF
indices that we actually own -- not doing so yields invalid
accesses that current abort the program.
The first part of the patch is therefore to only touch DoFs for
which we really know that we have a valid new index; for all
others, we need to set the index to numbers::invalid_dof_index
for the moment.
The second part is that we need to merge/unify DoF indices for
adjacent pairs of finite elements where the DoF on one side
may be unified with one on the neighboring cell. Because the
current cell may be locally owned but the neighboring cell be
a ghost cell, the right time to do this unification is between
the two exchange phases on ghost cells. This is indeed the
same place where the unification also happens on during the
initial enumeration process in distribute_dofs().