[Proof of Concept] Performance comparison with DualSPHysics - #1265
Draft
efaulhaber wants to merge 56 commits into
Draft
[Proof of Concept] Performance comparison with DualSPHysics#1265efaulhaber wants to merge 56 commits into
efaulhaber wants to merge 56 commits into
Conversation
This was referenced Aug 8, 2026
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.
Based on #1147, #1211 and #1264. Needs to be used together with trixi-framework/PointNeighbors.jl#167.
This PR adds
SymplecticPositionVerletWithSortingthat is the same asSymplecticPositionVerlet, but sorts particles before every single RHS call. This is necessary to use the algorithm of DualSPHysics. Note that I did not implement the fast GPU sorting that they have, so that we can benchmark the interactions kernel but not the total runtime, as the sorting will now use most runtime.interact!function that implements the algorithm used by DualSPHysics to benchmark in a hardcoded custom kernel to benchmark the fluid-fluid interaction with the same algorithm.interact!function that also implements the same algorithm, but wrapped in our user-friendly API. This version trades a bit of raw performance for better readability.Run the benchmark with
Here is a timer output on an RTX A4500 (with a different dt and tspan though):
and DualSPHysics on the same card:
So that is 161s for forces/interactions in TrixiParticles and 160s in DualSPHysics.
Here are some more average interaction runtimes (lower is better!):
And total runtimes: