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

DoFHandlerPolicy: Avoid one write access to an array #14114

Merged
merged 1 commit into from Jul 19, 2022

Conversation

kronbichler
Copy link
Member

Apply a similar technique as in #14080: While computing the index offset for the parallel numbering, we do not yet need to set numbers. This can be done after the MPI_Exscan.

{
Assert(all_constrained_indices.size() == dim, ExcInternalError());

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did this check go away?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only reason we had a dim template argument and passed in a DoFHandler was to ensure this size. Now I changed this to not pass in the unnecessary DoFHandler argument. It felt silly to pass in dim instead just to get the assertion working. As this is an internal interface I can't see that this assertion would help in detecting some bugs. If you want, I can add the check at the place we call this function.

@bangerth
Copy link
Member

I might not have understood every detail of the patch, but this path is tested in many hundreds if not thousands of tests, so this must be correct to pass the CI suite.

@bangerth bangerth merged commit f9f5114 into dealii:master Jul 19, 2022
@kronbichler kronbichler deleted the dofh_minor_reorganization branch September 5, 2022 12:09
mkghadban pushed a commit to OpenFCST/dealii that referenced this pull request Sep 8, 2022
…ation

DoFHandlerPolicy: Avoid one write access to an array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants