11#include "autopas/containers/linkedCells/LinkedCellsReferences.h"
30template <
class Particle_T>
43template <
class Particle_T>
46 const auto &boxMin = containerInfo.
boxMin;
47 const auto &boxMax = containerInfo.
boxMax;
48 const auto &cutoff = containerInfo.
cutoff;
49 const auto &verletSkin = containerInfo.
verletSkin;
55 std::unique_ptr<ParticleContainerInterface<Particle_T>> container;
56 switch (containerChoice) {
57 case ContainerOption::directSum: {
58 container = std::make_unique<DirectSum<Particle_T>>(boxMin, boxMax, cutoff, verletSkin, sortingThreshold);
62 case ContainerOption::linkedCells: {
63 container = std::make_unique<LinkedCells<Particle_T>>(boxMin, boxMax, cutoff, verletSkin, cellSizeFactor,
64 sortingThreshold, loadEstimator);
67 case ContainerOption::linkedCellsReferences: {
68 container = std::make_unique<LinkedCellsReferences<Particle_T>>(boxMin, boxMax, cutoff, verletSkin,
69 cellSizeFactor, sortingThreshold);
72 case ContainerOption::verletLists: {
73 container = std::make_unique<VerletLists<Particle_T>>(
77 case ContainerOption::verletListsCells: {
78 container = std::make_unique<VerletListsCells<Particle_T, VLCAllCellsNeighborList<Particle_T>>>(
79 boxMin, boxMax, cutoff, verletSkin, cellSizeFactor, loadEstimator,
80 VerletListsCellsHelpers::VLCBuildType::soaBuild);
83 case ContainerOption::verletClusterLists: {
84 container = std::make_unique<VerletClusterLists<Particle_T>>(boxMin, boxMax, cutoff, verletSkin,
85 verletClusterSize, loadEstimator);
88 case ContainerOption::varVerletListsAsBuild: {
89 container = std::make_unique<VarVerletLists<Particle_T, VerletNeighborListAsBuild<Particle_T>>>(
90 boxMin, boxMax, cutoff, verletSkin, cellSizeFactor);
94 case ContainerOption::pairwiseVerletLists: {
95 container = std::make_unique<VerletListsCells<Particle_T, VLCCellPairNeighborList<Particle_T>>>(
96 boxMin, boxMax, cutoff, verletSkin, cellSizeFactor, loadEstimator,
97 VerletListsCellsHelpers::VLCBuildType::soaBuild);
100 case ContainerOption::octree: {
102 std::make_unique<Octree<Particle_T>>(boxMin, boxMax, cutoff, verletSkin, cellSizeFactor, sortingThreshold);
107 containerChoice.to_string());
Info to generate a container.
Definition: ContainerSelectorInfo.h:17
std::array< double, 3 > boxMin
Lower corner of the container.
Definition: ContainerSelectorInfo.h:93
double cellSizeFactor
cellSizeFactor Cell size factor to be used in this container (only relevant for LinkedCells)
Definition: ContainerSelectorInfo.h:108
double cutoff
Cutoff radius to be used in this container.
Definition: ContainerSelectorInfo.h:103
std::array< double, 3 > boxMax
Upper corner of the container.
Definition: ContainerSelectorInfo.h:98
LoadEstimatorOption loadEstimator
Load estimator for balanced sliced traversals.
Definition: ContainerSelectorInfo.h:124
double verletSkin
Length added to the cutoff for the verlet lists' skin inbetween rebuilding lists.
Definition: ContainerSelectorInfo.h:112
unsigned int verletClusterSize
Size of Verlet Clusters.
Definition: ContainerSelectorInfo.h:116
size_t sortingThreshold
Threshold beyond which, if the sum of the number of particles in two cells is greater,...
Definition: ContainerSelectorInfo.h:120
Selector for a particle container.
Definition: ContainerSelector.h:31
static std::unique_ptr< ParticleContainerInterface< Particle_T > > generateContainer(ContainerOption containerChoice, const ContainerSelectorInfo &containerInfo)
Container factory method.
Definition: ContainerSelector.h:44
Verlet Lists container.
Definition: VerletLists.h:32
static void exception(const Exception e)
Handle an exception derived by std::exception.
Definition: ExceptionHandler.h:63
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:32