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
Early deprecate functions in DoFTools #13365
Conversation
6d7d5e3
to
89754f6
Compare
89754f6
to
16238c7
Compare
I am not particularly happy about the incompatibility caused by this change. Even though this is only an early deprecation, we will soon get tons of warnings and then error for almost every single deal.II program that uses MPI. I see the point in terms of some other functions in |
16238c7
to
96b1c60
Compare
I have dropped the pragma but would suggest to keep the comment regarding deprecation. Is that fine? |
stokes_relevant_set = | ||
DoFTools::extract_locally_relevant_dofs(stokes_dof_handler); |
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.
I think in this place the regular RVO will probably not help the change will give rise to (very slightly) slower code than we had before, as we need to call the operator=
here from the temporary object. This is different from the case in step-18
you made above where RVO eliminates the copy (on sane compilers).
I think this is justified for a cheap object like IndexSet
given the interface uniformity it brings us. Furthermore, I believe we should at some point make the locally_relevant_dofs
a member variable of the DoFHandler
, given how often we set up and use these objects and how little memory they consume in the grand scheme of things. Then this gets even more clear that we should do it. But I do not think the case is necessarily as low for all functions that merely fill something, so we might need to make a case-by-case decision.
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.
See also #11896.
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.
Separately, the cost of the move assignment is surely immeasurable compared to the cost of building the object. I'm very much in favor of the new interface.
Yes, nice. I like these functions a lot better and had wanted to make this change myself for a long time. Thanks for beating me to it! |
... many functions already return the
IndexSet
s directly.