Implement replicas and dipole field tracking to DipolarDirectSumGpu - #5094
Merged
jngrad merged 20 commits intoOct 10, 2025
Conversation
Contributor
Author
|
Commit 793faaf solves Issue #5095.
|
stekajack
marked this pull request as ready for review
June 11, 2025 08:16
Contributor
Author
|
Notes for improvement:
|
…s_gpu_replica_field_tracking
stekajack
commented
Aug 4, 2025
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.
Dipole Field Tracking & Replica Support for DipolarDirectSumGpu
Summary
This pull request introduces GPU support for dipole field tracking in the DipolarDirectSumGpu class, and adds a parameter to control the number of replicas for the GPU-based dipolar direct sum method. The changes improve consistency between CPU and GPU implementations. Replicas offset the limitations inherent to the minimal image convention typically used with direct summation. This is a very "brute force" approach, but it works and is fast on modern GPUs.
Particularly useful if one wants to dynamically update the dipoles on particles in a way that modifies the magnitude (would trip up p3m for example)
Changes
Notes
-The GPU dipole field tracking implementation is inconsistent the CPU implementation.
-The GPU implementation piggybacks on the force calculation.
-The corresponding observable implementation is missing.
-I am of the oppinion that CPU path has to be refractured. The current implementation is not optimal and would force us to make difficult choices to bring the rest of the actors to feature parity.