/* * Setup cell list for use. */ void Generator::setupCellList(int atomCapacity, Boundary& boundary, const DArray<double>& diameters, CellList& cellList) { // Set maximum atom id = atomCapacity - 1, and allocate // arrays in cellList that are indexed by atom id cellList.setAtomCapacity(atomCapacity); // Compute maximum exclusion diameter double maxDiameter = 0.0; for (int iType = 0; iType < diameters.capacity(); iType++) { if (diameters[iType] > maxDiameter) { maxDiameter = diameters[iType]; } } // Setup grid of empty cells cellList.setup(boundary, maxDiameter); }