36template <
class Particle_T>
44template <
class Particle_T>
80 explicit AutoPas(std::ostream &logOutputStream = std::cout);
87 explicit AutoPas(
const std::string &logFileName);
114 std::vector<Particle_T>
resizeBox(
const std::array<double, 3> &boxMin,
const std::array<double, 3> &boxMax);
127 if (not _externalMPICommunicator) {
149 void reserve(
size_t numParticles);
160 void reserve(
size_t numParticles,
size_t numHaloParticles);
179 template <
class Collection>
191 template <
class Collection,
class F>
210 template <
class Collection>
222 template <
class Collection,
class F>
268 template <
class Functor>
278 IteratorT begin(IteratorBehavior behavior = IteratorBehavior::ownedOrHalo);
293 template <
typename Lambda>
294 void forEachParallel(Lambda forEachLambda, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
303 template <
typename Lambda>
304 void forEachParallel(Lambda forEachLambda, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
315 template <
typename Lambda>
316 void forEach(Lambda forEachLambda, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
324 template <
typename Lambda>
325 void forEach(Lambda forEachLambda, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
338 template <
typename Lambda,
typename A>
339 void reduceParallel(Lambda reduceLambda, A &result, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
341 withStaticContainerType(getContainer(), [&](
auto &container) { container.reduce(reduceLambda, result, behavior); });
348 template <
typename Lambda,
typename A>
349 void reduceParallel(Lambda reduceLambda, A &result, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
351 withStaticContainerType(getContainer(), [&](
auto &container) { container.reduce(reduceLambda, result, behavior); });
362 template <
typename Lambda,
typename A>
363 void reduce(Lambda reduceLambda, A &result, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
364 withStaticContainerType(getContainer(), [&](
auto &container) { container.reduce(reduceLambda, result, behavior); });
371 template <
typename Lambda,
typename A>
372 void reduce(Lambda reduceLambda, A &result, IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
373 withStaticContainerType(getContainer(), [&](
auto &container) { container.reduce(reduceLambda, result, behavior); });
392 [[nodiscard]]
constexpr bool end()
const {
return false; }
406 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo);
412 const std::array<double, 3> &higherCorner,
413 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const;
424 template <
typename Lambda>
426 const std::array<double, 3> &higherCorner,
427 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
430 container.forEachInRegion(forEachLambda, lowerCorner, higherCorner, behavior);
438 template <
typename Lambda>
440 const std::array<double, 3> &higherCorner,
441 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
444 container.forEachInRegion(forEachLambda, lowerCorner, higherCorner, behavior);
456 template <
typename Lambda>
458 const std::array<double, 3> &higherCorner,
459 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
461 container.forEachInRegion(forEachLambda, lowerCorner, higherCorner, behavior);
469 template <
typename Lambda>
471 const std::array<double, 3> &higherCorner,
472 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
474 container.forEachInRegion(forEachLambda, lowerCorner, higherCorner, behavior);
489 template <
typename Lambda,
typename A>
491 const std::array<double, 3> &higherCorner,
492 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
495 container.reduceInRegion(reduceLambda, result, lowerCorner, higherCorner, behavior);
503 template <
typename Lambda,
typename A>
505 const std::array<double, 3> &higherCorner,
506 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
509 container.reduceInRegion(reduceLambda, result, lowerCorner, higherCorner, behavior);
523 template <
typename Lambda,
typename A>
524 void reduceInRegion(Lambda reduceLambda, A &result,
const std::array<double, 3> &lowerCorner,
525 const std::array<double, 3> &higherCorner,
526 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo) {
528 container.reduceInRegion(reduceLambda, result, lowerCorner, higherCorner, behavior);
536 template <
typename Lambda,
typename A>
537 void reduceInRegion(Lambda reduceLambda, A &result,
const std::array<double, 3> &lowerCorner,
538 const std::array<double, 3> &higherCorner,
539 IteratorBehavior behavior = IteratorBehavior::ownedOrHalo)
const {
541 container.reduceInRegion(reduceLambda, result, lowerCorner, higherCorner, behavior);
557 [[nodiscard]]
size_t getNumberOfParticles(IteratorBehavior behavior = IteratorBehavior::owned)
const;
569 [[nodiscard]]
const std::array<double, 3> &
getBoxMin()
const;
575 [[nodiscard]]
const std::array<double, 3> &
getBoxMax()
const;
587 void setBoxMin(
const std::array<double, 3> &boxMin) { _logicHandlerInfo.
boxMin = boxMin; }
593 void setBoxMax(
const std::array<double, 3> &boxMax) { _logicHandlerInfo.
boxMax = boxMax; }
609 _logicHandlerInfo.
cutoff = cutoff;
623 if (allowedCellSizeFactors.
getMin() <= 0.0) {
625 allowedCellSizeFactors.
getMin());
627 _allowedCellSizeFactors = std::move(allowedCellSizeFactors.
clone());
635 if (cellSizeFactor <= 0.0) {
638 _allowedCellSizeFactors = std::make_unique<NumberSetFinite<double>>(std::set<double>{cellSizeFactor});
665 _verletRebuildFrequency = verletRebuildFrequency;
858 _allowedLoadEstimators = allowedLoadEstimators;
873 _allowedContainers = allowedContainers;
883 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise)
const {
884 return _allowedTraversals.at(interactionType);
895 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise) {
896 if (interactionType == InteractionTypeOption::all) {
897 for (
auto iType : InteractionTypeOption::getMostOptions()) {
898 _allowedTraversals[iType] = allowedTraversals;
901 _allowedTraversals[interactionType] = allowedTraversals;
912 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise)
const {
913 return _allowedDataLayouts.at(interactionType);
924 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise) {
925 if (interactionType == InteractionTypeOption::all) {
926 for (
auto iType : InteractionTypeOption::getMostOptions()) {
927 _allowedDataLayouts[iType] = allowedDataLayouts;
930 _allowedDataLayouts[interactionType] = allowedDataLayouts;
941 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise)
const {
942 return _allowedNewton3Options.at(interactionType);
953 const InteractionTypeOption interactionType = InteractionTypeOption::pairwise) {
954 if (interactionType == InteractionTypeOption::all) {
955 for (
auto iType : InteractionTypeOption::getMostOptions()) {
956 _allowedNewton3Options[iType] = allowedNewton3Options;
959 _allowedNewton3Options[interactionType] = allowedNewton3Options;
970 _allowedInteractionTypeOptions = allowedInteractionTypeOptions;
977 [[nodiscard]] std::unordered_map<InteractionTypeOption::Value, std::reference_wrapper<const Configuration>>
979 std::unordered_map<InteractionTypeOption::Value, std::reference_wrapper<const Configuration>> currentConfigs;
980 currentConfigs.reserve(_autoTuners.size());
982 for (
const auto &[type, tuner] : _autoTuners) {
983 currentConfigs.emplace(type, std::cref(tuner->getCurrentConfig()));
985 return currentConfigs;
993 return _tuningStrategyOptions;
1002 _tuningStrategyOptions = tuningStrategyOptions;
1052#if defined(AUTOPAS_INCLUDE_MPI)
1133 AutoTunerInfo _autoTunerInfo{};
1137 LogicHandlerInfo _logicHandlerInfo{};
1141 bool _useTuningStrategyLoggerProxy{
false};
1146 unsigned int _verletRebuildFrequency{100};
1151 std::vector<TuningStrategyOption> _tuningStrategyOptions{};
1156 std::set<ContainerOption> _allowedContainers{ContainerOption::getMostOptions()};
1161 std::unordered_map<InteractionTypeOption::Value, std::set<TraversalOption>> _allowedTraversals{
1162 {InteractionTypeOption::pairwise, TraversalOption::getMostPairwiseOptions()},
1163 {InteractionTypeOption::triwise, TraversalOption::getMostTriwiseOptions()}};
1168 std::unordered_map<InteractionTypeOption::Value, std::set<DataLayoutOption>> _allowedDataLayouts{
1169 {InteractionTypeOption::pairwise, DataLayoutOption::getMostOptions()},
1170 {InteractionTypeOption::triwise, DataLayoutOption::getMostOptions()}};
1174 std::unordered_map<InteractionTypeOption::Value, std::set<Newton3Option>> _allowedNewton3Options{
1175 {InteractionTypeOption::pairwise, Newton3Option::getMostOptions()},
1176 {InteractionTypeOption::triwise, Newton3Option::getMostOptions()}};
1181 std::set<InteractionTypeOption> _allowedInteractionTypeOptions{InteractionTypeOption::pairwise};
1185 std::unique_ptr<NumberSet<double>> _allowedCellSizeFactors{
1186 std::make_unique<NumberSetFinite<double>>(std::set<double>({1.}))};
1191 std::set<LoadEstimatorOption> _allowedLoadEstimators{LoadEstimatorOption::getAllOptions()};
1195 std::unique_ptr<autopas::LogicHandler<Particle_T>> _logicHandler;
1201 std::unordered_map<InteractionTypeOption::Value, std::unique_ptr<autopas::AutoTuner>> _autoTuners;
1206 bool _externalMPICommunicator{
false};
1211 std::string _outputSuffix{
""};
1215 size_t _sortingThreshold{8};
1227 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:45
void setMaxEvidence(unsigned int maxEvidence)
Set maximum number of evidence for tuning.
Definition: AutoPasDecl.h:732
void setNumSamples(unsigned int numSamples)
Set number of samples taken per configuration during the tuning.
Definition: AutoPasDecl.h:701
void setAllowedNewton3Options(const std::set< Newton3Option > &allowedNewton3Options, const InteractionTypeOption interactionType=InteractionTypeOption::pairwise)
Set the list of allowed newton 3 options.
Definition: AutoPasDecl.h:952
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:842
void setFuzzyRuleFileName(const std::string &fuzzyRuleFileName)
Set fuzzy rule file name for the RuleBasedTuning.
Definition: AutoPasDecl.h:1098
unsigned int getTuningInterval() const
Get tuning interval.
Definition: AutoPasDecl.h:683
unsigned int getMaxTuningPhasesWithoutTest() const
Get the maximum number of tuning phases before a configuration is certainly tested again.
Definition: AutoPasDecl.h:752
const std::set< TraversalOption > & getAllowedTraversals(const InteractionTypeOption interactionType=InteractionTypeOption::pairwise) const
Get the list of allowed traversals.
Definition: AutoPasDecl.h:882
std::vector< Particle_T > updateContainer()
Updates the container.
Definition: AutoPasImpl.h:213
void setTuningMetricOption(TuningMetricOption tuningMetricOption)
Setter for the tuning metric option.
Definition: AutoPasDecl.h:1016
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:537
autopas::ContainerIterator< Particle_T, false, true > RegionConstIteratorT
Define the const region iterator type for ease of use.
Definition: AutoPasDecl.h:74
const std::array< double, 3 > & getBoxMin() const
Get the lower corner of the container without the halo.
Definition: AutoPasImpl.h:328
unsigned int getNumSamples() const
Get number of samples taken per configuration during the tuning.
Definition: AutoPasDecl.h:695
unsigned int getMaxEvidence() const
Get maximum number of evidence for tuning.
Definition: AutoPasDecl.h:726
void setBoxMax(const std::array< double, 3 > &boxMax)
Set coordinates of the upper corner of the domain.
Definition: AutoPasDecl.h:593
void reduce(Lambda reduceLambda, A &result, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Reduce properties of particles as defined by a lambda function.
Definition: AutoPasDecl.h:372
bool searchSpaceIsTrivial()
get the bool value indicating if the search space is trivial (not more than one configuration to test...
Definition: AutoPasImpl.h:348
void setUseTuningLogger(bool useTuningLogger)
Set if the tuning information should be logged to a file.
Definition: AutoPasDecl.h:1086
unsigned int getVerletRebuildFrequency() const
Get Verlet rebuild frequency.
Definition: AutoPasDecl.h:658
ConstIteratorT cbegin(IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Iterate over all particles by using for(auto iter = autoPas.begin(); iter.isValid(); ++iter)
Definition: AutoPasDecl.h:380
void addHaloParticles(Collection &&particles)
Adds all halo particles from the collection to the container.
Definition: AutoPasImpl.h:245
void reserve(size_t numParticles)
Reserve memory for a given number of particles in the container and logic layers.
Definition: AutoPasImpl.h:158
const std::string & getRuleFileName() const
Get the name / path of the rule file for the RuleBasedTuning.
Definition: AutoPasDecl.h:1106
void setRuleFileName(const std::string &ruleFileName)
Set rule file name for the RuleBasedTuning.
Definition: AutoPasDecl.h:1092
ExtrapolationMethodOption getExtrapolationMethodOption() const
Get extrapolation method for the prediction of the configuration performance.
Definition: AutoPasDecl.h:819
const std::set< DataLayoutOption > & getAllowedDataLayouts(const InteractionTypeOption interactionType=InteractionTypeOption::pairwise) const
Get the list of allowed data layouts.
Definition: AutoPasDecl.h:911
SelectorStrategyOption getSelectorStrategy() const
Get the selector configuration strategy.
Definition: AutoPasDecl.h:835
unsigned int getVerletClusterSize() const
Get Verlet cluster size.
Definition: AutoPasDecl.h:671
void addHaloParticlesIf(Collection &&particles, F predicate)
Adds all halo particles for which predicate(particle) == true to the container.
Definition: AutoPasImpl.h:251
void addParticles(Collection &&particles)
Adds all particles from the collection to the container.
Definition: AutoPasImpl.h:186
void setVerletSkin(double verletSkin)
Set length added to the cutoff for the Verlet lists' skin per timestep.
Definition: AutoPasDecl.h:645
void setOutputSuffix(const std::string &suffix)
Suffix for all output files produced by this instance of AutoPas, e.g.
Definition: AutoPasDecl.h:1072
void setMaxTuningPhasesWithoutTest(unsigned int maxTuningPhasesWithoutTest)
Set the maximum number of tuning phases before a configuration is certainly tested again.
Definition: AutoPasDecl.h:760
void setEnergySensorOption(EnergySensorOption energySensorOption)
Setter for the energy sensor.
Definition: AutoPasDecl.h:1030
unsigned long getContainerType() const
Returns the type of the currently used container.
Definition: AutoPasImpl.h:323
void forEach(Lambda forEachLambda, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
Execute code on all particles as defined by a lambda function.
Definition: AutoPasDecl.h:316
const std::set< ContainerOption > & getAllowedContainers() const
Get the list of allowed containers.
Definition: AutoPasDecl.h:865
void deleteParticle(IteratorT &iter)
Deletes the particle behind the current iterator position and leaves the container in a valid state.
Definition: AutoPasImpl.h:277
void setAcquisitionFunction(AcquisitionFunctionOption acqFun)
Set acquisition function for tuning.
Definition: AutoPasDecl.h:811
void setEarlyStoppingFactor(double earlyStoppingFactor)
Set the earlyStoppingFactor for the auto tuner.
Definition: AutoPasDecl.h:708
void setMPITuningWeightForMaxDensity(double MPITuningWeightForMaxDensity)
Setter for the maxDensity-Weight in calculation for bucket distribution.
Definition: AutoPasDecl.h:1046
void reduceParallel(Lambda reduceLambda, A &result, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Reduce properties of particles as defined by a lambda function.
Definition: AutoPasDecl.h:349
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:524
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:793
void forEachParallel(Lambda forEachLambda, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
execute code on all particles in parallel as defined by a lambda function
Definition: AutoPasDecl.h:294
const EnergySensorOption & getEnergySensorOption() const
Getter for the energy sensor.
Definition: AutoPasDecl.h:1024
double getRelativeOptimumRange() const
Get the range for the optimum in which has to be to be tested.
Definition: AutoPasDecl.h:738
void finalize()
Free the AutoPas MPI communicator.
Definition: AutoPasDecl.h:126
void setCellSizeFactor(double cellSizeFactor)
Set allowed cell size factors to one element (only relevant for LinkedCells, VerletLists and VerletLi...
Definition: AutoPasDecl.h:634
void setRelativeBlacklistRange(double relativeBlacklistRange)
Set the range of the configurations that are not going to be blacklisted.
Definition: AutoPasDecl.h:775
size_t getSortingThreshold() const
Get the sorting-threshold for traversals that use the CellFunctor.
Definition: AutoPasDecl.h:1120
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:784
void addParticlesIf(Collection &&particles, F predicate)
Adds all particles for which predicate(particle) == true to the container.
Definition: AutoPasImpl.h:192
double getRelativeBlacklistRange() const
For Predictive tuning: Get the relative cutoff for configurations to be blacklisted.
Definition: AutoPasDecl.h:769
void setTuningStrategyOption(const std::vector< TuningStrategyOption > &tuningStrategyOptions)
Setter for the tuning strategy option.
Definition: AutoPasDecl.h:1001
autopas::ContainerIterator< Particle_T, true, true > RegionIteratorT
Define the region iterator type for ease of use.
Definition: AutoPasDecl.h:68
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:304
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:218
void setMPITuningMaxDifferenceForBucket(double MPITuningMaxDifferenceForBucket)
Setter for the maximal Difference for the bucket distribution.
Definition: AutoPasDecl.h:1038
const TuningMetricOption & getTuningMetricOption() const
Getter for the tuning metric option.
Definition: AutoPasDecl.h:1009
void setAllowedCellSizeFactors(const NumberSet< double > &allowedCellSizeFactors)
Set allowed cell size factors (only relevant for LinkedCells, VerletLists and VerletListsCells).
Definition: AutoPasDecl.h:622
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:470
void reduce(Lambda reduceLambda, A &result, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
Reduce properties of particles as defined by a lambda function.
Definition: AutoPasDecl.h:363
void setAllowedLoadEstimators(const std::set< LoadEstimatorOption > &allowedLoadEstimators)
Set the list of allowed load estimation algorithms.
Definition: AutoPasDecl.h:857
double getVerletSkin()
Function to iterate over all pairs of particles in the container.
Definition: AutoPasDecl.h:550
void setAllowedTraversals(const std::set< TraversalOption > &allowedTraversals, const InteractionTypeOption interactionType=InteractionTypeOption::pairwise)
Set the list of allowed traversals.
Definition: AutoPasDecl.h:894
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:339
AcquisitionFunctionOption getAcquisitionFunction() const
Get acquisition function used for tuning.
Definition: AutoPasDecl.h:801
void setVerletClusterSize(unsigned int verletClusterSize)
Set Verlet cluster size.
Definition: AutoPasDecl.h:677
void forEach(Lambda forEachLambda, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
Execute code on all particles as defined by a lambda function.
Definition: AutoPasDecl.h:325
const std::array< double, 3 > & getBoxMax() const
Get the upper corner of the container without the halo.
Definition: AutoPasImpl.h:333
const NumberSet< double > & getAllowedCellSizeFactors() const
Get allowed cell size factors (only relevant for LinkedCells, VerletLists and VerletListsCells).
Definition: AutoPasDecl.h:616
void addHaloParticle(const Particle_T &haloParticle)
Adds a particle to the container that lies in the halo region of the container.
Definition: AutoPasImpl.h:239
void setAllowedDataLayouts(const std::set< DataLayoutOption > &allowedDataLayouts, const InteractionTypeOption interactionType=InteractionTypeOption::pairwise)
Set the list of allowed data layouts.
Definition: AutoPasDecl.h:923
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:1114
Particle_T ParticleType
Particle type to be accessible after initialization.
Definition: AutoPasDecl.h:50
autopas::ContainerIterator< Particle_T, true, false > IteratorT
Define the iterator type for ease of use.
Definition: AutoPasDecl.h:56
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:310
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:490
double getMeanRebuildFrequency()
Getter for the mean rebuild frequency.
Definition: AutoPasDecl.h:1080
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:827
void setBoxMin(const std::array< double, 3 > &boxMin)
Set coordinates of the lower corner of the domain.
Definition: AutoPasDecl.h:587
void init()
Initialize AutoPas.
Definition: AutoPasImpl.h:55
const std::vector< TuningStrategyOption > & getTuningStrategyOptions() const
Getter for the tuning strategy option.
Definition: AutoPasDecl.h:992
autopas::ContainerIterator< Particle_T, false, false > ConstIteratorT
Define the const iterator type for ease of use.
Definition: AutoPasDecl.h:62
void forceRetune()
Force the internal tuner to enter a new tuning phase upon the next call to computeInteractions().
Definition: AutoPasImpl.h:232
void setAllowedInteractionTypeOptions(const std::set< InteractionTypeOption > &allowedInteractionTypeOptions)
Set the list of allowed interaction types.
Definition: AutoPasDecl.h:969
void setVerletRebuildFrequency(unsigned int verletRebuildFrequency)
Set Verlet rebuild frequency.
Definition: AutoPasDecl.h:664
void setDeltaT(double deltaT)
Set time step of the simulation.
Definition: AutoPasDecl.h:652
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:457
const std::set< LoadEstimatorOption > & getAllowedLoadEstimators() const
Get the list of allowed load estimation algorithms.
Definition: AutoPasDecl.h:850
void setUseLOESSSmoothening(bool useLOESSSmoothening)
Set flag for whether a LOESS-based smoothening is used.
Definition: AutoPasDecl.h:720
size_t getNumberOfParticles(IteratorBehavior behavior=IteratorBehavior::owned) const
Returns the number of particles in this container.
Definition: AutoPasImpl.h:140
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:504
void deleteAllParticles()
Deletes all particles.
Definition: AutoPasImpl.h:272
bool computeInteractions(Functor *f)
Function to iterate over all inter-particle interactions in the container This function only handles ...
Definition: AutoPasImpl.h:117
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:425
void addParticle(const Particle_T &p)
Adds a particle to the container.
Definition: AutoPasImpl.h:180
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:439
bool getUseLOESSSmoothening() const
Get flag for whether a LOESS-based smoothening is used.
Definition: AutoPasDecl.h:714
double getCutoff() const
Get cutoff radius.
Definition: AutoPasDecl.h:599
IteratorT begin(IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
Iterate over all particles by using for(auto iter = autoPas.begin(); iter.isValid(); ++iter)
Definition: AutoPasImpl.h:300
std::unordered_map< InteractionTypeOption::Value, std::reference_wrapper< const Configuration > > getCurrentConfigs() const
Getter for the currently selected configuration.
Definition: AutoPasDecl.h:978
void setRelativeOptimumRange(double relativeOptimumRange)
Set the range for the optimum in which has to be to be tested.
Definition: AutoPasDecl.h:744
void setAllowedContainers(const std::set< ContainerOption > &allowedContainers)
Set the list of allowed containers.
Definition: AutoPasDecl.h:872
void setCutoff(double cutoff)
Set cutoff radius.
Definition: AutoPasDecl.h:605
void setTuningInterval(unsigned int tuningInterval)
Set tuning interval.
Definition: AutoPasDecl.h:689
constexpr bool end() const
Dummy to make range-based for loops work.
Definition: AutoPasDecl.h:392
const std::set< Newton3Option > & getAllowedNewton3Options(const InteractionTypeOption interactionType=InteractionTypeOption::pairwise) const
Get the list of allowed newton 3 options.
Definition: AutoPasDecl.h:940
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: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
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:48
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:63
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:32
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