Template Class CellListsContainer#

Class Documentation#

template<size_t ndim>
class CellListsContainer#

container for the cell lists

Public Functions

inline CellListsContainer(const std::vector<size_t> subdom_ncells)#
inline void reset()#

reset all data in the vectors

inline void add_atom_to_cell(
const size_t iatom,
const size_t icell,
const size_t isubdom
)#

add an atom to a cell

inline void remove_atom_from_cell_ind(
const size_t index,
const size_t icell,
const size_t isubdom
)#

remove an atom from a cell using its index within that cell

inline void remove_atom_from_cell(
const size_t iatom,
const size_t icell,
const size_t isubdom
)#

remove an atom from a cell

Public Members

std::vector<std::vector<cell_t>> m_cell_atoms#

m_cell_atoms is a vector of vectors with vectors of atom indices.

The uppermost layer corresponds to different subdomains (each subdomain belongs to one OMP thread). The second layer corresponds to the cells belonging to each thread. The last layer contains all atoms in the corresponding cell.

std::vector<std::vector<std::array<cell_t*, 2>>> m_cell_neighbor_pairs_inner#

vectors of pairs of neighboring cells inside each subdomain

std::vector<std::vector<std::array<cell_t*, 2>>> m_cell_neighbor_pairs_boundary#

vectors of pairs of neighboring cells between subdomains

std::vector<std::vector<cell_t*>> m_cell_neighbors#

vectors of neighboring cells for each cell

Protected Functions

inline void setup_cells(
const size_t nsubdoms,
const std::vector<size_t> subdom_ncells
)#

Construct m_cell_atoms for each subdomain.