38template <
class Particle_T>
46template <
class Particle_T>
82 explicit AutoPas(std::ostream &logOutputStream = std::cout);
89 explicit AutoPas(
const std::string &logFileName);
116 std::vector<Particle_T>
resizeBox(
const std::array<double, 3> &boxMin,
const std::array<double, 3> &boxMax);
129 if (not _externalMPICommunicator) {
151 void reserve(
size_t numParticles);
162 void reserve(
size_t numParticles,
size_t numHaloParticles);
181 template <
class Collection>
193 template <
class Collection,
class F>
212 template <
class Collection>
224 template <
class Collection,
class F>
270 template <
class Functor>
280 IteratorT begin(IteratorBehavior behavior = IteratorBehavior::ownedOrHalo);
295 template <
typename Lambda>
296 void forEachParallel(Lambda forEachLambda, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
305 template <
typename Lambda>
306 void forEachParallel(Lambda forEachLambda, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
317 template <
typename Lambda>
318 void forEach(Lambda forEachLambda, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
326 template <
typename Lambda>
327 void forEach(Lambda forEachLambda, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
340 template <
typename Lambda,
typename A>
341 void reduceParallel(Lambda reduceLambda, A &result, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
343 withStaticContainerType(getContainer(), [&](
auto &container) { container.reduce(reduceLambda, result, behavior); });
350 template <
typename Lambda,
typename A>
351 void reduceParallel(Lambda reduceLambda, A &result, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
353 withStaticContainerType(getContainer(), [&](
auto &container) { container.reduce(reduceLambda, result, behavior); });
364 template <
typename Lambda,
typename A>
365 void reduce(Lambda reduceLambda, A &result, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
366 withStaticContainerType(getContainer(), [&](
auto &container) { container.reduce(reduceLambda, result, behavior); });
373 template <
typename Lambda,
typename A>
374 void reduce(Lambda reduceLambda, A &result, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
375 withStaticContainerType(getContainer(), [&](
auto &container) { container.reduce(reduceLambda, result, behavior); });
394 [[nodiscard]]
constexpr bool end()
const {
return false; }
408 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo);
414 const std::array<double, 3> &higherCorner,
415 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const;
426 template <
typename Lambda>
428 const std::array<double, 3> &higherCorner,
429 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
432 container.forEachInRegion(forEachLambda, lowerCorner, higherCorner, behavior);
440 template <
typename Lambda>
442 const std::array<double, 3> &higherCorner,
443 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
446 container.forEachInRegion(forEachLambda, lowerCorner, higherCorner, behavior);
458 template <
typename Lambda>
460 const std::array<double, 3> &higherCorner,
461 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
463 container.forEachInRegion(forEachLambda, lowerCorner, higherCorner, behavior);
471 template <
typename Lambda>
473 const std::array<double, 3> &higherCorner,
474 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
476 container.forEachInRegion(forEachLambda, lowerCorner, higherCorner, behavior);
491 template <
typename Lambda,
typename A>
493 const std::array<double, 3> &higherCorner,
494 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
497 container.reduceInRegion(reduceLambda, result, lowerCorner, higherCorner, behavior);
505 template <
typename Lambda,
typename A>
507 const std::array<double, 3> &higherCorner,
508 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
511 container.reduceInRegion(reduceLambda, result, lowerCorner, higherCorner, behavior);
525 template <
typename Lambda,
typename A>
526 void reduceInRegion(Lambda reduceLambda, A &result,
const std::array<double, 3> &lowerCorner,
527 const std::array<double, 3> &higherCorner,
528 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
530 container.reduceInRegion(reduceLambda, result, lowerCorner, higherCorner, behavior);
538 template <
typename Lambda,
typename A>
539 void reduceInRegion(Lambda reduceLambda, A &result,
const std::array<double, 3> &lowerCorner,
540 const std::array<double, 3> &higherCorner,
541 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
543 container.reduceInRegion(reduceLambda, result, lowerCorner, higherCorner, behavior);
559 [[nodiscard]]
size_t getNumberOfParticles(IteratorBehavior behavior = IteratorBehavior::owned)
const;
571 [[nodiscard]]
const std::array<double, 3> &
getBoxMin()
const;
577 [[nodiscard]]
const std::array<double, 3> &
getBoxMax()
const;
589 void setBoxMin(
const std::array<double, 3> &boxMin) { _logicHandlerInfo.
boxMin = boxMin; }
595 void setBoxMax(
const std::array<double, 3> &boxMax) { _logicHandlerInfo.
boxMax = boxMax; }
611 _logicHandlerInfo.
cutoff = cutoff;
625 if (allowedCellSizeFactors.
getMin() <= 0.0) {
627 allowedCellSizeFactors.
getMin());
629 _allowedCellSizeFactors = std::move(allowedCellSizeFactors.
clone());
637 if (cellSizeFactor <= 0.0) {
640 _allowedCellSizeFactors = std::make_unique<NumberSetFinite<double>>(std::set<double>{cellSizeFactor});
667 _verletRebuildFrequency = verletRebuildFrequency;
860 _allowedLoadEstimators = allowedLoadEstimators;
875 _allowedContainers = allowedContainers;
885 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise)
const {
886 return _allowedTraversals.at(interactionType);
897 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise) {
898 if (interactionType == InteractionTypeOption::all) {
899 for (
auto iType : InteractionTypeOption::getMostOptions()) {
900 _allowedTraversals[iType] = allowedTraversals;
903 _allowedTraversals[interactionType] = allowedTraversals;
914 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise)
const {
915 return _allowedDataLayouts.at(interactionType);
926 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise) {
927 if (interactionType == InteractionTypeOption::all) {
928 for (
auto iType : InteractionTypeOption::getMostOptions()) {
929 _allowedDataLayouts[iType] = allowedDataLayouts;
932 _allowedDataLayouts[interactionType] = allowedDataLayouts;
943 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise)
const {
944 return _allowedNewton3Options.at(interactionType);
955 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise) {
956 if (interactionType == InteractionTypeOption::all) {
957 for (
auto iType : InteractionTypeOption::getMostOptions()) {
958 _allowedNewton3Options[iType] = allowedNewton3Options;
961 _allowedNewton3Options[interactionType] = allowedNewton3Options;
972 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise)
const {
973 return _allowedVecPatternsOptions.at(interactionType);
984 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise) {
985 if (interactionType == InteractionTypeOption::all) {
986 for (
auto iType : InteractionTypeOption::getMostOptions()) {
987 _allowedVecPatternsOptions[iType] = allowedVecPatterns;
990 _allowedVecPatternsOptions[interactionType] = allowedVecPatterns;
1001 _allowedInteractionTypeOptions = allowedInteractionTypeOptions;
1008 [[nodiscard]] std::unordered_map<InteractionTypeOption::Value, std::reference_wrapper<const Configuration>>
1010 std::unordered_map<InteractionTypeOption::Value, std::reference_wrapper<const Configuration>> currentConfigs;
1011 currentConfigs.reserve(_tuningManager->getAutoTuners().size());
1013 for (
const auto &[type, tuner] : _tuningManager->getAutoTuners()) {
1014 currentConfigs.emplace(type, std::cref(tuner->getCurrentConfig()));
1016 return currentConfigs;
1024 return _tuningStrategyOptions;
1033 _tuningStrategyOptions = tuningStrategyOptions;
1083#if defined(AUTOPAS_INCLUDE_MPI)
1164 AutoTunerInfo _autoTunerInfo{};
1168 LogicHandlerInfo _logicHandlerInfo{};
1172 bool _useTuningStrategyLoggerProxy{
false};
1177 unsigned int _verletRebuildFrequency{100};
1182 std::vector<TuningStrategyOption> _tuningStrategyOptions{};
1187 std::set<ContainerOption> _allowedContainers{ContainerOption::getMostOptions()};
1192 std::unordered_map<InteractionTypeOption::Value, std::set<TraversalOption>> _allowedTraversals{
1193 {InteractionTypeOption::pairwise, TraversalOption::getMostPairwiseOptions()},
1194 {InteractionTypeOption::triwise, TraversalOption::getMostTriwiseOptions()}};
1199 std::unordered_map<InteractionTypeOption::Value, std::set<DataLayoutOption>> _allowedDataLayouts{
1200 {InteractionTypeOption::pairwise, DataLayoutOption::getMostOptions()},
1201 {InteractionTypeOption::triwise, DataLayoutOption::getMostOptions()}};
1205 std::unordered_map<InteractionTypeOption::Value, std::set<Newton3Option>> _allowedNewton3Options{
1206 {InteractionTypeOption::pairwise, Newton3Option::getMostOptions()},
1207 {InteractionTypeOption::triwise, Newton3Option::getMostOptions()}};
1211 std::unordered_map<InteractionTypeOption::Value, std::set<VectorizationPatternOption>> _allowedVecPatternsOptions{
1212 {InteractionTypeOption::pairwise, VectorizationPatternOption::getMostOptions()},
1215 {InteractionTypeOption::triwise, std::set<VectorizationPatternOption>{VectorizationPatternOption::p1xVec}}};
1220 std::set<InteractionTypeOption> _allowedInteractionTypeOptions{InteractionTypeOption::pairwise};
1224 std::unique_ptr<NumberSet<double>> _allowedCellSizeFactors{
1225 std::make_unique<NumberSetFinite<double>>(std::set<double>({1.}))};
1230 std::set<LoadEstimatorOption> _allowedLoadEstimators{LoadEstimatorOption::getAllOptions()};
1234 std::unique_ptr<LogicHandler<Particle_T>> _logicHandler;
1239 std::shared_ptr<TuningManager> _tuningManager;
1243 bool _externalMPICommunicator{
false};
1248 std::string _outputSuffix{
""};
1252 size_t _sortingThreshold{8};
1264 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:47
void setMaxEvidence(unsigned int maxEvidence)
Set maximum number of evidence for tuning.
Definition: AutoPasDecl.h:734
void setNumSamples(unsigned int numSamples)
Set number of samples taken per configuration during the tuning.
Definition: AutoPasDecl.h:703
void setAllowedNewton3Options(const std::set< Newton3Option > &allowedNewton3Options, const InteractionTypeOption interactionType=InteractionTypeOption::pairwise)
Set the list of allowed newton 3 options.
Definition: AutoPasDecl.h:954
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:844
void setFuzzyRuleFileName(const std::string &fuzzyRuleFileName)
Set fuzzy rule file name for the RuleBasedTuning.
Definition: AutoPasDecl.h:1129
unsigned int getTuningInterval() const
Get tuning interval.
Definition: AutoPasDecl.h:685
unsigned int getMaxTuningPhasesWithoutTest() const
Get the maximum number of tuning phases before a configuration is certainly tested again.
Definition: AutoPasDecl.h:754
const std::set< TraversalOption > & getAllowedTraversals(const InteractionTypeOption interactionType=InteractionTypeOption::pairwise) const
Get the list of allowed traversals.
Definition: AutoPasDecl.h:884
std::vector< Particle_T > updateContainer()
Updates the container.
Definition: AutoPasImpl.h:214
void setTuningMetricOption(TuningMetricOption tuningMetricOption)
Setter for the tuning metric option.
Definition: AutoPasDecl.h:1047
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:539
autopas::ContainerIterator< Particle_T, false, true > RegionConstIteratorT
Define the const region iterator type for ease of use.
Definition: AutoPasDecl.h:76
const std::array< double, 3 > & getBoxMin() const
Get the lower corner of the container without the halo.
Definition: AutoPasImpl.h:327
unsigned int getNumSamples() const
Get number of samples taken per configuration during the tuning.
Definition: AutoPasDecl.h:697
unsigned int getMaxEvidence() const
Get maximum number of evidence for tuning.
Definition: AutoPasDecl.h:728
void setBoxMax(const std::array< double, 3 > &boxMax)
Set coordinates of the upper corner of the domain.
Definition: AutoPasDecl.h:595
void reduce(Lambda reduceLambda, A &result, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Reduce properties of particles as defined by a lambda function.
Definition: AutoPasDecl.h:374
void setUseTuningLogger(bool useTuningLogger)
Set if the tuning information should be logged to a file.
Definition: AutoPasDecl.h:1117
unsigned int getVerletRebuildFrequency() const
Get Verlet rebuild frequency.
Definition: AutoPasDecl.h:660
ConstIteratorT cbegin(IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Iterate over all particles by using for(auto iter = autoPas.begin(); iter.isValid(); ++iter)
Definition: AutoPasDecl.h:382
void addHaloParticles(Collection &&particles)
Adds all halo particles from the collection to the container.
Definition: AutoPasImpl.h:244
const std::set< VectorizationPatternOption > & getAllowedVecPatternOptions(const InteractionTypeOption interactionType=InteractionTypeOption::pairwise) const
Get the list of allowed vectorization pattern options.
Definition: AutoPasDecl.h:971
void reserve(size_t numParticles)
Reserve memory for a given number of particles in the container and logic layers.
Definition: AutoPasImpl.h:159
const std::string & getRuleFileName() const
Get the name / path of the rule file for the RuleBasedTuning.
Definition: AutoPasDecl.h:1137
void setRuleFileName(const std::string &ruleFileName)
Set rule file name for the RuleBasedTuning.
Definition: AutoPasDecl.h:1123
ExtrapolationMethodOption getExtrapolationMethodOption() const
Get extrapolation method for the prediction of the configuration performance.
Definition: AutoPasDecl.h:821
const std::set< DataLayoutOption > & getAllowedDataLayouts(const InteractionTypeOption interactionType=InteractionTypeOption::pairwise) const
Get the list of allowed data layouts.
Definition: AutoPasDecl.h:913
SelectorStrategyOption getSelectorStrategy() const
Get the selector configuration strategy.
Definition: AutoPasDecl.h:837
unsigned int getVerletClusterSize() const
Get Verlet cluster size.
Definition: AutoPasDecl.h:673
void addHaloParticlesIf(Collection &&particles, F predicate)
Adds all halo particles for which predicate(particle) == true to the container.
Definition: AutoPasImpl.h:250
void addParticles(Collection &&particles)
Adds all particles from the collection to the container.
Definition: AutoPasImpl.h:187
void setVerletSkin(double verletSkin)
Set length added to the cutoff for the Verlet lists' skin per timestep.
Definition: AutoPasDecl.h:647
void setOutputSuffix(const std::string &suffix)
Suffix for all output files produced by this instance of AutoPas, e.g.
Definition: AutoPasDecl.h:1103
void setMaxTuningPhasesWithoutTest(unsigned int maxTuningPhasesWithoutTest)
Set the maximum number of tuning phases before a configuration is certainly tested again.
Definition: AutoPasDecl.h:762
void setEnergySensorOption(EnergySensorOption energySensorOption)
Setter for the energy sensor.
Definition: AutoPasDecl.h:1061
unsigned long getContainerType() const
Returns the type of the currently used container.
Definition: AutoPasImpl.h:322
void forEach(Lambda forEachLambda, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
Execute code on all particles as defined by a lambda function.
Definition: AutoPasDecl.h:318
const std::set< ContainerOption > & getAllowedContainers() const
Get the list of allowed containers.
Definition: AutoPasDecl.h:867
void deleteParticle(IteratorT &iter)
Deletes the particle behind the current iterator position and leaves the container in a valid state.
Definition: AutoPasImpl.h:276
void setAcquisitionFunction(AcquisitionFunctionOption acqFun)
Set acquisition function for tuning.
Definition: AutoPasDecl.h:813
void setEarlyStoppingFactor(double earlyStoppingFactor)
Set the earlyStoppingFactor for the auto tuner.
Definition: AutoPasDecl.h:710
void setMPITuningWeightForMaxDensity(double MPITuningWeightForMaxDensity)
Setter for the maxDensity-Weight in calculation for bucket distribution.
Definition: AutoPasDecl.h:1077
void reduceParallel(Lambda reduceLambda, A &result, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Reduce properties of particles as defined by a lambda function.
Definition: AutoPasDecl.h:351
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:526
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:795
void forEachParallel(Lambda forEachLambda, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
execute code on all particles in parallel as defined by a lambda function
Definition: AutoPasDecl.h:296
const EnergySensorOption & getEnergySensorOption() const
Getter for the energy sensor.
Definition: AutoPasDecl.h:1055
double getRelativeOptimumRange() const
Get the range for the optimum in which has to be to be tested.
Definition: AutoPasDecl.h:740
void finalize()
Free the AutoPas MPI communicator.
Definition: AutoPasDecl.h:128
void setCellSizeFactor(double cellSizeFactor)
Set allowed cell size factors to one element (only relevant for LinkedCells, VerletLists and VerletLi...
Definition: AutoPasDecl.h:636
void setRelativeBlacklistRange(double relativeBlacklistRange)
Set the range of the configurations that are not going to be blacklisted.
Definition: AutoPasDecl.h:777
size_t getSortingThreshold() const
Get the sorting-threshold for traversals that use the CellFunctor.
Definition: AutoPasDecl.h:1151
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:786
void addParticlesIf(Collection &&particles, F predicate)
Adds all particles for which predicate(particle) == true to the container.
Definition: AutoPasImpl.h:193
double getRelativeBlacklistRange() const
For Predictive tuning: Get the relative cutoff for configurations to be blacklisted.
Definition: AutoPasDecl.h:771
void setTuningStrategyOption(const std::vector< TuningStrategyOption > &tuningStrategyOptions)
Setter for the tuning strategy option.
Definition: AutoPasDecl.h:1032
autopas::ContainerIterator< Particle_T, true, true > RegionIteratorT
Define the region iterator type for ease of use.
Definition: AutoPasDecl.h:70
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:306
void setAllowedVecPatterns(const std::set< VectorizationPatternOption > &allowedVecPatterns, const InteractionTypeOption interactionType=InteractionTypeOption::pairwise)
Set the list of allowed vectorization pattern options For possible options, see options::Vectorizatio...
Definition: AutoPasDecl.h:983
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:219
void setMPITuningMaxDifferenceForBucket(double MPITuningMaxDifferenceForBucket)
Setter for the maximal Difference for the bucket distribution.
Definition: AutoPasDecl.h:1069
const TuningMetricOption & getTuningMetricOption() const
Getter for the tuning metric option.
Definition: AutoPasDecl.h:1040
void setAllowedCellSizeFactors(const NumberSet< double > &allowedCellSizeFactors)
Set allowed cell size factors (only relevant for LinkedCells, VerletLists and VerletListsCells).
Definition: AutoPasDecl.h:624
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:472
void reduce(Lambda reduceLambda, A &result, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
Reduce properties of particles as defined by a lambda function.
Definition: AutoPasDecl.h:365
void setAllowedLoadEstimators(const std::set< LoadEstimatorOption > &allowedLoadEstimators)
Set the list of allowed load estimation algorithms.
Definition: AutoPasDecl.h:859
double getVerletSkin()
Function to iterate over all pairs of particles in the container.
Definition: AutoPasDecl.h:552
void setAllowedTraversals(const std::set< TraversalOption > &allowedTraversals, const InteractionTypeOption interactionType=InteractionTypeOption::pairwise)
Set the list of allowed traversals.
Definition: AutoPasDecl.h:896
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:341
AcquisitionFunctionOption getAcquisitionFunction() const
Get acquisition function used for tuning.
Definition: AutoPasDecl.h:803
void setVerletClusterSize(unsigned int verletClusterSize)
Set Verlet cluster size.
Definition: AutoPasDecl.h:679
void forEach(Lambda forEachLambda, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Execute code on all particles as defined by a lambda function.
Definition: AutoPasDecl.h:327
const std::array< double, 3 > & getBoxMax() const
Get the upper corner of the container without the halo.
Definition: AutoPasImpl.h:332
const NumberSet< double > & getAllowedCellSizeFactors() const
Get allowed cell size factors (only relevant for LinkedCells, VerletLists and VerletListsCells).
Definition: AutoPasDecl.h:618
void addHaloParticle(const Particle_T &haloParticle)
Adds a particle to the container that lies in the halo region of the container.
Definition: AutoPasImpl.h:238
bool searchSpaceIsTrivial() const
get the bool value indicating if the search space is trivial (not more than one configuration to test...
Definition: AutoPasImpl.h:347
void setAllowedDataLayouts(const std::set< DataLayoutOption > &allowedDataLayouts, const InteractionTypeOption interactionType=InteractionTypeOption::pairwise)
Set the list of allowed data layouts.
Definition: AutoPasDecl.h:925
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:1145
Particle_T ParticleType
Particle type to be accessible after initialization.
Definition: AutoPasDecl.h:52
autopas::ContainerIterator< Particle_T, true, false > IteratorT
Define the iterator type for ease of use.
Definition: AutoPasDecl.h:58
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:309
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:492
double getMeanRebuildFrequency()
Getter for the mean rebuild frequency.
Definition: AutoPasDecl.h:1111
AutoPas & operator=(AutoPas &&other) noexcept
Move assignment operator.
Definition: AutoPasImpl.h:48
void setExtrapolationMethodOption(ExtrapolationMethodOption extrapolationMethodOption)
Set extrapolation method for the prediction of the configuration performance.
Definition: AutoPasDecl.h:829
void setBoxMin(const std::array< double, 3 > &boxMin)
Set coordinates of the lower corner of the domain.
Definition: AutoPasDecl.h:589
void init()
Initialize AutoPas.
Definition: AutoPasImpl.h:55
const std::vector< TuningStrategyOption > & getTuningStrategyOptions() const
Getter for the tuning strategy option.
Definition: AutoPasDecl.h:1023
autopas::ContainerIterator< Particle_T, false, false > ConstIteratorT
Define the const iterator type for ease of use.
Definition: AutoPasDecl.h:64
void forceRetune()
Force the internal tuner to enter a new tuning phase upon the next call to computeInteractions().
Definition: AutoPasImpl.h:233
void setAllowedInteractionTypeOptions(const std::set< InteractionTypeOption > &allowedInteractionTypeOptions)
Set the list of allowed interaction types.
Definition: AutoPasDecl.h:1000
void setVerletRebuildFrequency(unsigned int verletRebuildFrequency)
Set Verlet rebuild frequency.
Definition: AutoPasDecl.h:666
void setDeltaT(double deltaT)
Set time step of the simulation.
Definition: AutoPasDecl.h:654
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:459
const std::set< LoadEstimatorOption > & getAllowedLoadEstimators() const
Get the list of allowed load estimation algorithms.
Definition: AutoPasDecl.h:852
void setUseLOESSSmoothening(bool useLOESSSmoothening)
Set flag for whether a LOESS-based smoothening is used.
Definition: AutoPasDecl.h:722
size_t getNumberOfParticles(IteratorBehavior behavior=IteratorBehavior::owned) const
Returns the number of particles in this container.
Definition: AutoPasImpl.h:141
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:506
void deleteAllParticles()
Deletes all particles.
Definition: AutoPasImpl.h:271
bool computeInteractions(Functor *f)
Function to iterate over all inter-particle interactions in the container This function only handles ...
Definition: AutoPasImpl.h:118
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:427
void addParticle(const Particle_T &p)
Adds a particle to the container.
Definition: AutoPasImpl.h:181
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:441
bool getUseLOESSSmoothening() const
Get flag for whether a LOESS-based smoothening is used.
Definition: AutoPasDecl.h:716
double getCutoff() const
Get cutoff radius.
Definition: AutoPasDecl.h:601
IteratorT begin(IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
Iterate over all particles by using for(auto iter = autoPas.begin(); iter.isValid(); ++iter)
Definition: AutoPasImpl.h:299
std::unordered_map< InteractionTypeOption::Value, std::reference_wrapper< const Configuration > > getCurrentConfigs() const
Getter for the currently selected configuration.
Definition: AutoPasDecl.h:1009
void setRelativeOptimumRange(double relativeOptimumRange)
Set the range for the optimum in which has to be to be tested.
Definition: AutoPasDecl.h:746
void setAllowedContainers(const std::set< ContainerOption > &allowedContainers)
Set the list of allowed containers.
Definition: AutoPasDecl.h:874
void setCutoff(double cutoff)
Set cutoff radius.
Definition: AutoPasDecl.h:607
void setTuningInterval(unsigned int tuningInterval)
Set tuning interval.
Definition: AutoPasDecl.h:691
constexpr bool end() const
Dummy to make range-based for loops work.
Definition: AutoPasDecl.h:394
const std::set< Newton3Option > & getAllowedNewton3Options(const InteractionTypeOption interactionType=InteractionTypeOption::pairwise) const
Get the list of allowed newton 3 options.
Definition: AutoPasDecl.h:942
Public iterator class that iterates over a particle container and additional vectors (which are typic...
Definition: ContainerIterator.h:95
Class representing the different energy sensor options.
Definition: EnergySensorOption.h:19
Functor base class.
Definition: Functor.h:41
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
double deltaT
Time step used in the simulation.
Definition: LogicHandlerInfo.h:46
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:49
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:38
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:64
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:34
decltype(auto) withStaticContainerType(ParticleContainerInterface< Particle_T > &container, FunctionType &&function)
Will execute the passed function body with the static container type of container.
Definition: StaticContainerSelector.h:35
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:83
double mpiTuningMaxDifferenceForBucket
Maximum absolute difference in similarity metric for two ranks to fall in the same bucket.
Definition: TuningStrategyFactoryInfo.h:79
std::string ruleFileName
The name and path of the file where the rules are stored.
Definition: TuningStrategyFactoryInfo.h:62
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:56
std::string fuzzyRuleFileName
The name and path of the file where the rules are stored.
Definition: TuningStrategyFactoryInfo.h:68
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:40
double relativeBlacklistRange
Any configuration that is slower than the fastest times this factor will be blacklisted.
Definition: TuningStrategyFactoryInfo.h:50
ExtrapolationMethodOption extrapolationMethodOption
Function option used for extrapolating performance from observed evidence.
Definition: TuningStrategyFactoryInfo.h:32
double relativeOptimumRange
Factor of the range of the optimal configurations for the optimalSearchSpace.
Definition: TuningStrategyFactoryInfo.h:36
unsigned int minNumberOfEvidence
The number of evidence that have to be collected until the first prediction can be made.
Definition: TuningStrategyFactoryInfo.h:44
AutoPas_MPI_Comm autopasMpiCommunicator
MPI Communicator used within AutoPas.
Definition: TuningStrategyFactoryInfo.h:87