You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In preparation for shared memory parallelism.
to thread might add forces/torques to the same particle at the same time. This would happen, for example, when calculating bonded forces in parallel.
Probably the easiest way to solve this is to only allow for atomic writes to the particle force/torque
Tentative steps
Add Functions add_force/torque(Vector3d), set_fprce/torque(Vector3d) to ParticleForce. Also only allow read access to torque/force via a function, returning a value rather than a reference.
Adapt access to the force/torque in Particle accordingly
Roll thouse out throughout ESPResSo where forces are accessed. Mainly the propagation schemes, LB Coupling, P3M
Make the data members of ParticleForce private
change the data type of the member variables to std::array<std::atomic,3>` and adapt the setters/adeders/getters to use store/fetch_add/load members of the std::atomic
The text was updated successfully, but these errors were encountered:
In preparation for shared memory parallelism.
to thread might add forces/torques to the same particle at the same time. This would happen, for example, when calculating bonded forces in parallel.
Probably the easiest way to solve this is to only allow for atomic writes to the particle force/torque
Tentative steps
add_force/torque(Vector3d)
,set_fprce/torque(Vector3d)
to ParticleForce. Also only allow read access to torque/force via a function, returning a value rather than a reference.Particle
accordinglyThe text was updated successfully, but these errors were encountered: