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;
56 std::unique_ptr<ParticleContainerInterface<Particle_T>> container;
57 switch (containerChoice) {
58 case ContainerOption::directSum: {
59 container = std::make_unique<DirectSum<Particle_T>>(boxMin, boxMax, cutoff, verletSkin,
60 aosSortingThresholdFallback, soaSortingThresholdFallback);
64 case ContainerOption::linkedCells: {
65 container = std::make_unique<LinkedCells<Particle_T>>(boxMin, boxMax, cutoff, verletSkin, cellSizeFactor,
66 aosSortingThresholdFallback, soaSortingThresholdFallback,
70 case ContainerOption::linkedCellsReferences: {
71 container = std::make_unique<LinkedCellsReferences<Particle_T>>(
72 boxMin, boxMax, cutoff, verletSkin, cellSizeFactor, aosSortingThresholdFallback, soaSortingThresholdFallback);
75 case ContainerOption::verletLists: {
76 container = std::make_unique<VerletLists<Particle_T>>(
80 case ContainerOption::verletListsCells: {
81 container = std::make_unique<VerletListsCells<Particle_T, VLCAllCellsNeighborList<Particle_T>>>(
82 boxMin, boxMax, cutoff, verletSkin, cellSizeFactor, loadEstimator,
83 VerletListsCellsHelpers::VLCBuildType::soaBuild);
86 case ContainerOption::verletClusterLists: {
87 container = std::make_unique<VerletClusterLists<Particle_T>>(boxMin, boxMax, cutoff, verletSkin,
88 verletClusterSize, loadEstimator);
91 case ContainerOption::varVerletListsAsBuild: {
92 container = std::make_unique<VarVerletLists<Particle_T, VerletNeighborListAsBuild<Particle_T>>>(
93 boxMin, boxMax, cutoff, verletSkin, cellSizeFactor);
97 case ContainerOption::pairwiseVerletLists: {
98 container = std::make_unique<VerletListsCells<Particle_T, VLCCellPairNeighborList<Particle_T>>>(
99 boxMin, boxMax, cutoff, verletSkin, cellSizeFactor, loadEstimator,
100 VerletListsCellsHelpers::VLCBuildType::soaBuild);
103 case ContainerOption::octree: {
104 container = std::make_unique<Octree<Particle_T>>(boxMin, boxMax, cutoff, verletSkin, cellSizeFactor,
105 aosSortingThresholdFallback, soaSortingThresholdFallback);
110 containerChoice.to_string());
Info to generate a container.
Definition: ContainerSelectorInfo.h:17
size_t aosSortingThresholdFallback
Threshold beyond which, if the sum of the number of particles in two cells is greater,...
Definition: ContainerSelectorInfo.h:128
std::array< double, 3 > boxMin
Lower corner of the container.
Definition: ContainerSelectorInfo.h:100
double cellSizeFactor
cellSizeFactor Cell size factor to be used in this container (only relevant for LinkedCells)
Definition: ContainerSelectorInfo.h:115
double cutoff
Cutoff radius to be used in this container.
Definition: ContainerSelectorInfo.h:110
std::array< double, 3 > boxMax
Upper corner of the container.
Definition: ContainerSelectorInfo.h:105
LoadEstimatorOption loadEstimator
Load estimator for balanced sliced traversals.
Definition: ContainerSelectorInfo.h:137
size_t soaSortingThresholdFallback
Threshold beyond which, if the sum of the SoA buffer sizes of two cells is greater,...
Definition: ContainerSelectorInfo.h:133
double verletSkin
Length added to the cutoff for the verlet lists' skin inbetween rebuilding lists.
Definition: ContainerSelectorInfo.h:119
unsigned int verletClusterSize
Size of Verlet Clusters.
Definition: ContainerSelectorInfo.h:123
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:31
static void exception(const Exception e)
Handle an exception derived by std::exception.
Definition: ExceptionHandler.h:64
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:34