AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
autopas::AutoPas< Particle_T > Class Template Reference

The AutoPas class is intended to be the main point of Interaction for the user. More...

#include <AutoPasDecl.h>

Public Types

using ParticleType = Particle_T
 Particle type to be accessible after initialization.
 
using IteratorT = autopas::ContainerIterator< Particle_T, true, false >
 Define the iterator type for ease of use.
 
using ConstIteratorT = autopas::ContainerIterator< Particle_T, false, false >
 Define the const iterator type for ease of use.
 
using RegionIteratorT = autopas::ContainerIterator< Particle_T, true, true >
 Define the region iterator type for ease of use.
 
using RegionConstIteratorT = autopas::ContainerIterator< Particle_T, false, true >
 Define the const region iterator type for ease of use.
 

Public Member Functions

 AutoPas (std::ostream &logOutputStream=std::cout)
 Constructor for the autopas class.
 
AutoPasoperator= (AutoPas &&other) noexcept
 Move assignment operator.
 
void init ()
 Initialize AutoPas.
 
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.
 
void forceRetune ()
 Force the internal tuner to enter a new tuning phase upon the next call to computeInteractions().
 
void finalize ()
 Free the AutoPas MPI communicator.
 
std::vector< Particle_T > updateContainer ()
 Updates the container.
 
void reserve (size_t numParticles)
 Reserve memory for a given number of particles in the container and logic layers.
 
void reserve (size_t numParticles, size_t numHaloParticles)
 Reserve memory for a given number of particles in the container and logic layers (e.g.
 
void addParticle (const Particle_T &p)
 Adds a particle to the container.
 
template<class Collection >
void addParticles (Collection &&particles)
 Adds all particles from the collection to the container.
 
template<class Collection , class F >
void addParticlesIf (Collection &&particles, F predicate)
 Adds all particles for which predicate(particle) == true to the container.
 
void addHaloParticle (const Particle_T &haloParticle)
 Adds a particle to the container that lies in the halo region of the container.
 
template<class Collection >
void addHaloParticles (Collection &&particles)
 Adds all halo particles from the collection to the container.
 
template<class Collection , class F >
void addHaloParticlesIf (Collection &&particles, F predicate)
 Adds all halo particles for which predicate(particle) == true to the container.
 
void deleteAllParticles ()
 Deletes all particles.
 
void deleteParticle (IteratorT &iter)
 Deletes the particle behind the current iterator position and leaves the container in a valid state.
 
void deleteParticle (RegionIteratorT &iter)
 Deletes the particle behind the current iterator position and leaves the container in a valid state.
 
bool deleteParticle (Particle_T &particle)
 Deletes the given particle and leaves the container in a valid state.
 
template<class Functor >
bool computeInteractions (Functor *f)
 Function to iterate over all inter-particle interactions in the container This function only handles short-range interactions.
 
IteratorT begin (IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
 Iterate over all particles by using for(auto iter = autoPas.begin(); iter.isValid(); ++iter)
 
ConstIteratorT begin (IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
 Iterate over all particles by using for(auto iter = autoPas.begin(); iter.isValid(); ++iter)
 
template<typename Lambda >
void forEachParallel (Lambda forEachLambda, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
 execute code on all particles in parallel as defined by a lambda function
 
template<typename Lambda >
void forEachParallel (Lambda forEachLambda, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
 execute code on all particles in parallel as defined by a lambda function
 
template<typename Lambda >
void forEach (Lambda forEachLambda, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
 Execute code on all particles as defined by a lambda function.
 
template<typename Lambda >
void forEach (Lambda forEachLambda, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
 Execute code on all particles as defined by a lambda function.
 
template<typename Lambda , typename A >
void reduceParallel (Lambda reduceLambda, A &result, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
 Reduce properties of particles in parallel as defined by a lambda function.
 
template<typename Lambda , typename A >
void reduceParallel (Lambda reduceLambda, A &result, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
 Reduce properties of particles as defined by a lambda function.
 
template<typename Lambda , typename A >
void reduce (Lambda reduceLambda, A &result, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo)
 Reduce properties of particles as defined by a lambda function.
 
template<typename Lambda , typename A >
void reduce (Lambda reduceLambda, A &result, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
 Reduce properties of particles as defined by a lambda function.
 
ConstIteratorT cbegin (IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
 Iterate over all particles by using for(auto iter = autoPas.begin(); iter.isValid(); ++iter)
 
constexpr bool end () const
 Dummy to make range-based for loops work.
 
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.
 
RegionConstIteratorT getRegionIterator (const std::array< double, 3 > &lowerCorner, const std::array< double, 3 > &higherCorner, IteratorBehavior behavior=IteratorBehavior::ownedOrHalo) const
 Iterate over all particles in a specified region.
 
template<typename Lambda >
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.
 
template<typename Lambda >
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.
 
template<typename Lambda >
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.
 
template<typename Lambda >
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.
 
template<typename Lambda , typename A >
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.
 
template<typename Lambda , typename A >
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.
 
template<typename Lambda , typename A >
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.
 
template<typename Lambda , typename A >
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.
 
double getVerletSkin ()
 Function to iterate over all pairs of particles in the container.
 
size_t getNumberOfParticles (IteratorBehavior behavior=IteratorBehavior::owned) const
 Returns the number of particles in this container.
 
unsigned long getContainerType () const
 Returns the type of the currently used container.
 
const std::array< double, 3 > & getBoxMin () const
 Get the lower corner of the container without the halo.
 
const std::array< double, 3 > & getBoxMax () const
 Get the upper corner of the container without the halo.
 
bool searchSpaceIsTrivial ()
 get the bool value indicating if the search space is trivial (not more than one configuration to test).
 
void setBoxMin (const std::array< double, 3 > &boxMin)
 Set coordinates of the lower corner of the domain.
 
void setBoxMax (const std::array< double, 3 > &boxMax)
 Set coordinates of the upper corner of the domain.
 
double getCutoff () const
 Get cutoff radius.
 
void setCutoff (double cutoff)
 Set cutoff radius.
 
const NumberSet< double > & getAllowedCellSizeFactors () const
 Get allowed cell size factors (only relevant for LinkedCells, VerletLists and VerletListsCells).
 
void setAllowedCellSizeFactors (const NumberSet< double > &allowedCellSizeFactors)
 Set allowed cell size factors (only relevant for LinkedCells, VerletLists and VerletListsCells).
 
void setCellSizeFactor (double cellSizeFactor)
 Set allowed cell size factors to one element (only relevant for LinkedCells, VerletLists and VerletListsCells).
 
void setVerletSkin (double verletSkin)
 Set length added to the cutoff for the Verlet lists' skin per timestep.
 
unsigned int getVerletRebuildFrequency () const
 Get Verlet rebuild frequency.
 
void setVerletRebuildFrequency (unsigned int verletRebuildFrequency)
 Set Verlet rebuild frequency.
 
unsigned int getVerletClusterSize () const
 Get Verlet cluster size.
 
void setVerletClusterSize (unsigned int verletClusterSize)
 Set Verlet cluster size.
 
unsigned int getTuningInterval () const
 Get tuning interval.
 
void setTuningInterval (unsigned int tuningInterval)
 Set tuning interval.
 
unsigned int getNumSamples () const
 Get number of samples taken per configuration during the tuning.
 
void setNumSamples (unsigned int numSamples)
 Set number of samples taken per configuration during the tuning.
 
void setEarlyStoppingFactor (double earlyStoppingFactor)
 Set the earlyStoppingFactor for the auto tuner.
 
bool getUseLOESSSmoothening () const
 Get flag for whether a LOESS-based smoothening is used.
 
void setUseLOESSSmoothening (bool useLOESSSmoothening)
 Set flag for whether a LOESS-based smoothening is used.
 
unsigned int getMaxEvidence () const
 Get maximum number of evidence for tuning.
 
void setMaxEvidence (unsigned int maxEvidence)
 Set maximum number of evidence for tuning.
 
double getRelativeOptimumRange () const
 Get the range for the optimum in which has to be to be tested.
 
void setRelativeOptimumRange (double relativeOptimumRange)
 Set the range for the optimum in which has to be to be tested.
 
unsigned int getMaxTuningPhasesWithoutTest () const
 Get the maximum number of tuning phases before a configuration is certainly tested again.
 
void setMaxTuningPhasesWithoutTest (unsigned int maxTuningPhasesWithoutTest)
 Set the maximum number of tuning phases before a configuration is certainly tested again.
 
double getRelativeBlacklistRange () const
 For Predictive tuning: Get the relative cutoff for configurations to be blacklisted.
 
void setRelativeBlacklistRange (double relativeBlacklistRange)
 Set the range of the configurations that are not going to be blacklisted.
 
unsigned int getEvidenceFirstPrediction () const
 Get the number of tests that need to have happened for a configuration until the first predictions are going to be calculated.
 
void setEvidenceFirstPrediction (unsigned int evidenceFirstPrediction)
 Set the number of tests that need to have happened for a configuration until the first predictions are going to be calculated.
 
AcquisitionFunctionOption getAcquisitionFunction () const
 Get acquisition function used for tuning.
 
void setAcquisitionFunction (AcquisitionFunctionOption acqFun)
 Set acquisition function for tuning.
 
ExtrapolationMethodOption getExtrapolationMethodOption () const
 Get extrapolation method for the prediction of the configuration performance.
 
void setExtrapolationMethodOption (ExtrapolationMethodOption extrapolationMethodOption)
 Set extrapolation method for the prediction of the configuration performance.
 
SelectorStrategyOption getSelectorStrategy () const
 Get the selector configuration strategy.
 
void setSelectorStrategy (SelectorStrategyOption selectorStrategy)
 Set the strategy of how to select a performance value for a piece of evidence from multiple time measurements (=samples).
 
const std::set< LoadEstimatorOption > & getAllowedLoadEstimators () const
 Get the list of allowed load estimation algorithms.
 
void setAllowedLoadEstimators (const std::set< LoadEstimatorOption > &allowedLoadEstimators)
 Set the list of allowed load estimation algorithms.
 
const std::set< ContainerOption > & getAllowedContainers () const
 Get the list of allowed containers.
 
void setAllowedContainers (const std::set< ContainerOption > &allowedContainers)
 Set the list of allowed containers.
 
const std::set< TraversalOption > & getAllowedTraversals (const InteractionTypeOption interactionType=InteractionTypeOption::pairwise) const
 Get the list of allowed traversals.
 
void setAllowedTraversals (const std::set< TraversalOption > &allowedTraversals, const InteractionTypeOption interactionType=InteractionTypeOption::pairwise)
 Set the list of allowed traversals.
 
const std::set< DataLayoutOption > & getAllowedDataLayouts (const InteractionTypeOption interactionType=InteractionTypeOption::pairwise) const
 Get the list of allowed data layouts.
 
void setAllowedDataLayouts (const std::set< DataLayoutOption > &allowedDataLayouts, const InteractionTypeOption interactionType=InteractionTypeOption::pairwise)
 Set the list of allowed data layouts.
 
const std::set< Newton3Option > & getAllowedNewton3Options (const InteractionTypeOption interactionType=InteractionTypeOption::pairwise) const
 Get the list of allowed newton 3 options.
 
void setAllowedNewton3Options (const std::set< Newton3Option > &allowedNewton3Options, const InteractionTypeOption interactionType=InteractionTypeOption::pairwise)
 Set the list of allowed newton 3 options.
 
void setAllowedInteractionTypeOptions (const std::set< InteractionTypeOption > &allowedInteractionTypeOptions)
 Set the list of allowed interaction types.
 
std::unordered_map< InteractionTypeOption::Value, std::reference_wrapper< const Configuration > > getCurrentConfigs () const
 Getter for the currently selected configuration.
 
const std::vector< TuningStrategyOption > & getTuningStrategyOptions () const
 Getter for the tuning strategy option.
 
void setTuningStrategyOption (const std::vector< TuningStrategyOption > &tuningStrategyOptions)
 Setter for the tuning strategy option.
 
const TuningMetricOptiongetTuningMetricOption () const
 Getter for the tuning metric option.
 
void setTuningMetricOption (TuningMetricOption tuningMetricOption)
 Setter for the tuning metric option.
 
const EnergySensorOptiongetEnergySensorOption () const
 Getter for the energy sensor.
 
void setEnergySensorOption (EnergySensorOption energySensorOption)
 Setter for the energy sensor.
 
void setMPITuningMaxDifferenceForBucket (double MPITuningMaxDifferenceForBucket)
 Setter for the maximal Difference for the bucket distribution.
 
void setMPITuningWeightForMaxDensity (double MPITuningWeightForMaxDensity)
 Setter for the maxDensity-Weight in calculation for bucket distribution.
 
void setOutputSuffix (const std::string &suffix)
 Suffix for all output files produced by this instance of AutoPas, e.g.
 
double getMeanRebuildFrequency ()
 Getter for the mean rebuild frequency.
 
void setUseTuningLogger (bool useTuningLogger)
 Set if the tuning information should be logged to a file.
 
void setRuleFileName (const std::string &ruleFileName)
 Set rule file name for the RuleBasedTuning.
 
void setFuzzyRuleFileName (const std::string &fuzzyRuleFileName)
 Set fuzzy rule file name for the RuleBasedTuning.
 
const std::string & getRuleFileName () const
 Get the name / path of the rule file for the RuleBasedTuning.
 
void setSortingThreshold (size_t sortingThreshold)
 Set the sorting-threshold for traversals that use the CellFunctor If the sum of the number of particles in two cells is greater or equal to that value, the CellFunctor creates a sorted view of the particles to avoid unnecessary distance checks.
 
size_t getSortingThreshold () const
 Get the sorting-threshold for traversals that use the CellFunctor.
 

Detailed Description

template<class Particle_T>
class autopas::AutoPas< Particle_T >

The AutoPas class is intended to be the main point of Interaction for the user.

It acts as an interface from where all features of the library can be triggered and configured.

Template Parameters
Particle_TClass for particles
ParticleCellClass for the particle cells

Member Typedef Documentation

◆ ConstIteratorT

template<class Particle_T >
using autopas::AutoPas< Particle_T >::ConstIteratorT = autopas::ContainerIterator<Particle_T, false, false>

Define the const iterator type for ease of use.

Also for external use. Helps to, e.g., wrap the AutoPas iterators

◆ IteratorT

template<class Particle_T >
using autopas::AutoPas< Particle_T >::IteratorT = autopas::ContainerIterator<Particle_T, true, false>

Define the iterator type for ease of use.

Also for external use. Helps to, e.g., wrap the AutoPas iterators

◆ RegionConstIteratorT

template<class Particle_T >
using autopas::AutoPas< Particle_T >::RegionConstIteratorT = autopas::ContainerIterator<Particle_T, false, true>

Define the const region iterator type for ease of use.

Also for external use. Helps to, e.g., wrap the AutoPas iterators

◆ RegionIteratorT

template<class Particle_T >
using autopas::AutoPas< Particle_T >::RegionIteratorT = autopas::ContainerIterator<Particle_T, true, true>

Define the region iterator type for ease of use.

Also for external use. Helps to, e.g., wrap the AutoPas iterators

Constructor & Destructor Documentation

◆ AutoPas()

template<class Particle_T >
autopas::AutoPas< Particle_T >::AutoPas ( std::ostream &  logOutputStream = std::cout)
explicit

Constructor for the autopas class.

Parameters
logOutputStreamStream where log output should go to. Default is std::out.

Member Function Documentation

◆ addHaloParticle()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::addHaloParticle ( const Particle_T &  haloParticle)

Adds a particle to the container that lies in the halo region of the container.

Parameters
haloParticleParticle to be added.
Note
An exception is thrown if the halo particle is added and it is inside of the owned domain (defined by boxMin and boxMax) of the container.
This function is NOT thread-safe if the container is Octree.

◆ addHaloParticles()

template<class Particle_T >
template<class Collection >
void autopas::AutoPas< Particle_T >::addHaloParticles ( Collection &&  particles)

Adds all halo particles from the collection to the container.

Note
This function uses reserve().
This function uses addHaloParticle().
Template Parameters
CollectionCollection type that contains the particles (e.g. std::vector). Needs to support .size().
Parameters
particles

◆ addHaloParticlesIf()

template<class Particle_T >
template<class Collection , class F >
void autopas::AutoPas< Particle_T >::addHaloParticlesIf ( Collection &&  particles,
predicate 
)

Adds all halo particles for which predicate(particle) == true to the container.

Note
This function uses reserve().
This function uses addHaloParticle().
Template Parameters
CollectionCollection type that contains the particles (e.g. std::vector). Needs to support .size().
FFunction type of predicate. Should be of the form: (const Particle_T &) -> bool.
Parameters
particlesParticles that are potentially added.
predicateCondition that determines if an individual particle should be added.

◆ addParticle()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::addParticle ( const Particle_T &  p)

Adds a particle to the container.

This is only allowed if the neighbor lists are not valid.

Parameters
pReference to the particle to be added
Note
An exception is thrown if the particle is added and it is not inside of the owned domain (defined by boxMin and boxMax) of the container.
This function is NOT thread-safe if the container is Octree.

◆ addParticles()

template<class Particle_T >
template<class Collection >
void autopas::AutoPas< Particle_T >::addParticles ( Collection &&  particles)

Adds all particles from the collection to the container.

Note
This function uses reserve().
This function uses addParticle().
Template Parameters
CollectionCollection type that contains the particles (e.g. std::vector). Needs to support .size().
Parameters
particles

◆ addParticlesIf()

template<class Particle_T >
template<class Collection , class F >
void autopas::AutoPas< Particle_T >::addParticlesIf ( Collection &&  particles,
predicate 
)

Adds all particles for which predicate(particle) == true to the container.

Note
This function uses reserve().
This function uses addParticle().
Template Parameters
CollectionCollection type that contains the particles (e.g. std::vector). Needs to support .size().
FFunction type of predicate. Should be of the form: (const Particle_T &) -> bool.
Parameters
particlesParticles that are potentially added.
predicateCondition that determines if an individual particle should be added.

◆ begin() [1/2]

template<class Particle_T >
AutoPas< Particle_T >::IteratorT autopas::AutoPas< Particle_T >::begin ( IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo)

Iterate over all particles by using for(auto iter = autoPas.begin(); iter.isValid(); ++iter)

Parameters
behaviorThe behavior of the iterator. You can specify whether to iterate over owned particles, halo particles, or both.
Returns
iterator to the first particle.

◆ begin() [2/2]

template<class Particle_T >
AutoPas< Particle_T >::ConstIteratorT autopas::AutoPas< Particle_T >::begin ( IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo) const

Iterate over all particles by using for(auto iter = autoPas.begin(); iter.isValid(); ++iter)

Parameters
behaviorThe behavior of the iterator. You can specify whether to iterate over owned particles, halo particles, or both.
Returns
iterator to the first particle.
Note
const version

◆ cbegin()

template<class Particle_T >
ConstIteratorT autopas::AutoPas< Particle_T >::cbegin ( IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo) const
inline

Iterate over all particles by using for(auto iter = autoPas.begin(); iter.isValid(); ++iter)

Parameters
behaviorThe behavior of the iterator. You can specify whether to iterate over owned particles, halo particles, or both.
Returns
iterator to the first particle.
Note
cbegin will guarantee to return a const_iterator.

◆ computeInteractions()

template<class Particle_T >
template<class Functor >
bool autopas::AutoPas< Particle_T >::computeInteractions ( Functor f)

Function to iterate over all inter-particle interactions in the container This function only handles short-range interactions.

Parameters
fFunctor that describes the interaction (e.g. force).
Returns
true if this was a tuning iteraction.

◆ deleteAllParticles()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::deleteAllParticles

Deletes all particles.

Note
This invalidates the container, a rebuild is forced on the next computeInteractions() call.

◆ deleteParticle() [1/3]

template<class Particle_T >
void autopas::AutoPas< Particle_T >::deleteParticle ( IteratorT iter)

Deletes the particle behind the current iterator position and leaves the container in a valid state.

Internally, depending on the container, this might just mark the particle as deleted without actually removing it. If this can not be done without compromising e.g. a VerletList reference structure the particle is only marked.

Parameters
iterNeeds to be a modify-able iterator.

◆ deleteParticle() [2/3]

template<class Particle_T >
bool autopas::AutoPas< Particle_T >::deleteParticle ( Particle_T &  particle)

Deletes the given particle and leaves the container in a valid state.

Internally, depending on the container, this might just mark the particle as deleted without actually removing it. If this can not be done without compromising e.g. a VerletList reference structure the particle is only marked.

Note
This function might invalidate iterators.
Parameters
particleReference to the particle that should be deleted.
Returns
True iff the reference still points to a valid particle.

◆ deleteParticle() [3/3]

template<class Particle_T >
void autopas::AutoPas< Particle_T >::deleteParticle ( RegionIteratorT iter)

Deletes the particle behind the current iterator position and leaves the container in a valid state.

Internally, depending on the container, this might just mark the particle as deleted without actually removing it. If this can not be done without compromising e.g. a VerletList reference structure the particle is only marked.

Parameters
iterNeeds to be a modify-able iterator.

Region Iterator version.

◆ end()

template<class Particle_T >
constexpr bool autopas::AutoPas< Particle_T >::end ( ) const
inlineconstexpr

Dummy to make range-based for loops work.

Range-Based for loops use the incremented begin() expression and compare it against the end() expression. ContainerIterator implements ContainerIterator::operator==() that accepts a bool as right hand side argument, which is triggered by this end() function. This operator then proceeds to check the validity of the iterator itself.

Returns
false

◆ finalize()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::finalize ( )
inline

Free the AutoPas MPI communicator.

To be called before MPI_Finalize. If no MPI is used just call this at the end of the program.

◆ forEach() [1/2]

template<class Particle_T >
template<typename Lambda >
void autopas::AutoPas< Particle_T >::forEach ( Lambda  forEachLambda,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
)
inline

Execute code on all particles as defined by a lambda function.

Template Parameters
Lambda(Particle_T &p) -> void
Parameters
forEachLambdacode to be executed on all particles
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownerOrHalo

◆ forEach() [2/2]

template<class Particle_T >
template<typename Lambda >
void autopas::AutoPas< Particle_T >::forEach ( Lambda  forEachLambda,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
) const
inline

Execute code on all particles as defined by a lambda function.

Template Parameters
Lambda(Particle_T &p) -> void
Parameters
forEachLambdacode to be executed on all particles
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownerOrHalo
Note
const version

◆ forEachInRegion() [1/2]

template<class Particle_T >
template<typename Lambda >
void autopas::AutoPas< Particle_T >::forEachInRegion ( Lambda  forEachLambda,
const std::array< double, 3 > &  lowerCorner,
const std::array< double, 3 > &  higherCorner,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
)
inline

Execute code on all particles in a certain region as defined by a lambda function.

Template Parameters
Lambda(Particle_T &p) -> void
Parameters
forEachLambdacode to be executed on all particles
lowerCornerlower corner of bounding box
higherCornerhigher corner of bounding box
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownerOrHalo

◆ forEachInRegion() [2/2]

template<class Particle_T >
template<typename Lambda >
void autopas::AutoPas< Particle_T >::forEachInRegion ( Lambda  forEachLambda,
const std::array< double, 3 > &  lowerCorner,
const std::array< double, 3 > &  higherCorner,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
) const
inline

Execute code on all particles in a certain region as defined by a lambda function.

Template Parameters
Lambda(Particle_T &p) -> void
Parameters
forEachLambdacode to be executed on all particles
lowerCornerlower corner of bounding box
higherCornerhigher corner of bounding box
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownerOrHalo
Note
const version

◆ forEachInRegionParallel() [1/2]

template<class Particle_T >
template<typename Lambda >
void autopas::AutoPas< Particle_T >::forEachInRegionParallel ( Lambda  forEachLambda,
const std::array< double, 3 > &  lowerCorner,
const std::array< double, 3 > &  higherCorner,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
)
inline

Execute code on all particles in a certain region in parallel as defined by a lambda function.

Template Parameters
Lambda(Particle_T &p) -> void
Parameters
forEachLambdacode to be executed on all particles
lowerCornerlower corner of bounding box
higherCornerhigher corner of bounding box
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownerOrHalo
Note
not actually parallel until kokkos integration

◆ forEachInRegionParallel() [2/2]

template<class Particle_T >
template<typename Lambda >
void autopas::AutoPas< Particle_T >::forEachInRegionParallel ( Lambda  forEachLambda,
const std::array< double, 3 > &  lowerCorner,
const std::array< double, 3 > &  higherCorner,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
) const
inline

Execute code on all particles in a certain region in parallel as defined by a lambda function.

Template Parameters
Lambda(Particle_T &p) -> void
Parameters
forEachLambdacode to be executed on all particles
lowerCornerlower corner of bounding box
higherCornerhigher corner of bounding box
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownerOrHalo
Note
not actually parallel until kokkos integration
const version

◆ forEachParallel() [1/2]

template<class Particle_T >
template<typename Lambda >
void autopas::AutoPas< Particle_T >::forEachParallel ( Lambda  forEachLambda,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
)
inline

execute code on all particles in parallel as defined by a lambda function

Template Parameters
Lambda(Particle_T &p) -> void
Parameters
forEachLambdacode to be executed on all particles
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownerOrHalo
Note
not actually parallel until kokkos integration

◆ forEachParallel() [2/2]

template<class Particle_T >
template<typename Lambda >
void autopas::AutoPas< Particle_T >::forEachParallel ( Lambda  forEachLambda,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
) const
inline

execute code on all particles in parallel as defined by a lambda function

Template Parameters
Lambda(Particle_T &p) -> void
Parameters
forEachLambdacode to be executed on all particles
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownerOrHalo
Note
not actually parallel until kokkos integration
const version

◆ getAcquisitionFunction()

template<class Particle_T >
AcquisitionFunctionOption autopas::AutoPas< Particle_T >::getAcquisitionFunction ( ) const
inline

Get acquisition function used for tuning.

Returns

◆ getAllowedCellSizeFactors()

template<class Particle_T >
const NumberSet< double > & autopas::AutoPas< Particle_T >::getAllowedCellSizeFactors ( ) const
inline

Get allowed cell size factors (only relevant for LinkedCells, VerletLists and VerletListsCells).

Returns

◆ getAllowedContainers()

template<class Particle_T >
const std::set< ContainerOption > & autopas::AutoPas< Particle_T >::getAllowedContainers ( ) const
inline

Get the list of allowed containers.

Returns

◆ getAllowedDataLayouts()

template<class Particle_T >
const std::set< DataLayoutOption > & autopas::AutoPas< Particle_T >::getAllowedDataLayouts ( const InteractionTypeOption  interactionType = InteractionTypeOption::pairwise) const
inline

Get the list of allowed data layouts.

Returns
Parameters
interactionTypeGet allowed data layouts for this interaction type. Defaults to InteractionTypeOption::pairwise.

◆ getAllowedLoadEstimators()

template<class Particle_T >
const std::set< LoadEstimatorOption > & autopas::AutoPas< Particle_T >::getAllowedLoadEstimators ( ) const
inline

Get the list of allowed load estimation algorithms.

Returns

◆ getAllowedNewton3Options()

template<class Particle_T >
const std::set< Newton3Option > & autopas::AutoPas< Particle_T >::getAllowedNewton3Options ( const InteractionTypeOption  interactionType = InteractionTypeOption::pairwise) const
inline

Get the list of allowed newton 3 options.

Parameters
interactionTypeGet allowed newton 3 options for this interaction type. Defaults to InteractionTypeOption::pairwise.
Returns

◆ getAllowedTraversals()

template<class Particle_T >
const std::set< TraversalOption > & autopas::AutoPas< Particle_T >::getAllowedTraversals ( const InteractionTypeOption  interactionType = InteractionTypeOption::pairwise) const
inline

Get the list of allowed traversals.

Parameters
interactionTypeGet allowed traversals for this interaction type. Defaults to InteractionTypeOption::pairwise.
Returns

◆ getBoxMax()

template<class Particle_T >
const std::array< double, 3 > & autopas::AutoPas< Particle_T >::getBoxMax

Get the upper corner of the container without the halo.

Returns
upper corner of the container.

◆ getBoxMin()

template<class Particle_T >
const std::array< double, 3 > & autopas::AutoPas< Particle_T >::getBoxMin

Get the lower corner of the container without the halo.

Returns
lower corner of the container.

◆ getContainerType()

template<class Particle_T >
unsigned long autopas::AutoPas< Particle_T >::getContainerType

Returns the type of the currently used container.

Returns
The type of the used container is returned.

◆ getCurrentConfigs()

template<class Particle_T >
std::unordered_map< InteractionTypeOption::Value, std::reference_wrapper< const Configuration > > autopas::AutoPas< Particle_T >::getCurrentConfigs ( ) const
inline

Getter for the currently selected configuration.

Returns
Configuration objects currently used for respective interaction types.

◆ getCutoff()

template<class Particle_T >
double autopas::AutoPas< Particle_T >::getCutoff ( ) const
inline

Get cutoff radius.

Returns

◆ getEnergySensorOption()

template<class Particle_T >
const EnergySensorOption & autopas::AutoPas< Particle_T >::getEnergySensorOption ( ) const
inline

Getter for the energy sensor.

Returns

◆ getEvidenceFirstPrediction()

template<class Particle_T >
unsigned int autopas::AutoPas< Particle_T >::getEvidenceFirstPrediction ( ) const
inline

Get the number of tests that need to have happened for a configuration until the first predictions are going to be calculated.

Returns

◆ getExtrapolationMethodOption()

template<class Particle_T >
ExtrapolationMethodOption autopas::AutoPas< Particle_T >::getExtrapolationMethodOption ( ) const
inline

Get extrapolation method for the prediction of the configuration performance.

Returns

◆ getMaxEvidence()

template<class Particle_T >
unsigned int autopas::AutoPas< Particle_T >::getMaxEvidence ( ) const
inline

Get maximum number of evidence for tuning.

Returns

◆ getMaxTuningPhasesWithoutTest()

template<class Particle_T >
unsigned int autopas::AutoPas< Particle_T >::getMaxTuningPhasesWithoutTest ( ) const
inline

Get the maximum number of tuning phases before a configuration is certainly tested again.

Returns

◆ getMeanRebuildFrequency()

template<class Particle_T >
double autopas::AutoPas< Particle_T >::getMeanRebuildFrequency ( )
inline

Getter for the mean rebuild frequency.

Helpful for determining the frequency for the dynamic containers as well as for determining fast particles by computing skinPerStep for static container

Returns
Value of the mean rebuild frequency as double

◆ getNumberOfParticles()

template<class Particle_T >
size_t autopas::AutoPas< Particle_T >::getNumberOfParticles ( IteratorBehavior  behavior = IteratorBehavior::owned) const

Returns the number of particles in this container.

Parameters
behaviorTells this function to report the number of halo, owned or all particles.
Returns
the number of particles in this container.

◆ getNumSamples()

template<class Particle_T >
unsigned int autopas::AutoPas< Particle_T >::getNumSamples ( ) const
inline

Get number of samples taken per configuration during the tuning.

Returns

◆ getRegionIterator() [1/2]

template<class Particle_T >
AutoPas< Particle_T >::RegionIteratorT autopas::AutoPas< Particle_T >::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.

++
for (auto iter = container.getRegionIterator(lowCorner, highCorner); iter.isValid(); ++iter) { }
Parameters
lowerCornerlower corner of the region
higherCornerhigher corner of the region
behaviorthe behavior of the iterator. You can specify whether to iterate over owned particles, halo particles, or both.
Returns
iterator to iterate over all particles in a specific region

◆ getRegionIterator() [2/2]

template<class Particle_T >
AutoPas< Particle_T >::RegionConstIteratorT autopas::AutoPas< Particle_T >::getRegionIterator ( const std::array< double, 3 > &  lowerCorner,
const std::array< double, 3 > &  higherCorner,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
) const

Iterate over all particles in a specified region.

++
for (auto iter = container.getRegionIterator(lowCorner, highCorner); iter.isValid(); ++iter) { }
Parameters
lowerCornerlower corner of the region
higherCornerhigher corner of the region
behaviorthe behavior of the iterator. You can specify whether to iterate over owned particles, halo particles, or both.
Returns
iterator to iterate over all particles in a specific region
Note
const version

◆ getRelativeBlacklistRange()

template<class Particle_T >
double autopas::AutoPas< Particle_T >::getRelativeBlacklistRange ( ) const
inline

For Predictive tuning: Get the relative cutoff for configurations to be blacklisted.

E.g. 2.5 means all configurations that take 2.5x the time of the optimum are blacklisted.

Returns

◆ getRelativeOptimumRange()

template<class Particle_T >
double autopas::AutoPas< Particle_T >::getRelativeOptimumRange ( ) const
inline

Get the range for the optimum in which has to be to be tested.

Returns

◆ getRuleFileName()

template<class Particle_T >
const std::string & autopas::AutoPas< Particle_T >::getRuleFileName ( ) const
inline

Get the name / path of the rule file for the RuleBasedTuning.

Returns

◆ getSelectorStrategy()

template<class Particle_T >
SelectorStrategyOption autopas::AutoPas< Particle_T >::getSelectorStrategy ( ) const
inline

Get the selector configuration strategy.

Returns

◆ getSortingThreshold()

template<class Particle_T >
size_t autopas::AutoPas< Particle_T >::getSortingThreshold ( ) const
inline

Get the sorting-threshold for traversals that use the CellFunctor.

Returns
sorting-threshold

◆ getTuningInterval()

template<class Particle_T >
unsigned int autopas::AutoPas< Particle_T >::getTuningInterval ( ) const
inline

Get tuning interval.

Returns

◆ getTuningMetricOption()

template<class Particle_T >
const TuningMetricOption & autopas::AutoPas< Particle_T >::getTuningMetricOption ( ) const
inline

Getter for the tuning metric option.

Returns

◆ getTuningStrategyOptions()

template<class Particle_T >
const std::vector< TuningStrategyOption > & autopas::AutoPas< Particle_T >::getTuningStrategyOptions ( ) const
inline

Getter for the tuning strategy option.

Returns

◆ getUseLOESSSmoothening()

template<class Particle_T >
bool autopas::AutoPas< Particle_T >::getUseLOESSSmoothening ( ) const
inline

Get flag for whether a LOESS-based smoothening is used.

Returns

◆ getVerletClusterSize()

template<class Particle_T >
unsigned int autopas::AutoPas< Particle_T >::getVerletClusterSize ( ) const
inline

Get Verlet cluster size.

Returns

◆ getVerletRebuildFrequency()

template<class Particle_T >
unsigned int autopas::AutoPas< Particle_T >::getVerletRebuildFrequency ( ) const
inline

Get Verlet rebuild frequency.

Returns
_verletRebuildFrequency

◆ getVerletSkin()

template<class Particle_T >
double autopas::AutoPas< Particle_T >::getVerletSkin ( )
inline

Function to iterate over all pairs of particles in the container.

This function only handles short-range interactions.

Returns
_verletSkin

◆ init()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::init

Initialize AutoPas.

This will completely reset the container and remove all containing particles!

This function needs to be called before any other function (except setters) on the AutoPas object.

Changing any of the member options only takes effect when init is called.

◆ operator=()

template<class Particle_T >
AutoPas< Particle_T > & autopas::AutoPas< Particle_T >::operator= ( AutoPas< Particle_T > &&  other)
noexcept

Move assignment operator.

Parameters
other
Returns

◆ reduce() [1/2]

template<class Particle_T >
template<typename Lambda , typename A >
void autopas::AutoPas< Particle_T >::reduce ( Lambda  reduceLambda,
A &  result,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
)
inline

Reduce properties of particles as defined by a lambda function.

Template Parameters
Lambda(Particle_T p, A &initialValue) -> void
referenceto result of type A
Parameters
reduceLambdacode to reduce properties of particles
resultreference to result of type A
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownedOrHalo

◆ reduce() [2/2]

template<class Particle_T >
template<typename Lambda , typename A >
void autopas::AutoPas< Particle_T >::reduce ( Lambda  reduceLambda,
A &  result,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
) const
inline

Reduce properties of particles as defined by a lambda function.

Template Parameters
Lambda(Particle_T p, A &initialValue) -> void
referenceto result of type A
Parameters
reduceLambdacode to reduce properties of particles
resultreference to result of type A
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownedOrHalo
Note
const version

◆ reduceInRegion() [1/2]

template<class Particle_T >
template<typename Lambda , typename A >
void autopas::AutoPas< Particle_T >::reduceInRegion ( Lambda  reduceLambda,
A &  result,
const std::array< double, 3 > &  lowerCorner,
const std::array< double, 3 > &  higherCorner,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
)
inline

Execute code on all particles in a certain region as defined by a lambda function.

Template Parameters
Lambda(Particle_T &p, A &result) -> void
Atype of reduction value
Parameters
reduceLambdacode to be executed on all particles
resultreference to starting and final value of reduction
lowerCornerlower corner of bounding box
higherCornerhigher corner of bounding box
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownerOrHalo

◆ reduceInRegion() [2/2]

template<class Particle_T >
template<typename Lambda , typename A >
void autopas::AutoPas< Particle_T >::reduceInRegion ( Lambda  reduceLambda,
A &  result,
const std::array< double, 3 > &  lowerCorner,
const std::array< double, 3 > &  higherCorner,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
) const
inline

Execute code on all particles in a certain region as defined by a lambda function.

Template Parameters
Lambda(Particle_T &p, A &result) -> void
Atype of reduction value
Parameters
reduceLambdacode to be executed on all particles
resultreference to starting and final value of reduction
lowerCornerlower corner of bounding box
higherCornerhigher corner of bounding box
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownerOrHalo
Note
const version

◆ reduceInRegionParallel() [1/2]

template<class Particle_T >
template<typename Lambda , typename A >
void autopas::AutoPas< Particle_T >::reduceInRegionParallel ( Lambda  reduceLambda,
A &  result,
const std::array< double, 3 > &  lowerCorner,
const std::array< double, 3 > &  higherCorner,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
)
inline

Execute code on all particles in a certain region in parallel as defined by a lambda function.

Template Parameters
Lambda(Particle_T &p, A &result) -> void
Atype of reduction value
Parameters
reduceLambdacode to be executed on all particles
resultreference to starting and final value of reduction
lowerCornerlower corner of bounding box
higherCornerhigher corner of bounding box
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownerOrHalo
Note
not actually parallel until kokkos integration

◆ reduceInRegionParallel() [2/2]

template<class Particle_T >
template<typename Lambda , typename A >
void autopas::AutoPas< Particle_T >::reduceInRegionParallel ( Lambda  reduceLambda,
A &  result,
const std::array< double, 3 > &  lowerCorner,
const std::array< double, 3 > &  higherCorner,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
) const
inline

Execute code on all particles in a certain region as defined by a lambda function.

Template Parameters
Lambda(Particle_T &p, A &result) -> void
Atype of reduction value
Parameters
reduceLambdacode to be executed on all particles
resultreference to starting and final value of reduction
lowerCornerlower corner of bounding box
higherCornerhigher corner of bounding box
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownerOrHalo
Note
const version

◆ reduceParallel() [1/2]

template<class Particle_T >
template<typename Lambda , typename A >
void autopas::AutoPas< Particle_T >::reduceParallel ( Lambda  reduceLambda,
A &  result,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
)
inline

Reduce properties of particles in parallel as defined by a lambda function.

Template Parameters
Lambda(Particle_T p, A &initialValue) -> void
referenceto result of type A
Parameters
reduceLambdacode to reduce properties of particles
resultreference to result of type A
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownedOrHalo
Note
not actually parallel until kokkos integration

◆ reduceParallel() [2/2]

template<class Particle_T >
template<typename Lambda , typename A >
void autopas::AutoPas< Particle_T >::reduceParallel ( Lambda  reduceLambda,
A &  result,
IteratorBehavior  behavior = IteratorBehavior::ownedOrHalo 
) const
inline

Reduce properties of particles as defined by a lambda function.

Template Parameters
Lambda(Particle_T p, A &initialValue) -> void
referenceto result of type A
Parameters
reduceLambdacode to reduce properties of particles
resultreference to result of type A
behavior
See also
IteratorBehavior default:
IteratorBehavior::ownedOrHalo
Note
const version

◆ reserve() [1/2]

template<class Particle_T >
void autopas::AutoPas< Particle_T >::reserve ( size_t  numParticles)

Reserve memory for a given number of particles in the container and logic layers.

This function assumes a uniform distribution of particles throughout the domain. For example, this means that in a LinkedCells Container in each cell vector.reserve(numParticles/numCells) is called.

Note
This functions will create an estimate for the number of halo particles.
Parameters
numParticlesNo buffer factor is applied. It is probably wise to slightly over-reserve to account for imbalance or particle movement.

◆ reserve() [2/2]

template<class Particle_T >
void autopas::AutoPas< Particle_T >::reserve ( size_t  numParticles,
size_t  numHaloParticles 
)

Reserve memory for a given number of particles in the container and logic layers (e.g.

LogicHandler::_particleBuffer). This function assumes a uniform distribution of particles throughout the domain. For example, this means that in a LinkedCells Container in each cell vector.reserve(numParticles/numCells) is called.

Parameters
numParticles
numHaloParticles

◆ resizeBox()

template<class Particle_T >
std::vector< Particle_T > autopas::AutoPas< Particle_T >::resizeBox ( const std::array< double, 3 > &  boxMin,
const std::array< double, 3 > &  boxMax 
)

Resizes the bounding box of the AutoPas object.

Parameters
boxMin
boxMax
Returns
Vector of particles that are outside the box after the resize.

◆ searchSpaceIsTrivial()

template<class Particle_T >
bool autopas::AutoPas< Particle_T >::searchSpaceIsTrivial

get the bool value indicating if the search space is trivial (not more than one configuration to test).

Returns
bool indicating if search space is trivial.

◆ setAcquisitionFunction()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setAcquisitionFunction ( AcquisitionFunctionOption  acqFun)
inline

Set acquisition function for tuning.

For possible acquisition function choices see options::AcquisitionFunctionOption::Value.

Note
This function is only relevant for the bayesian based searches.
Parameters
acqFunacquisition function

◆ setAllowedCellSizeFactors()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setAllowedCellSizeFactors ( const NumberSet< double > &  allowedCellSizeFactors)
inline

Set allowed cell size factors (only relevant for LinkedCells, VerletLists and VerletListsCells).

Parameters
allowedCellSizeFactors

◆ setAllowedContainers()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setAllowedContainers ( const std::set< ContainerOption > &  allowedContainers)
inline

Set the list of allowed containers.

For possible container choices see options::ContainerOption::Value.

Parameters
allowedContainers

◆ setAllowedDataLayouts()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setAllowedDataLayouts ( const std::set< DataLayoutOption > &  allowedDataLayouts,
const InteractionTypeOption  interactionType = InteractionTypeOption::pairwise 
)
inline

Set the list of allowed data layouts.

For possible data layouts choices see options::DataLayoutOption::Value.

Parameters
allowedDataLayouts
interactionTypeSet allowed data layouts for this interaction type. Defaults to InteractionTypeOption::pairwise.

◆ setAllowedInteractionTypeOptions()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setAllowedInteractionTypeOptions ( const std::set< InteractionTypeOption > &  allowedInteractionTypeOptions)
inline

Set the list of allowed interaction types.

AutoPas will initialize AutoTuners for the allowed interaction types. For possible newton 3 choices see options::interactionTypeOption::Value.

Parameters
allowedInteractionTypeOptions

◆ setAllowedLoadEstimators()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setAllowedLoadEstimators ( const std::set< LoadEstimatorOption > &  allowedLoadEstimators)
inline

Set the list of allowed load estimation algorithms.

For possible container choices see LoadEstimatorOption.

Parameters
allowedLoadEstimators

◆ setAllowedNewton3Options()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setAllowedNewton3Options ( const std::set< Newton3Option > &  allowedNewton3Options,
const InteractionTypeOption  interactionType = InteractionTypeOption::pairwise 
)
inline

Set the list of allowed newton 3 options.

For possible newton 3 choices see options::Newton3Option::Value.

Parameters
allowedNewton3Options
interactionTypeSet allowed newton 3 options for this interaction type. Defaults to InteractionTypeOption::pairwise.

◆ setAllowedTraversals()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setAllowedTraversals ( const std::set< TraversalOption > &  allowedTraversals,
const InteractionTypeOption  interactionType = InteractionTypeOption::pairwise 
)
inline

Set the list of allowed traversals.

For possible traversals choices see options::TraversalOption::Value.

Parameters
allowedTraversals
interactionTypeSet allowed traversals for this interaction type. Defaults to InteractionTypeOption::pairwise.

◆ setBoxMax()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setBoxMax ( const std::array< double, 3 > &  boxMax)
inline

Set coordinates of the upper corner of the domain.

Parameters
boxMax

◆ setBoxMin()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setBoxMin ( const std::array< double, 3 > &  boxMin)
inline

Set coordinates of the lower corner of the domain.

Parameters
boxMin

◆ setCellSizeFactor()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setCellSizeFactor ( double  cellSizeFactor)
inline

Set allowed cell size factors to one element (only relevant for LinkedCells, VerletLists and VerletListsCells).

Parameters
cellSizeFactor

◆ setCutoff()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setCutoff ( double  cutoff)
inline

Set cutoff radius.

Parameters
cutoff

◆ setEarlyStoppingFactor()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setEarlyStoppingFactor ( double  earlyStoppingFactor)
inline

Set the earlyStoppingFactor for the auto tuner.

If a configuration seems to be slower than the optimum configuration found so far by more than this factor, it will not be sampled again during that tuning phase.

Parameters
earlyStoppingFactor

◆ setEnergySensorOption()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setEnergySensorOption ( EnergySensorOption  energySensorOption)
inline

Setter for the energy sensor.

Parameters
energySensorOption

◆ setEvidenceFirstPrediction()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setEvidenceFirstPrediction ( unsigned int  evidenceFirstPrediction)
inline

Set the number of tests that need to have happened for a configuration until the first predictions are going to be calculated.

Parameters
evidenceFirstPrediction

◆ setExtrapolationMethodOption()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setExtrapolationMethodOption ( ExtrapolationMethodOption  extrapolationMethodOption)
inline

Set extrapolation method for the prediction of the configuration performance.

Parameters
extrapolationMethodOption

◆ setFuzzyRuleFileName()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setFuzzyRuleFileName ( const std::string &  fuzzyRuleFileName)
inline

Set fuzzy rule file name for the RuleBasedTuning.

Parameters
fuzzyRuleFileNameThe name of the fuzzy rule file to use during rule based tuning.

◆ setMaxEvidence()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setMaxEvidence ( unsigned int  maxEvidence)
inline

Set maximum number of evidence for tuning.

Parameters
maxEvidence

◆ setMaxTuningPhasesWithoutTest()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setMaxTuningPhasesWithoutTest ( unsigned int  maxTuningPhasesWithoutTest)
inline

Set the maximum number of tuning phases before a configuration is certainly tested again.

Parameters
maxTuningPhasesWithoutTest

◆ setMPITuningMaxDifferenceForBucket()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setMPITuningMaxDifferenceForBucket ( double  MPITuningMaxDifferenceForBucket)
inline

Setter for the maximal Difference for the bucket distribution.

Parameters
MPITuningMaxDifferenceForBucket

◆ setMPITuningWeightForMaxDensity()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setMPITuningWeightForMaxDensity ( double  MPITuningWeightForMaxDensity)
inline

Setter for the maxDensity-Weight in calculation for bucket distribution.

Parameters
MPITuningWeightForMaxDensity

◆ setNumSamples()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setNumSamples ( unsigned int  numSamples)
inline

Set number of samples taken per configuration during the tuning.

Parameters
numSamples

◆ setOutputSuffix()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setOutputSuffix ( const std::string &  suffix)
inline

Suffix for all output files produced by this instance of AutoPas, e.g.

from csv loggers. This is useful when multiple instances of AutoPas exist, especially in an MPI context.

Parameters
suffix

◆ setRelativeBlacklistRange()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setRelativeBlacklistRange ( double  relativeBlacklistRange)
inline

Set the range of the configurations that are not going to be blacklisted.

Parameters
relativeBlacklistRange

◆ setRelativeOptimumRange()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setRelativeOptimumRange ( double  relativeOptimumRange)
inline

Set the range for the optimum in which has to be to be tested.

Parameters
relativeOptimumRange

◆ setRuleFileName()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setRuleFileName ( const std::string &  ruleFileName)
inline

Set rule file name for the RuleBasedTuning.

Parameters
ruleFileNameThe name of the rule file to use during rule based tuning.

◆ setSelectorStrategy()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setSelectorStrategy ( SelectorStrategyOption  selectorStrategy)
inline

Set the strategy of how to select a performance value for a piece of evidence from multiple time measurements (=samples).

For possible selector strategy choices see options::SelectorStrategyOption::Value.

Parameters
selectorStrategy

◆ setSortingThreshold()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setSortingThreshold ( size_t  sortingThreshold)
inline

Set the sorting-threshold for traversals that use the CellFunctor If the sum of the number of particles in two cells is greater or equal to that value, the CellFunctor creates a sorted view of the particles to avoid unnecessary distance checks.

Parameters
sortingThresholdSum of the number of particles in two cells from which sorting should be enabled.

◆ setTuningInterval()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setTuningInterval ( unsigned int  tuningInterval)
inline

Set tuning interval.

Parameters
tuningInterval

◆ setTuningMetricOption()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setTuningMetricOption ( TuningMetricOption  tuningMetricOption)
inline

Setter for the tuning metric option.

For possible tuning metric choices see options::TuningMetricOption::Value.

Parameters
tuningMetricOption

◆ setTuningStrategyOption()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setTuningStrategyOption ( const std::vector< TuningStrategyOption > &  tuningStrategyOptions)
inline

Setter for the tuning strategy option.

For possible tuning strategy choices see options::TuningStrategyOption::Value.

Parameters
tuningStrategyOptions

◆ setUseLOESSSmoothening()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setUseLOESSSmoothening ( bool  useLOESSSmoothening)
inline

Set flag for whether a LOESS-based smoothening is used.

Parameters
useLOESSSmoothening

◆ setUseTuningLogger()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setUseTuningLogger ( bool  useTuningLogger)
inline

Set if the tuning information should be logged to a file.

It can then be replayed to test other tuning strategies.

Parameters
useTuningLogger

◆ setVerletClusterSize()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setVerletClusterSize ( unsigned int  verletClusterSize)
inline

Set Verlet cluster size.

Parameters
verletClusterSize

◆ setVerletRebuildFrequency()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setVerletRebuildFrequency ( unsigned int  verletRebuildFrequency)
inline

Set Verlet rebuild frequency.

Parameters
verletRebuildFrequency

◆ setVerletSkin()

template<class Particle_T >
void autopas::AutoPas< Particle_T >::setVerletSkin ( double  verletSkin)
inline

Set length added to the cutoff for the Verlet lists' skin per timestep.

Parameters
verletSkin

◆ updateContainer()

template<class Particle_T >
std::vector< Particle_T > autopas::AutoPas< Particle_T >::updateContainer

Updates the container.

On an update, halo particles are deleted and particles that do no longer belong into the container will be removed and returned.

Returns
A vector of invalid particles that do no longer belong in the current container.

The documentation for this class was generated from the following files: