Gromacs  2027.0-dev-20261113-fb41eee
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::ForceBuffers Class Reference

#include <gromacs/mdtypes/forcebuffers.h>

Description

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 allocated 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, HostAllocationPolicy hostAllocationPolicy)
 Constructor, with options for using the MTS force buffer and the host allocation 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. 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...
 

Constructor & Destructor Documentation

gmx::ForceBuffers::ForceBuffers ( bool  useForceMtsCombined,
HostAllocationPolicy  hostAllocationPolicy 
)

Constructor, with options for using the MTS force buffer and the host allocation policy.

Parameters
[in]useForceMtsCombinedWhether to enable use of the forceMtsCombined buffer
[in]hostAllocationPolicyThe host allocation policy for the force (not MTS) buffer

Member Function Documentation

ForceBuffers & gmx::ForceBuffers::operator= ( ForceBuffers const &  o)
Initial value:
{ hostAllocationPolicy }),
forceMtsCombined_({}),
view_({}, {}, useForceMtsCombined),
useForceMtsCombined_(useForceMtsCombined)
{
}
ForceBuffers::~ForceBuffers() = default

Copy assignment operator.

Preserves the host-allocation pinning policy

PinningPolicy gmx::ForceBuffers::pinningPolicy ( ) const

Returns the active pinning policy.

Does not throw.


The documentation for this class was generated from the following files: