-
Notifications
You must be signed in to change notification settings - Fork 707
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
Add utility function returning point indices which are not found #15319
Draft
jh66637
wants to merge
1
commit into
dealii:master
Choose a base branch
from
jh66637:points_not_found
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 must admit I am not particular fond of this new function, since I don't know how it simplifies user code (as you also indicated in your comment #15248 (comment)).
The use case as far as I read is (with the new function):
and with old functionalities
The new implementation does not really reduce the number of lines in user code, does it?
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.
It's OK for me to drop this. Since I have been working with
RPE
quite much, I just thought I give #15248 a try. Let's wait for @nfehn to confirm this is not as helpful as intended, then we can close this PR and the linked issue, since there is no way to hand back astd::vector<Point<dim>>
because this information is simply not known inRPE
.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 guess the second code variant termed "old functionalities" has forgotten a
not
/!
? Avoiding negations in user code is always good in my opinion.I definitely see value in functions like
Why should one write 3 lines of code in potentially many user codes at many places. This is a potential source of error, as the above code example #15319 (comment) shows.
From a design perspective, it is problematic in both code examples that the index handling is done in user code. What if the points vector is manipulated in between? In my opinion, the single-responsibility design principle would call for having all parameters involved in a single function call to RPE. The current design also causes additional documentation effort, see https://dealii.org/current/doxygen/deal.II/classUtilities_1_1MPI_1_1RemotePointEvaluation.html#ad2e596c946ea413c48e04fa9143b01d2.
For these reasons, it would be natural to either store the points in RPE, or to let the setup function return
points_not_found
information (to be used by the user or not). I am thinking ofSuccess/failure data could be a bool all_points_found, a list of indices or points, etc., to be discussed ...
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 don't think we should internally store data which is not needed in the class, but we could introduce
reinit_and_get_not_found_points()
in addition toreinit()
.@peterrum Any objections?
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.
Are there any other opinions on this?