36template <
class Particle_T>
45template <
class Particle_T>
81 explicit AutoPas(std::ostream &logOutputStream = std::cout);
108 std::vector<Particle_T>
resizeBox(
const std::array<double, 3> &boxMin,
const std::array<double, 3> &boxMax);
121 if (not _externalMPICommunicator) {
143 void reserve(
size_t numParticles);
154 void reserve(
size_t numParticles,
size_t numHaloParticles);
173 template <
class Collection>
185 template <
class Collection,
class F>
204 template <
class Collection>
216 template <
class Collection,
class F>
262 template <
class Functor>
272 IteratorT begin(IteratorBehavior behavior = IteratorBehavior::ownedOrHalo);
287 template <
typename Lambda>
288 void forEachParallel(Lambda forEachLambda, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
297 template <
typename Lambda>
298 void forEachParallel(Lambda forEachLambda, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
309 template <
typename Lambda>
310 void forEach(Lambda forEachLambda, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
318 template <
typename Lambda>
319 void forEach(Lambda forEachLambda, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
332 template <
typename Lambda,
typename A>
333 void reduceParallel(Lambda reduceLambda, A &result, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
335 withStaticContainerType(getContainer(), [&](
auto &container) { container.reduce(reduceLambda, result, behavior); });
342 template <
typename Lambda,
typename A>
343 void reduceParallel(Lambda reduceLambda, A &result, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
345 withStaticContainerType(getContainer(), [&](
auto &container) { container.reduce(reduceLambda, result, behavior); });
356 template <
typename Lambda,
typename A>
357 void reduce(Lambda reduceLambda, A &result, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
358 withStaticContainerType(getContainer(), [&](
auto &container) { container.reduce(reduceLambda, result, behavior); });
365 template <
typename Lambda,
typename A>
366 void reduce(Lambda reduceLambda, A &result, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
367 withStaticContainerType(getContainer(), [&](
auto &container) { container.reduce(reduceLambda, result, behavior); });
386 [[nodiscard]]
constexpr bool end()
const {
return false; }
400 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo);
406 const std::array<double, 3> &higherCorner,
407 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const;
418 template <
typename Lambda>
420 const std::array<double, 3> &higherCorner,
421 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
424 container.forEachInRegion(forEachLambda, lowerCorner, higherCorner, behavior);
432 template <
typename Lambda>
434 const std::array<double, 3> &higherCorner,
435 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
438 container.forEachInRegion(forEachLambda, lowerCorner, higherCorner, behavior);
450 template <
typename Lambda>
452 const std::array<double, 3> &higherCorner,
453 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
455 container.forEachInRegion(forEachLambda, lowerCorner, higherCorner, behavior);
463 template <
typename Lambda>
465 const std::array<double, 3> &higherCorner,
466 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
468 container.forEachInRegion(forEachLambda, lowerCorner, higherCorner, behavior);
483 template <
typename Lambda,
typename A>
485 const std::array<double, 3> &higherCorner,
486 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
489 container.reduceInRegion(reduceLambda, result, lowerCorner, higherCorner, behavior);
497 template <
typename Lambda,
typename A>
499 const std::array<double, 3> &higherCorner,
500 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
503 container.reduceInRegion(reduceLambda, result, lowerCorner, higherCorner, behavior);
517 template <
typename Lambda,
typename A>
518 void reduceInRegion(Lambda reduceLambda, A &result,
const std::array<double, 3> &lowerCorner,
519 const std::array<double, 3> &higherCorner,
520 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
522 container.reduceInRegion(reduceLambda, result, lowerCorner, higherCorner, behavior);
530 template <
typename Lambda,
typename A>
531 void reduceInRegion(Lambda reduceLambda, A &result,
const std::array<double, 3> &lowerCorner,
532 const std::array<double, 3> &higherCorner,
533 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
535 container.reduceInRegion(reduceLambda, result, lowerCorner, higherCorner, behavior);
551 [[nodiscard]]
size_t getNumberOfParticles(IteratorBehavior behavior = IteratorBehavior::owned)
const;
563 [[nodiscard]]
const std::array<double, 3> &
getBoxMin()
const;
569 [[nodiscard]]
const std::array<double, 3> &
getBoxMax()
const;
581 void setBoxMin(
const std::array<double, 3> &boxMin) { _logicHandlerInfo.
boxMin = boxMin; }
587 void setBoxMax(
const std::array<double, 3> &boxMax) { _logicHandlerInfo.
boxMax = boxMax; }
603 _logicHandlerInfo.
cutoff = cutoff;
617 if (allowedCellSizeFactors.
getMin() <= 0.0) {
619 allowedCellSizeFactors.
getMin());
621 _allowedCellSizeFactors = std::move(allowedCellSizeFactors.
clone());
629 if (cellSizeFactor <= 0.0) {
632 _allowedCellSizeFactors = std::make_unique<NumberSetFinite<double>>(std::set<double>{cellSizeFactor});
652 _verletRebuildFrequency = verletRebuildFrequency;
845 _allowedLoadEstimators = allowedLoadEstimators;
860 _allowedContainers = allowedContainers;
870 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise)
const {
871 return _allowedTraversals.at(interactionType);
882 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise) {
883 if (interactionType == InteractionTypeOption::all) {
884 for (
auto iType : InteractionTypeOption::getMostOptions()) {
885 _allowedTraversals[iType] = allowedTraversals;
888 _allowedTraversals[interactionType] = allowedTraversals;
899 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise)
const {
900 return _allowedDataLayouts.at(interactionType);
911 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise) {
912 if (interactionType == InteractionTypeOption::all) {
913 for (
auto iType : InteractionTypeOption::getMostOptions()) {
914 _allowedDataLayouts[iType] = allowedDataLayouts;
917 _allowedDataLayouts[interactionType] = allowedDataLayouts;
928 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise)
const {
929 return _allowedNewton3Options.at(interactionType);
940 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise) {
941 if (interactionType == InteractionTypeOption::all) {
942 for (
auto iType : InteractionTypeOption::getMostOptions()) {
943 _allowedNewton3Options[iType] = allowedNewton3Options;
946 _allowedNewton3Options[interactionType] = allowedNewton3Options;
957 _allowedInteractionTypeOptions = allowedInteractionTypeOptions;
964 [[nodiscard]] std::unordered_map<InteractionTypeOption::Value, std::reference_wrapper<const Configuration>>
966 std::unordered_map<InteractionTypeOption::Value, std::reference_wrapper<const Configuration>> currentConfigs;
967 currentConfigs.reserve(_autoTuners.size());
969 for (
const auto &[type, tuner] : _autoTuners) {
970 currentConfigs.emplace(type, std::cref(tuner->getCurrentConfig()));
972 return currentConfigs;
980 return _tuningStrategyOptions;
989 _tuningStrategyOptions = tuningStrategyOptions;
1039#if defined(AUTOPAS_INCLUDE_MPI)
1120 AutoTunerInfo _autoTunerInfo{};
1124 LogicHandlerInfo _logicHandlerInfo{};
1128 bool _useTuningStrategyLoggerProxy{
false};
1133 unsigned int _verletRebuildFrequency{100};
1138 std::vector<TuningStrategyOption> _tuningStrategyOptions{};
1143 std::set<ContainerOption> _allowedContainers{ContainerOption::getMostOptions()};
1148 std::unordered_map<InteractionTypeOption::Value, std::set<TraversalOption>> _allowedTraversals{
1149 {InteractionTypeOption::pairwise, TraversalOption::getMostPairwiseOptions()},
1150 {InteractionTypeOption::triwise, TraversalOption::getMostTriwiseOptions()}};
1155 std::unordered_map<InteractionTypeOption::Value, std::set<DataLayoutOption>> _allowedDataLayouts{
1156 {InteractionTypeOption::pairwise, DataLayoutOption::getMostOptions()},
1157 {InteractionTypeOption::triwise, DataLayoutOption::getMostOptions()}};
1161 std::unordered_map<InteractionTypeOption::Value, std::set<Newton3Option>> _allowedNewton3Options{
1162 {InteractionTypeOption::pairwise, Newton3Option::getMostOptions()},
1163 {InteractionTypeOption::triwise, Newton3Option::getMostOptions()}};
1168 std::set<InteractionTypeOption> _allowedInteractionTypeOptions{InteractionTypeOption::pairwise};
1172 std::unique_ptr<NumberSet<double>> _allowedCellSizeFactors{
1173 std::make_unique<NumberSetFinite<double>>(std::set<double>({1.}))};
1178 std::set<LoadEstimatorOption> _allowedLoadEstimators{LoadEstimatorOption::getAllOptions()};
1182 std::unique_ptr<autopas::LogicHandler<Particle_T>> _logicHandler;
1188 std::unordered_map<InteractionTypeOption::Value, std::unique_ptr<autopas::AutoTuner>> _autoTuners;
1193 bool _externalMPICommunicator{
false};
1198 std::string _outputSuffix{
""};
1202 size_t _sortingThreshold{8};
1214 void addParticlesAux(
size_t numParticlesToAdd,
size_t numHalosToAdd,
size_t collectionSize, F loopBody);
The AutoPas class is intended to be the main point of Interaction for the user.
Definition: AutoPasDecl.h:46
void setMaxEvidence(unsigned int maxEvidence)
Set maximum number of evidence for tuning.
Definition: AutoPasDecl.h:719
void setNumSamples(unsigned int numSamples)
Set number of samples taken per configuration during the tuning.
Definition: AutoPasDecl.h:688
void setAllowedNewton3Options(const std::set< Newton3Option > &allowedNewton3Options, const InteractionTypeOption interactionType=InteractionTypeOption::pairwise)
Set the list of allowed newton 3 options.
Definition: AutoPasDecl.h:939
void setSelectorStrategy(SelectorStrategyOption selectorStrategy)
Set the strategy of how to select a performance value for a piece of evidence from multiple time meas...
Definition: AutoPasDecl.h:829
void setFuzzyRuleFileName(const std::string &fuzzyRuleFileName)
Set fuzzy rule file name for the RuleBasedTuning.
Definition: AutoPasDecl.h:1085
unsigned int getTuningInterval() const
Get tuning interval.
Definition: AutoPasDecl.h:670
unsigned int getMaxTuningPhasesWithoutTest() const
Get the maximum number of tuning phases before a configuration is certainly tested again.
Definition: AutoPasDecl.h:739
const std::set< TraversalOption > & getAllowedTraversals(const InteractionTypeOption interactionType=InteractionTypeOption::pairwise) const
Get the list of allowed traversals.
Definition: AutoPasDecl.h:869
std::vector< Particle_T > updateContainer()
Updates the container.
Definition: AutoPasImpl.h:224
void setTuningMetricOption(TuningMetricOption tuningMetricOption)
Setter for the tuning metric option.
Definition: AutoPasDecl.h:1003
void reduceInRegion(Lambda reduceLambda, A &result, const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Execute code on all particles in a certain region as defined by a lambda function.
Definition: AutoPasDecl.h:531
autopas::ContainerIterator< Particle_T, false, true > RegionConstIteratorT
Define the const region iterator type for ease of use.
Definition: AutoPasDecl.h:75
const std::array< double, 3 > & getBoxMin() const
Get the lower corner of the container without the halo.
Definition: AutoPasImpl.h:339
unsigned int getNumSamples() const
Get number of samples taken per configuration during the tuning.
Definition: AutoPasDecl.h:682
unsigned int getMaxEvidence() const
Get maximum number of evidence for tuning.
Definition: AutoPasDecl.h:713
void setBoxMax(const std::array< double, 3 > &boxMax)
Set coordinates of the upper corner of the domain.
Definition: AutoPasDecl.h:587
void reduce(Lambda reduceLambda, A &result, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Reduce properties of particles as defined by a lambda function.
Definition: AutoPasDecl.h:366
bool searchSpaceIsTrivial()
get the bool value indicating if the search space is trivial (not more than one configuration to test...
Definition: AutoPasImpl.h:359
void setUseTuningLogger(bool useTuningLogger)
Set if the tuning information should be logged to a file.
Definition: AutoPasDecl.h:1073
unsigned int getVerletRebuildFrequency() const
Get Verlet rebuild frequency.
Definition: AutoPasDecl.h:645
ConstIteratorT cbegin(IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Iterate over all particles by using for(auto iter = autoPas.begin(); iter.isValid(); ++iter)
Definition: AutoPasDecl.h:374
void addHaloParticles(Collection &&particles)
Adds all halo particles from the collection to the container.
Definition: AutoPasImpl.h:256
void reserve(size_t numParticles)
Reserve memory for a given number of particles in the container and logic layers.
Definition: AutoPasImpl.h:169
const std::string & getRuleFileName() const
Get the name / path of the rule file for the RuleBasedTuning.
Definition: AutoPasDecl.h:1093
void setRuleFileName(const std::string &ruleFileName)
Set rule file name for the RuleBasedTuning.
Definition: AutoPasDecl.h:1079
ExtrapolationMethodOption getExtrapolationMethodOption() const
Get extrapolation method for the prediction of the configuration performance.
Definition: AutoPasDecl.h:806
const std::set< DataLayoutOption > & getAllowedDataLayouts(const InteractionTypeOption interactionType=InteractionTypeOption::pairwise) const
Get the list of allowed data layouts.
Definition: AutoPasDecl.h:898
SelectorStrategyOption getSelectorStrategy() const
Get the selector configuration strategy.
Definition: AutoPasDecl.h:822
unsigned int getVerletClusterSize() const
Get Verlet cluster size.
Definition: AutoPasDecl.h:658
void addHaloParticlesIf(Collection &&particles, F predicate)
Adds all halo particles for which predicate(particle) == true to the container.
Definition: AutoPasImpl.h:262
void addParticles(Collection &&particles)
Adds all particles from the collection to the container.
Definition: AutoPasImpl.h:197
void setVerletSkin(double verletSkin)
Set length added to the cutoff for the Verlet lists' skin per timestep.
Definition: AutoPasDecl.h:639
void setOutputSuffix(const std::string &suffix)
Suffix for all output files produced by this instance of AutoPas, e.g.
Definition: AutoPasDecl.h:1059
void setMaxTuningPhasesWithoutTest(unsigned int maxTuningPhasesWithoutTest)
Set the maximum number of tuning phases before a configuration is certainly tested again.
Definition: AutoPasDecl.h:747
void setEnergySensorOption(EnergySensorOption energySensorOption)
Setter for the energy sensor.
Definition: AutoPasDecl.h:1017
unsigned long getContainerType() const
Returns the type of the currently used container.
Definition: AutoPasImpl.h:334
void forEach(Lambda forEachLambda, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
Execute code on all particles as defined by a lambda function.
Definition: AutoPasDecl.h:310
const std::set< ContainerOption > & getAllowedContainers() const
Get the list of allowed containers.
Definition: AutoPasDecl.h:852
void deleteParticle(IteratorT &iter)
Deletes the particle behind the current iterator position and leaves the container in a valid state.
Definition: AutoPasImpl.h:288
void setAcquisitionFunction(AcquisitionFunctionOption acqFun)
Set acquisition function for tuning.
Definition: AutoPasDecl.h:798
void setEarlyStoppingFactor(double earlyStoppingFactor)
Set the earlyStoppingFactor for the auto tuner.
Definition: AutoPasDecl.h:695
void setMPITuningWeightForMaxDensity(double MPITuningWeightForMaxDensity)
Setter for the maxDensity-Weight in calculation for bucket distribution.
Definition: AutoPasDecl.h:1033
void reduceParallel(Lambda reduceLambda, A &result, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Reduce properties of particles as defined by a lambda function.
Definition: AutoPasDecl.h:343
void reduceInRegion(Lambda reduceLambda, A &result, const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
Execute code on all particles in a certain region as defined by a lambda function.
Definition: AutoPasDecl.h:518
void setEvidenceFirstPrediction(unsigned int evidenceFirstPrediction)
Set the number of tests that need to have happened for a configuration until the first predictions ar...
Definition: AutoPasDecl.h:780
void forEachParallel(Lambda forEachLambda, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
execute code on all particles in parallel as defined by a lambda function
Definition: AutoPasDecl.h:288
const EnergySensorOption & getEnergySensorOption() const
Getter for the energy sensor.
Definition: AutoPasDecl.h:1011
double getRelativeOptimumRange() const
Get the range for the optimum in which has to be to be tested.
Definition: AutoPasDecl.h:725
void finalize()
Free the AutoPas MPI communicator.
Definition: AutoPasDecl.h:120
void setCellSizeFactor(double cellSizeFactor)
Set allowed cell size factors to one element (only relevant for LinkedCells, VerletLists and VerletLi...
Definition: AutoPasDecl.h:628
void setRelativeBlacklistRange(double relativeBlacklistRange)
Set the range of the configurations that are not going to be blacklisted.
Definition: AutoPasDecl.h:762
size_t getSortingThreshold() const
Get the sorting-threshold for traversals that use the CellFunctor.
Definition: AutoPasDecl.h:1107
unsigned int getEvidenceFirstPrediction() const
Get the number of tests that need to have happened for a configuration until the first predictions ar...
Definition: AutoPasDecl.h:771
void addParticlesIf(Collection &&particles, F predicate)
Adds all particles for which predicate(particle) == true to the container.
Definition: AutoPasImpl.h:203
double getRelativeBlacklistRange() const
For Predictive tuning: Get the relative cutoff for configurations to be blacklisted.
Definition: AutoPasDecl.h:756
void setTuningStrategyOption(const std::vector< TuningStrategyOption > &tuningStrategyOptions)
Setter for the tuning strategy option.
Definition: AutoPasDecl.h:988
autopas::ContainerIterator< Particle_T, true, true > RegionIteratorT
Define the region iterator type for ease of use.
Definition: AutoPasDecl.h:69
void forEachParallel(Lambda forEachLambda, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
execute code on all particles in parallel as defined by a lambda function
Definition: AutoPasDecl.h:298
std::vector< Particle_T > resizeBox(const std::array< double, 3 > &boxMin, const std::array< double, 3 > &boxMax)
Resizes the bounding box of the AutoPas object.
Definition: AutoPasImpl.h:229
void setMPITuningMaxDifferenceForBucket(double MPITuningMaxDifferenceForBucket)
Setter for the maximal Difference for the bucket distribution.
Definition: AutoPasDecl.h:1025
const TuningMetricOption & getTuningMetricOption() const
Getter for the tuning metric option.
Definition: AutoPasDecl.h:996
void setAllowedCellSizeFactors(const NumberSet< double > &allowedCellSizeFactors)
Set allowed cell size factors (only relevant for LinkedCells, VerletLists and VerletListsCells).
Definition: AutoPasDecl.h:616
void forEachInRegion(Lambda forEachLambda, const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Execute code on all particles in a certain region as defined by a lambda function.
Definition: AutoPasDecl.h:464
void reduce(Lambda reduceLambda, A &result, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
Reduce properties of particles as defined by a lambda function.
Definition: AutoPasDecl.h:357
void setAllowedLoadEstimators(const std::set< LoadEstimatorOption > &allowedLoadEstimators)
Set the list of allowed load estimation algorithms.
Definition: AutoPasDecl.h:844
double getVerletSkin()
Function to iterate over all pairs of particles in the container.
Definition: AutoPasDecl.h:544
void setAllowedTraversals(const std::set< TraversalOption > &allowedTraversals, const InteractionTypeOption interactionType=InteractionTypeOption::pairwise)
Set the list of allowed traversals.
Definition: AutoPasDecl.h:881
void reduceParallel(Lambda reduceLambda, A &result, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
Reduce properties of particles in parallel as defined by a lambda function.
Definition: AutoPasDecl.h:333
AcquisitionFunctionOption getAcquisitionFunction() const
Get acquisition function used for tuning.
Definition: AutoPasDecl.h:788
void setVerletClusterSize(unsigned int verletClusterSize)
Set Verlet cluster size.
Definition: AutoPasDecl.h:664
void forEach(Lambda forEachLambda, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Execute code on all particles as defined by a lambda function.
Definition: AutoPasDecl.h:319
const std::array< double, 3 > & getBoxMax() const
Get the upper corner of the container without the halo.
Definition: AutoPasImpl.h:344
const NumberSet< double > & getAllowedCellSizeFactors() const
Get allowed cell size factors (only relevant for LinkedCells, VerletLists and VerletListsCells).
Definition: AutoPasDecl.h:610
void addHaloParticle(const Particle_T &haloParticle)
Adds a particle to the container that lies in the halo region of the container.
Definition: AutoPasImpl.h:250
void setAllowedDataLayouts(const std::set< DataLayoutOption > &allowedDataLayouts, const InteractionTypeOption interactionType=InteractionTypeOption::pairwise)
Set the list of allowed data layouts.
Definition: AutoPasDecl.h:910
void setSortingThreshold(size_t sortingThreshold)
Set the sorting-threshold for traversals that use the CellFunctor If the sum of the number of particl...
Definition: AutoPasDecl.h:1101
Particle_T ParticleType
Particle type to be accessible after initialization.
Definition: AutoPasDecl.h:51
autopas::ContainerIterator< Particle_T, true, false > IteratorT
Define the iterator type for ease of use.
Definition: AutoPasDecl.h:57
RegionIteratorT getRegionIterator(const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
Iterate over all particles in a specified region.
Definition: AutoPasImpl.h:321
void reduceInRegionParallel(Lambda reduceLambda, A &result, const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
Execute code on all particles in a certain region in parallel as defined by a lambda function.
Definition: AutoPasDecl.h:484
double getMeanRebuildFrequency()
Getter for the mean rebuild frequency.
Definition: AutoPasDecl.h:1067
AutoPas & operator=(AutoPas &&other) noexcept
Move assignment operator.
Definition: AutoPasImpl.h:59
void setExtrapolationMethodOption(ExtrapolationMethodOption extrapolationMethodOption)
Set extrapolation method for the prediction of the configuration performance.
Definition: AutoPasDecl.h:814
void setBoxMin(const std::array< double, 3 > &boxMin)
Set coordinates of the lower corner of the domain.
Definition: AutoPasDecl.h:581
void init()
Initialize AutoPas.
Definition: AutoPasImpl.h:66
const std::vector< TuningStrategyOption > & getTuningStrategyOptions() const
Getter for the tuning strategy option.
Definition: AutoPasDecl.h:979
autopas::ContainerIterator< Particle_T, false, false > ConstIteratorT
Define the const iterator type for ease of use.
Definition: AutoPasDecl.h:63
void forceRetune()
Force the internal tuner to enter a new tuning phase upon the next call to computeInteractions().
Definition: AutoPasImpl.h:243
void setAllowedInteractionTypeOptions(const std::set< InteractionTypeOption > &allowedInteractionTypeOptions)
Set the list of allowed interaction types.
Definition: AutoPasDecl.h:956
void setVerletRebuildFrequency(unsigned int verletRebuildFrequency)
Set Verlet rebuild frequency.
Definition: AutoPasDecl.h:651
void forEachInRegion(Lambda forEachLambda, const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
Execute code on all particles in a certain region as defined by a lambda function.
Definition: AutoPasDecl.h:451
const std::set< LoadEstimatorOption > & getAllowedLoadEstimators() const
Get the list of allowed load estimation algorithms.
Definition: AutoPasDecl.h:837
void setUseLOESSSmoothening(bool useLOESSSmoothening)
Set flag for whether a LOESS-based smoothening is used.
Definition: AutoPasDecl.h:707
size_t getNumberOfParticles(IteratorBehavior behavior=IteratorBehavior::owned) const
Returns the number of particles in this container.
Definition: AutoPasImpl.h:151
void reduceInRegionParallel(Lambda reduceLambda, A &result, const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Execute code on all particles in a certain region as defined by a lambda function.
Definition: AutoPasDecl.h:498
void deleteAllParticles()
Deletes all particles.
Definition: AutoPasImpl.h:283
bool computeInteractions(Functor *f)
Function to iterate over all inter-particle interactions in the container This function only handles ...
Definition: AutoPasImpl.h:128
void forEachInRegionParallel(Lambda forEachLambda, const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
Execute code on all particles in a certain region in parallel as defined by a lambda function.
Definition: AutoPasDecl.h:419
void addParticle(const Particle_T &p)
Adds a particle to the container.
Definition: AutoPasImpl.h:191
void forEachInRegionParallel(Lambda forEachLambda, const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Execute code on all particles in a certain region in parallel as defined by a lambda function.
Definition: AutoPasDecl.h:433
bool getUseLOESSSmoothening() const
Get flag for whether a LOESS-based smoothening is used.
Definition: AutoPasDecl.h:701
double getCutoff() const
Get cutoff radius.
Definition: AutoPasDecl.h:593
IteratorT begin(IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
Iterate over all particles by using for(auto iter = autoPas.begin(); iter.isValid(); ++iter)
Definition: AutoPasImpl.h:311
std::unordered_map< InteractionTypeOption::Value, std::reference_wrapper< const Configuration > > getCurrentConfigs() const
Getter for the currently selected configuration.
Definition: AutoPasDecl.h:965
void setRelativeOptimumRange(double relativeOptimumRange)
Set the range for the optimum in which has to be to be tested.
Definition: AutoPasDecl.h:731
void setAllowedContainers(const std::set< ContainerOption > &allowedContainers)
Set the list of allowed containers.
Definition: AutoPasDecl.h:859
void setCutoff(double cutoff)
Set cutoff radius.
Definition: AutoPasDecl.h:599
void setTuningInterval(unsigned int tuningInterval)
Set tuning interval.
Definition: AutoPasDecl.h:676
constexpr bool end() const
Dummy to make range-based for loops work.
Definition: AutoPasDecl.h:386
const std::set< Newton3Option > & getAllowedNewton3Options(const InteractionTypeOption interactionType=InteractionTypeOption::pairwise) const
Get the list of allowed newton 3 options.
Definition: AutoPasDecl.h:927
Public iterator class that iterates over a particle container and additional vectors (which are typic...
Definition: ContainerIterator.h:93
Class representing the different energy sensor options.
Definition: EnergySensorOption.h:19
Functor base class.
Definition: Functor.h:40
double verletSkin
Length added to the cutoff for the Verlet lists' skin.
Definition: LogicHandlerInfo.h:33
std::array< double, 3 > boxMax
Upper corner of the container without halo.
Definition: LogicHandlerInfo.h:25
unsigned int verletClusterSize
Number of particles in a cluster to use in VCL.
Definition: LogicHandlerInfo.h:37
double cutoff
Cutoff radius to be used in this simulation.
Definition: LogicHandlerInfo.h:29
std::array< double, 3 > boxMin
Lower corner of the container without halo.
Definition: LogicHandlerInfo.h:21
The LogicHandler takes care of the containers s.t.
Definition: LogicHandler.h:47
Virtual class describing a finite or infinite set of numbers.
Definition: NumberSet.h:22
virtual Number getMin() const =0
Get the smallest number in the set.
virtual std::unique_ptr< NumberSet > clone() const =0
Create a copy of a NumberSet.
The ParticleContainerInterface class provides a basic interface for all Containers within AutoPas.
Definition: ParticleContainerInterface.h:37
Class representing the load estimator choices.
Definition: TuningMetricOption.h:18
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
decltype(auto) withStaticContainerType(autopas::ParticleContainerInterface< Particle_T > &container, FunctionType &&function)
Will execute the passed function body with the static container type of container.
Definition: StaticContainerSelector.h:33
int AutoPas_MPI_Comm_free(AutoPas_MPI_Comm *comm)
Wrapper for MPI_Comm_free.
Definition: WrapMPI.h:820
unsigned int tuningInterval
Number of time steps after which the auto-tuner shall reevaluate the optimum.
Definition: AutoTunerInfo.h:29
SelectorStrategyOption selectorStrategy
Strategy how to select the optimum from the collected samples.
Definition: AutoTunerInfo.h:21
unsigned int maxSamples
Number of samples that shall be collected per combination.
Definition: AutoTunerInfo.h:33
bool useLOESSSmoothening
Flag for whether LOESS Smoothening is used to smoothen the tuning results.
Definition: AutoTunerInfo.h:46
TuningMetricOption tuningMetric
Metric used to rate configurations (time or energy).
Definition: AutoTunerInfo.h:25
double earlyStoppingFactor
EarlyStoppingFactor for the auto-tuner.
Definition: AutoTunerInfo.h:38
EnergySensorOption energySensor
Used energy sensor of energy metric selected.
Definition: AutoTunerInfo.h:42
Helper struct encapsulating most information needed to build TuningStrategies by the TuningStrategyFa...
Definition: TuningStrategyFactoryInfo.h:22
double mpiTuningWeightForMaxDensity
Weight for maxDensity in the calculation for bucket distribution.
Definition: TuningStrategyFactoryInfo.h:87
double mpiTuningMaxDifferenceForBucket
Maximum absolute difference in similarity metric for two ranks to fall in the same bucket.
Definition: TuningStrategyFactoryInfo.h:83
std::string ruleFileName
The name and path of the file where the rules are stored.
Definition: TuningStrategyFactoryInfo.h:66
unsigned int maxEvidence
Strategies that don't converge (or not quickly enough) can be told to limit the number of evidence to...
Definition: TuningStrategyFactoryInfo.h:27
AcquisitionFunctionOption acquisitionFunctionOption
Function used to predict informational gain.
Definition: TuningStrategyFactoryInfo.h:60
std::string fuzzyRuleFileName
The name and path of the file where the rules are stored.
Definition: TuningStrategyFactoryInfo.h:72
unsigned int maxTuningPhasesWithoutTest
If a config is not tested for this number of tuning phases test it again to make predictions more rel...
Definition: TuningStrategyFactoryInfo.h:44
double relativeBlacklistRange
Any configuration that is slower than the fastest times this factor will be blacklisted.
Definition: TuningStrategyFactoryInfo.h:54
ExtrapolationMethodOption extrapolationMethodOption
Function option used for extrapolating performance from observed evidence.
Definition: TuningStrategyFactoryInfo.h:36
double relativeOptimumRange
Factor of the range of the optimal configurations for the optimalSearchSpace.
Definition: TuningStrategyFactoryInfo.h:40
unsigned int minNumberOfEvidence
The number of evidence that have to be collected until the first prediction can be made.
Definition: TuningStrategyFactoryInfo.h:48
AutoPas_MPI_Comm autopasMpiCommunicator
MPI Communicator used within AutoPas.
Definition: TuningStrategyFactoryInfo.h:91