Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions | Variables
grid.cpp File Reference
#include "gmxpre.h"
#include "grid.h"
#include <cmath>
#include <cstring>
#include <algorithm>
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/gmx_omp_nthreads.h"
#include "gromacs/mdlib/updategroupscog.h"
#include "gromacs/mdtypes/forcerec.h"
#include "gromacs/simd/simd.h"
#include "gromacs/simd/vector_operations.h"
#include "atomdata.h"
#include "boundingboxes.h"
#include "gridsetdata.h"
#include "nbnxm_geometry.h"
#include "pairlistparams.h"
+ Include dependency graph for grid.cpp:

Description

Implements the Grid class.

Author
Berk Hess hess@.nosp@m.kth..nosp@m.se

Functions

static real Nbnxm::gridAtomDensity (int numAtoms, const rvec lowerCorner, const rvec upperCorner)
 Returns the atom density (> 0) of a rectangular grid.
 
static void Nbnxm::sort_atoms (int dim, gmx_bool Backwards, int dd_zone, bool relevantAtomsAreWithinGridBounds, int *a, int n, gmx::ArrayRef< const gmx::RVec > x, real h0, real invh, int n_per_h, gmx::ArrayRef< int > sort)
 Sorts particle index a on coordinates x along dim. More...
 
static float Nbnxm::R2F_D (const float x)
 Returns x.
 
static float Nbnxm::R2F_U (const float x)
 Returns x.
 
static void Nbnxm::calc_bounding_box (int na, int stride, const real *x, BoundingBox *bb)
 Computes the bounding box for na coordinates in order x,y,z, bb order xyz0.
 
static void Nbnxm::calc_bounding_box_x_x4 (int na, const real *x, BoundingBox *bb)
 Computes the bounding box for na packed coordinates, bb order xyz0.
 
static void Nbnxm::calc_bounding_box_x_x8 (int na, const real *x, BoundingBox *bb)
 Computes the bounding box for na coordinates, bb order xyz0.
 
static void Nbnxm::calc_bounding_box_x_x4_halves (int na, const real *x, BoundingBox *bb, BoundingBox *bbj)
 Computes the bounding box for na packed coordinates, bb order xyz0.
 
static void Nbnxm::combine_bounding_box_pairs (const Grid &grid, gmx::ArrayRef< const BoundingBox > bb, gmx::ArrayRef< BoundingBox > bbj)
 Combines pairs of consecutive bounding boxes.
 
static void Nbnxm::print_bbsizes_simple (FILE *fp, const Grid &grid)
 Prints the average bb size, used for debug output.
 
static void Nbnxm::print_bbsizes_supersub (FILE *fp, const Grid &grid)
 Prints the average bb size, used for debug output.
 
static void Nbnxm::sort_cluster_on_flag (int numAtomsInCluster, int atomStart, int atomEnd, const int *atinfo, gmx::ArrayRef< int > order, int *flags)
 Set non-bonded interaction flags for the current cluster. More...
 
static void Nbnxm::setCellAndAtomCount (gmx::ArrayRef< int > cell, int cellIndex, gmx::ArrayRef< int > cxy_na, int atomIndex)
 Sets the cell index in the cell array for atom atomIndex and increments the atom count for the grid column.
 
static void Nbnxm::resizeForNumberOfCells (const int numNbnxnAtoms, const int numAtomsMoved, GridSetData *gridSetData, nbnxn_atomdata_t *nbat)
 Resizes grid and atom data which depend on the number of cells.
 

Variables

static constexpr int Nbnxm::c_sortGridRatio = 4
 Ratio of grid cells to atoms.
 
static constexpr int Nbnxm::c_sortGridMaxSizeFactor = c_sortGridRatio + 1
 Maximum ratio of holes used, in the worst case all particles end up in the last hole and we need num. atoms extra holes at the end.