9#include "ParticleContainer.h"
11#include <autopas/AutoPas.h>
12#include <autopas/molecularDynamics/autopasmd.h>
62 bool rebuild(
double bBoxMin[3],
double bBoxMax[3])
override;
66 bool addParticle(
Molecule &particle,
bool inBoxCheckedAlready =
false,
bool checkWhetherDuplicate =
false,
67 const bool &rebuildCaches =
false)
override;
70 const bool &rebuildCaches =
false)
override;
72 void addParticles(std::vector<Molecule> &particles,
bool checkWhetherDuplicate =
false)
override;
76 void traverseNonInnermostCells(
CellProcessor &cellProcessor)
override;
78 void traversePartialInnermostCells(
CellProcessor &cellProcessor,
unsigned int stage,
int stageCount)
override;
83 ParticleIterator::Type t)
override;
87 void clear()
override;
93 double getCutoff()
const override;
95 double getSkin()
const override;
97 void deleteMolecule(
ParticleIterator &moleculeIter,
const bool &rebuildCaches)
override;
107 std::variant<ParticleIterator, SingleCellIterator<ParticleCell>>
getMoleculeAtPosition(
const double pos[3])
override;
109 unsigned long initCubicGrid(std::array<unsigned long, 3> numMoleculesPerDimension,
110 std::array<double, 3> simBoxLength,
size_t seed_offset)
override;
112 double *getCellLength()
override;
117 size_t getTotalSize()
override {
return 0; }
119 void printSubInfo(
int offset)
override {}
121 std::string getName()
override {
return "AutoPasContainer"; }
123 void setCutoff(
double cutoff)
override { _cutoff = cutoff; }
125 std::vector<Molecule> getInvalidParticles()
override {
126 return std::move(_invalidParticles);
129 bool isInvalidParticleReturner()
override {
return true; }
137 template <
bool shifting>
138 void traverseTemplateHelper();
146 template <
typename F>
147 std::pair<double,double> iterateWithFunctor(F&& functor);
151 double _relativeOptimumRange;
152 double _relativeBlacklistRange;
153 unsigned int _verletRebuildFrequency;
154 unsigned int _verletClusterSize;
155 unsigned int _tuningFrequency;
156 unsigned int _tuningSamples;
157 unsigned int _maxEvidence;
158 unsigned int _maxTuningPhasesWithoutTest;
159 unsigned int _evidenceForPrediction;
160 autopas::AutoPas<Molecule> _autopasContainer;
161 bool _autopasContainerIsInitialized{
false};
163 std::set<autopas::TraversalOption> _traversalChoices;
164 std::set<autopas::ContainerOption> _containerChoices;
165 autopas::SelectorStrategyOption _selectorStrategy;
166 autopas::TuningStrategyOption _tuningStrategyOption;
167 autopas::ExtrapolationMethodOption _extrapolationMethod;
168 autopas::AcquisitionFunctionOption _tuningAcquisitionFunction;
169 std::set<autopas::DataLayoutOption> _dataLayoutChoices;
170 std::set<autopas::Newton3Option> _newton3Choices;
171 autopas::Logger::LogLevel _logLevel{autopas::Logger::LogLevel::info};
173 std::vector<Molecule> _invalidParticles;
174 bool _useAVXFunctor{
true};
176 ParticlePropertiesLibrary<double, size_t> _particlePropertiesLibrary;
179 std::ofstream _logFile;
Definition: AutoPasContainer.h:17
void updateBoundaryAndHaloMoleculeCaches() override
Update the caches of the molecules, that lie in the boundary or halo cells. The caches of boundary an...
Definition: AutoPasContainer.cpp:445
void setCutoff(double cutoff) override
Definition: AutoPasContainer.h:123
void updateMoleculeCaches() override
Update the caches of the molecules.
Definition: AutoPasContainer.cpp:449
bool rebuild(double bBoxMin[3], double bBoxMax[3]) override
rebuild the datastructure
Definition: AutoPasContainer.cpp:146
bool addHaloParticle(Molecule &particle, bool inBoxCheckedAlready=false, bool checkWhetherDuplicate=false, const bool &rebuildCaches=false) override
add a single Molecule to the ParticleContainer, ensures that it is added in the halo.
Definition: AutoPasContainer.cpp:260
void updateInnerMoleculeCaches() override
Update the caches of the molecules, that lie in inner cells. The caches of boundary and halo cells is...
Definition: AutoPasContainer.cpp:441
double * getHaloSize() override
Definition: AutoPasContainer.cpp:473
unsigned long getNumberOfParticles() override
Definition: AutoPasContainer.cpp:405
double get_halo_L(int index) const override
returns the width of the halo stripe (for the given dimension index)
Definition: AutoPasContainer.cpp:426
bool addParticle(Molecule &particle, bool inBoxCheckedAlready=false, bool checkWhetherDuplicate=false, const bool &rebuildCaches=false) override
add a single Molecule to the ParticleContainer.
Definition: AutoPasContainer.cpp:250
void deleteOuterParticles() override
delete all Particles which are not within the bounding box
Definition: AutoPasContainer.cpp:416
void readXML(XMLfileUnits &xmlconfig) override
Definition: AutoPasContainer.cpp:88
std::string getConfigurationAsString() override
Definition: AutoPasContainer.cpp:499
std::variant< ParticleIterator, SingleCellIterator< ParticleCell > > getMoleculeAtPosition(const double pos[3]) override
Gets a molecule by its position.
Definition: AutoPasContainer.cpp:453
void addParticles(std::vector< Molecule > &particles, bool checkWhetherDuplicate=false) override
adds a whole vector of particles
Definition: AutoPasContainer.cpp:266
void clear() override
Delete all molecules in container.
Definition: AutoPasContainer.cpp:414
void traverseCells(CellProcessor &cellProcessor) override
traverse pairs which are close to each other
Definition: AutoPasContainer.cpp:348
void update() override
do necessary updates resulting from changed particle positions
Definition: AutoPasContainer.cpp:238
Definition: CellProcessor.h:29
FullMolecule modeled as LJ sphere with point polarities.
Definition: FullMolecule.h:18
This Interface is used to get access to particles and pairs of particles.
Definition: ParticleContainer.h:69
Definition: ParticleIterator.h:50
interface for defining the action performed when processing a pair
Definition: ParticlePairsHandler.h:38
Definition: RegionParticleIterator.h:33
XML file with unit attributes abstraction.
Definition: xmlfileUnits.h:25
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
Definition: vtk-punstructured.h:270
Definition: FakedOptFFT.h:23