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

Fix renumbering in parallel for hp. #7185

Merged
merged 3 commits into from Sep 21, 2018
Merged

Fix renumbering in parallel for hp. #7185

merged 3 commits into from Sep 21, 2018

Conversation

bangerth
Copy link
Member

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().

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().
@bangerth
Copy link
Member Author

@marcfehling -- FYI.

In pursuit of #3511.

@bangerth
Copy link
Member Author

/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.

Copy link
Member

@drwells drwells left a 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?

@bangerth
Copy link
Member Author

I've pushed another commit that renames the indices variable. It's not necessarily the "locally owned dofs" but just "indices we care about" in that function, we that's how I named these variables.

@bangerth
Copy link
Member Author

Ping?

@drwells
Copy link
Member

drwells commented Sep 21, 2018

No one else has commented so lets merge.

@drwells drwells merged commit aafe5fe into dealii:master Sep 21, 2018
@bangerth bangerth deleted the assert branch September 21, 2018 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants