Gromacs
2025-dev-20241002-88a4191
|
#include <gromacs/mdtypes/forcebuffers.h>
Object that holds the force buffers.
Contains a normal force buffer and optionally a force buffer for combined fast and slow forces for use with multiple time stepping. More buffers can be added when needed. Those should also be added to ForceBuffersView. The force buffer (not forceMtsCombined) can be pinned for efficient transfer to/from GPUs. All access happens through the ForceBuffersView object.
Public Member Functions | |
ForceBuffers () | |
Constructor, creates an empty force buffer with pinning not active and no MTS force buffer. | |
ForceBuffers (bool useForceMtsCombined, PinningPolicy pinningPolicy) | |
Constructor, with options for using the MTS force buffer and the pinning policy. More... | |
ForceBuffers (const ForceBuffers &o)=delete | |
Copy constructor deleted, but could be implemented. | |
ForceBuffers (ForceBuffers &&o)=delete | |
Move constructor deleted, but could be implemented. | |
ForceBuffers & | operator= (ForceBuffers const &o) |
Copy assignment operator, sets the pinning policy to CannotBePinned. More... | |
ForceBuffers & | operator= (ForceBuffers &&o)=delete |
Move assignment operator, deleted but could be implemented. | |
const ForceBuffersView & | view () const |
Returns a const view to the force buffers. | |
ForceBuffersView & | view () |
Returns a view to the force buffer. | |
void | resize (int numAtoms) |
Resize the force buffer. | |
PinningPolicy | pinningPolicy () const |
Returns the active pinning policy. More... | |
gmx::ForceBuffers::ForceBuffers | ( | bool | useForceMtsCombined, |
PinningPolicy | pinningPolicy | ||
) |
Constructor, with options for using the MTS force buffer and the pinning policy.
[in] | useForceMtsCombined | Whether to enable use of the forceMtsCombined buffer |
[in] | pinningPolicy | The pinning policy for the force (not MTS) buffer |
ForceBuffers & gmx::ForceBuffers::operator= | ( | ForceBuffers const & | o | ) |
Copy assignment operator, sets the pinning policy to CannotBePinned.
PinningPolicy gmx::ForceBuffers::pinningPolicy | ( | ) | const |
Returns the active pinning policy.
Does not throw.