#include <LinkCells.h>
Public Member Functions | |
LinkCells (Communicator &comm) | |
void | addRequiredCells (const std::array< unsigned, 3 > &celn, unsigned &ncells_required, std::vector< unsigned > &cells_required) const |
Get the list of cells we need to surround the a particular cell. More... | |
void | buildCellLists (const std::vector< Vector > &pos, const std::vector< unsigned > &indices, const Pbc &pbc) |
Build the link cell lists. More... | |
unsigned | convertIndicesToIndex (const unsigned &nx, const unsigned &ny, const unsigned &nz) const |
Take three indices and return the index of the corresponding cell. More... | |
bool | enabled () const |
Have the link cells been enabled. More... | |
unsigned | findCell (const Vector &pos) const |
Find the cell index in which this position is contained. More... | |
std::array< unsigned, 3 > | findMyCell (const Vector &pos) const |
Find the cell in which this position is contained. More... | |
double | getCutoff () const |
Get the value of the cutoff. More... | |
unsigned | getNumberOfCells () const |
Get the total number of link cells. More... | |
void | retrieveAtomsInCells (const unsigned &ncells_required, const std::vector< unsigned > &cells_required, unsigned &natomsper, std::vector< unsigned > &atoms) const |
Retrieve the atoms in a list of cells. More... | |
void | retrieveNeighboringAtoms (const Vector &pos, std::vector< unsigned > &cell_list, unsigned &natomsper, std::vector< unsigned > &atoms) const |
Retrieve the atoms we need to consider. More... | |
void | setCutoff (const double &lcut) |
Set the value of the cutoff. More... | |
Private Attributes | |
std::vector< unsigned > | allcells |
The list of cells each atom is inside. More... | |
Communicator & | comm |
Symbolic link to plumed communicator. More... | |
bool | cutoffwasset |
Check that the link cells were set up correctly. More... | |
std::vector< unsigned > | lcell_lists |
The atoms ordered by link cells. More... | |
std::vector< unsigned > | lcell_starts |
The start of each block corresponding to each link cell. More... | |
std::vector< unsigned > | lcell_tots |
The number of atoms in each link cell. More... | |
double | link_cutoff |
The cutoff to use for the sizes of the cells. More... | |
Pbc | mypbc |
The pbc we are using for link cells. More... | |
std::vector< unsigned > | ncells |
The number of cells in each direction. More... | |
std::vector< unsigned > | nstride |
The number of cells to stride through to get the link cells. More... | |
A class for doing link cells
|
explicit |
void PLMD::LinkCells::addRequiredCells | ( | const std::array< unsigned, 3 > & | celn, |
unsigned & | ncells_required, | ||
std::vector< unsigned > & | cells_required | ||
) | const |
Get the list of cells we need to surround the a particular cell.
void PLMD::LinkCells::buildCellLists | ( | const std::vector< Vector > & | pos, |
const std::vector< unsigned > & | indices, | ||
const Pbc & | pbc | ||
) |
Build the link cell lists.
unsigned PLMD::LinkCells::convertIndicesToIndex | ( | const unsigned & | nx, |
const unsigned & | ny, | ||
const unsigned & | nz | ||
) | const |
Take three indices and return the index of the corresponding cell.
|
inline |
Have the link cells been enabled.
unsigned PLMD::LinkCells::findCell | ( | const Vector & | pos | ) | const |
Find the cell index in which this position is contained.
std::array< unsigned, 3 > PLMD::LinkCells::findMyCell | ( | const Vector & | pos | ) | const |
Find the cell in which this position is contained.
double PLMD::LinkCells::getCutoff | ( | ) | const |
Get the value of the cutoff.
|
inline |
Get the total number of link cells.
void PLMD::LinkCells::retrieveAtomsInCells | ( | const unsigned & | ncells_required, |
const std::vector< unsigned > & | cells_required, | ||
unsigned & | natomsper, | ||
std::vector< unsigned > & | atoms | ||
) | const |
Retrieve the atoms in a list of cells.
void PLMD::LinkCells::retrieveNeighboringAtoms | ( | const Vector & | pos, |
std::vector< unsigned > & | cell_list, | ||
unsigned & | natomsper, | ||
std::vector< unsigned > & | atoms | ||
) | const |
Retrieve the atoms we need to consider.
void PLMD::LinkCells::setCutoff | ( | const double & | lcut | ) |
Set the value of the cutoff.
|
private |
The list of cells each atom is inside.
|
private |
Symbolic link to plumed communicator.
|
private |
Check that the link cells were set up correctly.
|
private |
The atoms ordered by link cells.
|
private |
The start of each block corresponding to each link cell.
|
private |
The number of atoms in each link cell.
|
private |
The cutoff to use for the sizes of the cells.
|
private |
The pbc we are using for link cells.
|
private |
The number of cells in each direction.
|
private |
The number of cells to stride through to get the link cells.
Hosted by GitHub | 1.8.17 |