#include <gromacs/mdlib/lincs_gpu.h>
Class with interfaces and data for GPU version of LINCS.
|
| LincsGpu (int numIterations, int expansionOrder, const DeviceContext &deviceContext, const DeviceStream &deviceStream) |
| Constructor. More...
|
|
| ~LincsGpu () |
| Destructor.
|
|
void | apply (const DeviceBuffer< Float3 > &d_x, DeviceBuffer< Float3 > d_xp, bool updateVelocities, DeviceBuffer< Float3 > d_v, real invdt, bool computeVirial, tensor virialScaled, const PbcAiuc &pbcAiuc) |
| Apply LINCS. More...
|
|
void | set (const InteractionDefinitions &idef, int numAtoms, ArrayRef< const real > invmass) |
| Update data-structures (e.g. after NB search step). More...
|
|
gmx::LincsGpu::LincsGpu |
( |
int |
numIterations, |
|
|
int |
expansionOrder, |
|
|
const DeviceContext & |
deviceContext, |
|
|
const DeviceStream & |
deviceStream |
|
) |
| |
Constructor.
- Parameters
-
[in] | numIterations | Number of iteration for the correction of the projection. |
[in] | expansionOrder | Order of the matrix inversion algorithm. |
[in] | deviceContext | Device context (dummy in CUDA). |
[in] | deviceStream | Device command stream. |
Apply LINCS.
Applies LINCS to coordinates and velocities, stored on GPU. The results are not automatically copied back to the CPU memory. Method uses this class data structures which should be updated when needed using set() method.
- Parameters
-
[in] | d_x | Coordinates before timestep (in GPU memory) |
[in,out] | d_xp | Coordinates after timestep (in GPU memory). The resulting constrained coordinates will be saved here. |
[in] | updateVelocities | If the velocities should be updated. |
[in,out] | d_v | Velocities to update (in GPU memory, can be nullptr if not updated) |
[in] | invdt | Reciprocal timestep (to scale Lagrange multipliers when velocities are updated) |
[in] | computeVirial | If virial should be updated. |
[in,out] | virialScaled | Scaled virial tensor to be updated. |
[in] | pbcAiuc | PBC data. |
bool gmx::LincsGpu::isNumCoupledConstraintsSupported |
( |
const gmx_mtop_t & |
mtop | ) |
|
|
static |
Returns whether the maximum number of coupled constraints is supported by the GPU LINCS code.
- Parameters
-
[in] | mtop | The molecular topology |
void gmx::LincsGpu::set |
( |
const InteractionDefinitions & |
idef, |
|
|
int |
numAtoms, |
|
|
ArrayRef< const real > |
invmass |
|
) |
| |
Update data-structures (e.g. after NB search step).
Updates the constraints data and copies it to the GPU. Should be called if the particles were sorted, redistributed between domains, etc. This version uses common data formats so it can be called from anywhere in the code. Does not recycle the data preparation routines from the CPU version. Works only with simple case when all the constraints in idef are are handled by a single GPU. Triangles are not handled as special case.
Information about constraints is taken from: idef.il[F_CONSTR].iatoms — type (T) of constraint and two atom indexes (i1, i2) idef.iparams[T].constr.dA — target length for constraint of type T
- Parameters
-
[in] | idef | Local topology data to get information on constraints from. |
[in] | numAtoms | Number of atoms. |
[in] | invmass | Inverse masses of atoms. |
The documentation for this class was generated from the following files: