Gromacs  2021.2
 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 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.
 
ForceBuffersoperator= (ForceBuffers const &o)
 Copy assignment operator, sets the pinning policy to CannotBePinned. More...
 
ForceBuffersoperator= (ForceBuffers &&o)=delete
 Move assignment operator, deleted but could be implemented.
 
const ForceBuffersViewview () const
 Returns a const view to the force buffers.
 
ForceBuffersViewview ()
 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,
PinningPolicy  pinningPolicy 
)

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

Parameters
[in]useForceMtsCombinedWhether to enable use of the forceMtsCombined buffer
[in]pinningPolicyThe pinning policy for the force (not MTS) buffer

Member Function Documentation

ForceBuffers & gmx::ForceBuffers::operator= ( ForceBuffers const &  o)
Initial value:
forceMtsCombined_({}),
view_({}, {}, useForceMtsCombined),
useForceMtsCombined_(useForceMtsCombined)
{
}
ForceBuffers::~ForceBuffers() = default
PinningPolicy pinningPolicy() const
Returns the active pinning policy.
Definition: forcebuffers.cpp:79

Copy assignment operator, sets the pinning policy to CannotBePinned.

PinningPolicy gmx::ForceBuffers::pinningPolicy ( ) const

Returns the active pinning policy.

Does not throw.


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