Conversation
|
✅ Linter reported no issues All Python files are correctly formatted with Black. |
|
✅ Linter reported no issues All C/C++ files are correctly formatted with clang-format. |
RaulPPelaez
reviewed
Mar 7, 2026
RaulPPelaez
reviewed
Mar 7, 2026
RaulPPelaez
reviewed
Mar 7, 2026
Contributor
Is that computing the sum with a parallel reduction or just sequential summing? The parallel version might be more precise. A quick and dirty check would be to accumulate using double (you can use thrust::transform_reduce). You can compute the absolute sum by using a single transform_reduce by transforming the real3 forces into a vec4 (fx,fy,fz, abs(fx)+abs(fy)+abs(fz)) and accumulating that. |
RaulPPelaez
approved these changes
Apr 1, 2026
Contributor
|
LGTM, feel free to merge |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is for the error checking for DPStokes open that we talked about. I'm leaving it as a draft currently since I'm still unsure about the tolerances.
Madison has a case for bending forces on a membrane where I recall the absolute sum being ~1e5 but the (signed) sum being ~1e-2 or 1e-3. This is kinda small and seems like it should be acceptable, but overall not that small numerically. I'm asking for the exact values to decide.
@RaulPPelaez @brennansprinkle how do you think we should set the tolerance for when DPStokes throws an error? The most sound way to be seems to be setting it relative to the absolute mean, i.e.
where$\epsilon$ could seemingly be set pretty small, maybe at least $10^{-4}$ , based on Madison's case. However, I think this would require an extra reduction per call to
Mdotwhich might get expensive. We could alternatively set it conservatively based on the signed sum, and just informing users with cases like this to enable the unsafe flag.Closes #78