30template <
class ParticleCell>
32 const std::array<unsigned long, 3> &cellsPerDimension,
33 const std::array<unsigned long, 3> &lowerCorner,
34 const std::array<unsigned long, 3> &upperCorner) {
35 unsigned long sum = 0;
36 for (
unsigned long x = lowerCorner[0]; x <= upperCorner[0]; x++) {
37 for (
unsigned long y = lowerCorner[1]; y <= upperCorner[1]; y++) {
38 for (
unsigned long z = lowerCorner[2]; z <= upperCorner[2]; z++) {
55template <
class Particle_T>
58 unsigned long cellIndex) {
59 unsigned long cellLoad = 0;
60 for (
auto &list : neighborLists[cellIndex]) {
61 cellLoad += list.second.size();
74template <
class Particle_T>
77 unsigned long cellIndex) {
78 unsigned long cellLoad = 0;
79 for (
auto &list : neighborLists[cellIndex]) {
80 for (
size_t index = 0; index < list.size(); index++) {
81 cellLoad += list[index].second.size();
97template <
class Particle_T,
class NeighborList>
98unsigned long neighborListLength(NeighborList &neighborLists,
const std::array<unsigned long, 3> &cellsPerDimension,
99 const std::array<unsigned long, 3> &lowerCorner,
100 const std::array<unsigned long, 3> &upperCorner) {
101 auto &internalList = neighborLists.getAoSNeighborList();
102 unsigned long sum = 0;
103 for (
unsigned long x = lowerCorner[0]; x <= upperCorner[0]; x++) {
104 for (
unsigned long y = lowerCorner[1]; y <= upperCorner[1]; y++) {
105 for (
unsigned long z = lowerCorner[2]; z <= upperCorner[2]; z++) {
107 sum += neighborListLengthImpl<Particle_T>(internalList, cellIndex);
std::vector< std::vector< std::pair< Particle_T *, std::vector< Particle_T * > > > > AllCellsNeighborListsType
Cell wise verlet lists for neighbors from all adjacent cells: For every cell, a vector of pairs.
Definition: VerletListsCellsHelpers.h:27
std::vector< std::vector< std::vector< std::pair< Particle_T *, std::vector< Particle_T * > > > > > PairwiseNeighborListsType
Pairwise verlet lists: For every cell a vector, for every neighboring cell a vector of particle-neigh...
Definition: VerletListsCellsHelpers.h:38
Collection of functions for estimating the load required to update a specific region within a contain...
Definition: CompatibleLoadEstimators.h:21
unsigned long neighborListLength(NeighborList &neighborLists, const std::array< unsigned long, 3 > &cellsPerDimension, const std::array< unsigned long, 3 > &lowerCorner, const std::array< unsigned long, 3 > &upperCorner)
Sums up the lengths of the verlet neighbor lists of all particles within region.
Definition: LoadEstimators.h:98
unsigned long squaredParticlesPerCell(const std::vector< ParticleCell > &cells, const std::array< unsigned long, 3 > &cellsPerDimension, const std::array< unsigned long, 3 > &lowerCorner, const std::array< unsigned long, 3 > &upperCorner)
Sums up the squared number of particles for all cells within region.
Definition: LoadEstimators.h:31
unsigned long neighborListLengthImpl(const typename autopas::VerletListsCellsHelpers::AllCellsNeighborListsType< Particle_T > &neighborLists, unsigned long cellIndex)
Helper function for calculating the neighbor list length for the Verlet lists cells neighbor list.
Definition: LoadEstimators.h:56
constexpr T threeToOneD(T x, T y, T z, const std::array< T, 3 > &dims)
Convert a 3d index to a 1d index.
Definition: ThreeDimensionalMapping.h:29