#include <cell_lists.h>
Public Member Functions | |
CellListsLoop (visitor_t &visitor, CellListsContainer const &container) | |
void | loop_through_atom_pairs () |
Protected Attributes | |
visitor_t & | m_visitor |
pele::Array< long > const | m_ll |
pele::Array< long > const | m_hoc |
std::vector< std::pair< size_t, size_t > > const & | m_cell_neighbor_pairs |
this does the looping over atom pairs within the cell lists framework.
This uses the visitor design pattern, in the same way that the Boost graph uses visitors for, e.g., breadth_first_search. http://www.boost.org/doc/libs/1_56_0/boost/graph/breadth_first_search.hpp
The visitor is called for every pair of atoms in the system. It is meant to be used for, e.g. accumulating the energy or the gradient.
We use a template rather than an interface because the visitor will be called many times over a short period and the additional overhead of an interface might be a problem.
Definition at line 154 of file cell_lists.h.
pele::CellListsLoop< visitor_t >::CellListsLoop | ( | visitor_t & | visitor, |
CellListsContainer const & | container | ||
) | [inline] |
Definition at line 162 of file cell_lists.h.
void pele::CellListsLoop< visitor_t >::loop_through_atom_pairs | ( | ) | [inline] |
Definition at line 170 of file cell_lists.h.
std::vector<std::pair<size_t, size_t> > const& pele::CellListsLoop< visitor_t >::m_cell_neighbor_pairs [protected] |
Definition at line 159 of file cell_lists.h.
pele::Array<long> const pele::CellListsLoop< visitor_t >::m_hoc [protected] |
Definition at line 158 of file cell_lists.h.
pele::Array<long> const pele::CellListsLoop< visitor_t >::m_ll [protected] |
Definition at line 157 of file cell_lists.h.
visitor_t& pele::CellListsLoop< visitor_t >::m_visitor [protected] |
Definition at line 156 of file cell_lists.h.