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

#include <gromacs/nbnxm/gridset.h>

Description

Holds a set of search grids for the local + non-local DD zones.

The are three different possible setups:

Classes

struct  DomainSetup
 Description of the domain setup: PBC and the connections between domains. More...
 

Public Member Functions

 GridSet (PbcType pbcType, bool doTestParticleInsertion, const IVec *numDDCells, const DomdecZones *ddZones, PairlistType pairlistType, bool haveFep, bool localAtomOrderMatchesNbnxmOrder, int numThreads, const HostAllocationPolicy &hostAllocationPolicy)
 Constructs a grid set for 1 or multiple DD zones, when numDDCells!=nullptr.
 
void putOnGrid (const matrix box, int gridIndex, const rvec lowerCorner, const rvec upperCorner, const UpdateGroupsCog *updateGroupsCog, Range< int > atomRange, int numAtomsWithoutFillers, real atomDensity, ArrayRef< const int32_t > atomInfo, ArrayRef< const RVec > x, const int *move, nbnxm_atomdata_t *nbat)
 Puts the atoms on the grid with index gridIndex and copies the coordinates to nbat.
 
void setNonLocalGrid (const int gridIndex, const int ddZone, const GridDimensions &gridDimensions, ArrayRef< const std::pair< int, int >> cells, ArrayRef< const int32_t > atomInfo, ArrayRef< const RVec > x, nbnxm_atomdata_t *nbat)
 
DomainSetup domainSetup () const
 Returns the domain setup.
 
bool localAtomOrderMatchesNbnxmOrder () const
 Returns whether the local atom order matches the NBNxM atom order.
 
int numGridAtomsLocal () const
 Returns the number of atoms in the local grid, including padding.
 
int numGridAtomsTotal () const
 Returns the total number of atoms in the grid set, including padding.
 
int numRealAtomsLocal () const
 Returns the number of local real atoms, i.e. without padded atoms.
 
int numRealAtomsTotal () const
 Returns the number of total real atoms, i.e. without padded atoms.
 
ArrayRef< const int > getLocalAtomorder () const
 Returns the atom order on the grid for the local atoms.
 
void setLocalAtomOrder ()
 Sets the order of the local atoms to the order grid atom ordering.
 
const Grid & grid (int gridIndex) const
 Return a single grid.
 
ArrayRef< const Grid > grids () const
 Returns the list of grids.
 
ArrayRef< const int > bins () const
 Returns the bin indices for all atoms, the bin indices number contiguously over all grids.
 
ArrayRef< const int > atomIndices () const
 Returns the grid atom indices covering all grids.
 
bool haveFep () const
 Returns whether we have perturbed non-bonded interactions.
 
void getBox (matrix box) const
 Returns the unit cell in box.
 
int numCellsMax () const
 Returns the maximum number of cells across all grids.
 
void setNumCellsMax (int numCellsMax)
 Sets the maximum number of cells across all grids.
 
ArrayRef< const int > getLocalGridNumAtomsPerCell () const
 Returns the number of atoms for each cell of the local grid.
 

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