Helper functions and type aliases for verlet lists cells. More...
Classes | |
struct | BaseStepOffsets |
Helper Struct to bundle all information about base step offsets. More... | |
Typedefs | |
template<class Particle_T > | |
using | AllCellsNeighborListsType = std::vector< std::vector< std::pair< Particle_T *, std::vector< Particle_T * > > > > |
Cell wise verlet lists for neighbors from all adjacent cells: For every cell, a vector of pairs. | |
template<class Particle_T > | |
using | PairwiseNeighborListsType = std::vector< std::vector< std::vector< std::pair< Particle_T *, std::vector< Particle_T * > > > > > |
Pairwise verlet lists: For every cell a vector, for every neighboring cell a vector of particle-neighborlist pairs. | |
Enumerations | |
enum class | VLCBuildType { aosBuild , soaBuild } |
Indicates which build functor should be used for the generation of the neighbor list. More... | |
Functions | |
size_t | estimateListLength (size_t numParticles, const std::array< double, 3 > &boxSize, double interactionLength, double correctionFactor) |
Simple heuristic to calculate the average number of particles per verlet list assuming particles are evenly distributed in the domain box. | |
std::vector< BaseStepOffsets > | buildC08BaseStep (const std::array< int, 3 > &cellsPerDim) |
Builds the list of offsets from the base cell for the c08 base step. | |
template<class Cells > | |
size_t | estimateNumLists (size_t baseCellIndex, bool useNewton3, const Cells &cells, const std::vector< BaseStepOffsets > &offsetsC08) |
Function to estimate the number of neighbor lists for one base step. | |
Helper functions and type aliases for verlet lists cells.
using autopas::VerletListsCellsHelpers::AllCellsNeighborListsType = typedef std::vector<std::vector<std::pair<Particle_T *, std::vector<Particle_T *> >> > |
Cell wise verlet lists for neighbors from all adjacent cells: For every cell, a vector of pairs.
Each pair maps a particle to a vector of its neighbors.
Particle_T |
using autopas::VerletListsCellsHelpers::PairwiseNeighborListsType = typedef std::vector<std::vector<std::vector<std::pair<Particle_T *, std::vector<Particle_T *> >> >> |
Pairwise verlet lists: For every cell a vector, for every neighboring cell a vector of particle-neighborlist pairs.
Each pair maps a particle to a vector of its neighbor particles. Cells<NeighboringCells<Particle,NeighborParticles>>
Particle_T |
|
strong |
Indicates which build functor should be used for the generation of the neighbor list.
To be passed to the generator functors in the neighbor lists.
std::vector< BaseStepOffsets > autopas::VerletListsCellsHelpers::buildC08BaseStep | ( | const std::array< int, 3 > & | cellsPerDim | ) |
Builds the list of offsets from the base cell for the c08 base step.
A offset pair are two cell indices relative to the base cell index that have to interact.
The third tuple entry is an estimation factor on the fraction of particles that will end up needing a neighbor list in the base cell. This depends on the relative position of the two cells: Whether they are the same, or share a face, edge, or corner.
cellsPerDim | Number of cells per dimension including halo. |
size_t autopas::VerletListsCellsHelpers::estimateListLength | ( | size_t | numParticles, |
const std::array< double, 3 > & | boxSize, | ||
double | interactionLength, | ||
double | correctionFactor | ||
) |
Simple heuristic to calculate the average number of particles per verlet list assuming particles are evenly distributed in the domain box.
numParticles | |
boxSize | Size of the simulation box. |
interactionLength | Cutoff + skin. |
correctionFactor | Correction factor multiplied with the result. |
size_t autopas::VerletListsCellsHelpers::estimateNumLists | ( | size_t | baseCellIndex, |
bool | useNewton3, | ||
const Cells & | cells, | ||
const std::vector< BaseStepOffsets > & | offsetsC08 | ||
) |
Function to estimate the number of neighbor lists for one base step.
Cells |
baseCellIndex | Cell index for which the estimate is made. |
useNewton3 | Whether or not the traversal that uses the lists employs Newton3. |
cells | Reference to the vector of cells. |
offsetsC08 | Vector of BaseStepOffsets. |