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. | |
AutoPas & | operator= (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 TuningMetricOption & | getTuningMetricOption () const |
Getter for the tuning metric option. | |
void | setTuningMetricOption (TuningMetricOption tuningMetricOption) |
Setter for the tuning metric option. | |
const EnergySensorOption & | getEnergySensorOption () 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. | |
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.
Particle_T | Class for particles |
ParticleCell | Class for the particle cells |
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
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
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
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
|
explicit |
Constructor for the autopas class.
logOutputStream | Stream where log output should go to. Default is std::out. |
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.
haloParticle | Particle to be added. |
void autopas::AutoPas< Particle_T >::addHaloParticles | ( | Collection && | particles | ) |
Adds all halo particles from the collection to the container.
Collection | Collection type that contains the particles (e.g. std::vector). Needs to support .size() . |
particles |
void autopas::AutoPas< Particle_T >::addHaloParticlesIf | ( | Collection && | particles, |
F | predicate | ||
) |
Adds all halo particles for which predicate(particle) == true to the container.
Collection | Collection type that contains the particles (e.g. std::vector). Needs to support .size() . |
F | Function type of predicate. Should be of the form: (const Particle_T &) -> bool. |
particles | Particles that are potentially added. |
predicate | Condition that determines if an individual particle should be added. |
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.
p | Reference to the particle to be added |
void autopas::AutoPas< Particle_T >::addParticles | ( | Collection && | particles | ) |
Adds all particles from the collection to the container.
Collection | Collection type that contains the particles (e.g. std::vector). Needs to support .size() . |
particles |
void autopas::AutoPas< Particle_T >::addParticlesIf | ( | Collection && | particles, |
F | predicate | ||
) |
Adds all particles for which predicate(particle) == true to the container.
Collection | Collection type that contains the particles (e.g. std::vector). Needs to support .size() . |
F | Function type of predicate. Should be of the form: (const Particle_T &) -> bool. |
particles | Particles that are potentially added. |
predicate | Condition that determines if an individual particle should be added. |
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)
behavior | The behavior of the iterator. You can specify whether to iterate over owned particles, halo particles, or both. |
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)
behavior | The behavior of the iterator. You can specify whether to iterate over owned particles, halo particles, or both. |
|
inline |
Iterate over all particles by using for(auto iter = autoPas.begin(); iter.isValid(); ++iter)
behavior | The behavior of the iterator. You can specify whether to iterate over owned particles, halo particles, or both. |
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.
f | Functor that describes the interaction (e.g. force). |
void autopas::AutoPas< Particle_T >::deleteAllParticles |
Deletes all particles.
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.
iter | Needs to be a modify-able iterator. |
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.
particle | Reference to the particle that should be deleted. |
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.
iter | Needs to be a modify-able iterator. |
Region Iterator version.
|
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.
|
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.
|
inline |
Execute code on all particles as defined by a lambda function.
Lambda | (Particle_T &p) -> void |
forEachLambda | code to be executed on all particles |
behavior |
|
inline |
Execute code on all particles as defined by a lambda function.
Lambda | (Particle_T &p) -> void |
forEachLambda | code to be executed on all particles |
behavior |
|
inline |
Execute code on all particles in a certain region as defined by a lambda function.
Lambda | (Particle_T &p) -> void |
forEachLambda | code to be executed on all particles |
lowerCorner | lower corner of bounding box |
higherCorner | higher corner of bounding box |
behavior |
|
inline |
Execute code on all particles in a certain region as defined by a lambda function.
Lambda | (Particle_T &p) -> void |
forEachLambda | code to be executed on all particles |
lowerCorner | lower corner of bounding box |
higherCorner | higher corner of bounding box |
behavior |
|
inline |
Execute code on all particles in a certain region in parallel as defined by a lambda function.
Lambda | (Particle_T &p) -> void |
forEachLambda | code to be executed on all particles |
lowerCorner | lower corner of bounding box |
higherCorner | higher corner of bounding box |
behavior |
|
inline |
Execute code on all particles in a certain region in parallel as defined by a lambda function.
Lambda | (Particle_T &p) -> void |
forEachLambda | code to be executed on all particles |
lowerCorner | lower corner of bounding box |
higherCorner | higher corner of bounding box |
behavior |
|
inline |
execute code on all particles in parallel as defined by a lambda function
Lambda | (Particle_T &p) -> void |
forEachLambda | code to be executed on all particles |
behavior |
|
inline |
execute code on all particles in parallel as defined by a lambda function
Lambda | (Particle_T &p) -> void |
forEachLambda | code to be executed on all particles |
behavior |
|
inline |
Get acquisition function used for tuning.
|
inline |
Get allowed cell size factors (only relevant for LinkedCells, VerletLists and VerletListsCells).
|
inline |
Get the list of allowed containers.
|
inline |
Get the list of allowed data layouts.
interactionType | Get allowed data layouts for this interaction type. Defaults to InteractionTypeOption::pairwise. |
|
inline |
Get the list of allowed load estimation algorithms.
|
inline |
Get the list of allowed newton 3 options.
interactionType | Get allowed newton 3 options for this interaction type. Defaults to InteractionTypeOption::pairwise. |
|
inline |
Get the list of allowed traversals.
interactionType | Get allowed traversals for this interaction type. Defaults to InteractionTypeOption::pairwise. |
const std::array< double, 3 > & autopas::AutoPas< Particle_T >::getBoxMax |
Get the upper corner of the container without the halo.
const std::array< double, 3 > & autopas::AutoPas< Particle_T >::getBoxMin |
Get the lower corner of the container without the halo.
unsigned long autopas::AutoPas< Particle_T >::getContainerType |
Returns the type of the currently used container.
|
inline |
Getter for the currently selected configuration.
|
inline |
Get cutoff radius.
|
inline |
Getter for the energy sensor.
|
inline |
Get the number of tests that need to have happened for a configuration until the first predictions are going to be calculated.
|
inline |
Get extrapolation method for the prediction of the configuration performance.
|
inline |
Get maximum number of evidence for tuning.
|
inline |
Get the maximum number of tuning phases before a configuration is certainly tested again.
|
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
size_t autopas::AutoPas< Particle_T >::getNumberOfParticles | ( | IteratorBehavior | behavior = IteratorBehavior::owned | ) | const |
Returns the number of particles in this container.
behavior | Tells this function to report the number of halo, owned or all particles. |
|
inline |
Get number of samples taken per configuration during the tuning.
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.
lowerCorner | lower corner of the region |
higherCorner | higher corner of the region |
behavior | the behavior of the iterator. You can specify whether to iterate over owned particles, halo particles, or both. |
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.
lowerCorner | lower corner of the region |
higherCorner | higher corner of the region |
behavior | the behavior of the iterator. You can specify whether to iterate over owned particles, halo particles, or both. |
|
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.
|
inline |
Get the range for the optimum in which has to be to be tested.
|
inline |
Get the name / path of the rule file for the RuleBasedTuning.
|
inline |
Get the selector configuration strategy.
|
inline |
Get the sorting-threshold for traversals that use the CellFunctor.
|
inline |
Get tuning interval.
|
inline |
Getter for the tuning metric option.
|
inline |
Getter for the tuning strategy option.
|
inline |
Get flag for whether a LOESS-based smoothening is used.
|
inline |
Get Verlet cluster size.
|
inline |
Get Verlet rebuild frequency.
|
inline |
Function to iterate over all pairs of particles in the container.
This function only handles short-range interactions.
void autopas::AutoPas< Particle_T >::init |
|
noexcept |
Move assignment operator.
other |
|
inline |
Reduce properties of particles as defined by a lambda function.
Lambda | (Particle_T p, A &initialValue) -> void |
reference | to result of type A |
reduceLambda | code to reduce properties of particles |
result | reference to result of type A |
behavior |
|
inline |
Reduce properties of particles as defined by a lambda function.
Lambda | (Particle_T p, A &initialValue) -> void |
reference | to result of type A |
reduceLambda | code to reduce properties of particles |
result | reference to result of type A |
behavior |
|
inline |
Execute code on all particles in a certain region as defined by a lambda function.
Lambda | (Particle_T &p, A &result) -> void |
A | type of reduction value |
reduceLambda | code to be executed on all particles |
result | reference to starting and final value of reduction |
lowerCorner | lower corner of bounding box |
higherCorner | higher corner of bounding box |
behavior |
|
inline |
Execute code on all particles in a certain region as defined by a lambda function.
Lambda | (Particle_T &p, A &result) -> void |
A | type of reduction value |
reduceLambda | code to be executed on all particles |
result | reference to starting and final value of reduction |
lowerCorner | lower corner of bounding box |
higherCorner | higher corner of bounding box |
behavior |
|
inline |
Execute code on all particles in a certain region in parallel as defined by a lambda function.
Lambda | (Particle_T &p, A &result) -> void |
A | type of reduction value |
reduceLambda | code to be executed on all particles |
result | reference to starting and final value of reduction |
lowerCorner | lower corner of bounding box |
higherCorner | higher corner of bounding box |
behavior |
|
inline |
Execute code on all particles in a certain region as defined by a lambda function.
Lambda | (Particle_T &p, A &result) -> void |
A | type of reduction value |
reduceLambda | code to be executed on all particles |
result | reference to starting and final value of reduction |
lowerCorner | lower corner of bounding box |
higherCorner | higher corner of bounding box |
behavior |
|
inline |
Reduce properties of particles in parallel as defined by a lambda function.
Lambda | (Particle_T p, A &initialValue) -> void |
reference | to result of type A |
reduceLambda | code to reduce properties of particles |
result | reference to result of type A |
behavior |
|
inline |
Reduce properties of particles as defined by a lambda function.
Lambda | (Particle_T p, A &initialValue) -> void |
reference | to result of type A |
reduceLambda | code to reduce properties of particles |
result | reference to result of type A |
behavior |
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.
numParticles | No buffer factor is applied. It is probably wise to slightly over-reserve to account for imbalance or particle movement. |
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.
numParticles | |
numHaloParticles |
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.
boxMin | |
boxMax |
bool autopas::AutoPas< Particle_T >::searchSpaceIsTrivial |
get the bool value indicating if the search space is trivial (not more than one configuration to test).
|
inline |
Set acquisition function for tuning.
For possible acquisition function choices see options::AcquisitionFunctionOption::Value.
acqFun | acquisition function |
|
inline |
Set allowed cell size factors (only relevant for LinkedCells, VerletLists and VerletListsCells).
allowedCellSizeFactors |
|
inline |
Set the list of allowed containers.
For possible container choices see options::ContainerOption::Value.
allowedContainers |
|
inline |
Set the list of allowed data layouts.
For possible data layouts choices see options::DataLayoutOption::Value.
allowedDataLayouts | |
interactionType | Set allowed data layouts for this interaction type. Defaults to InteractionTypeOption::pairwise. |
|
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.
allowedInteractionTypeOptions |
|
inline |
Set the list of allowed load estimation algorithms.
For possible container choices see LoadEstimatorOption.
allowedLoadEstimators |
|
inline |
Set the list of allowed newton 3 options.
For possible newton 3 choices see options::Newton3Option::Value.
allowedNewton3Options | |
interactionType | Set allowed newton 3 options for this interaction type. Defaults to InteractionTypeOption::pairwise. |
|
inline |
Set the list of allowed traversals.
For possible traversals choices see options::TraversalOption::Value.
allowedTraversals | |
interactionType | Set allowed traversals for this interaction type. Defaults to InteractionTypeOption::pairwise. |
|
inline |
Set coordinates of the upper corner of the domain.
boxMax |
|
inline |
Set coordinates of the lower corner of the domain.
boxMin |
|
inline |
Set allowed cell size factors to one element (only relevant for LinkedCells, VerletLists and VerletListsCells).
cellSizeFactor |
|
inline |
Set cutoff radius.
cutoff |
|
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.
earlyStoppingFactor |
|
inline |
Setter for the energy sensor.
energySensorOption |
|
inline |
Set the number of tests that need to have happened for a configuration until the first predictions are going to be calculated.
evidenceFirstPrediction |
|
inline |
Set extrapolation method for the prediction of the configuration performance.
extrapolationMethodOption |
|
inline |
Set fuzzy rule file name for the RuleBasedTuning.
fuzzyRuleFileName | The name of the fuzzy rule file to use during rule based tuning. |
|
inline |
Set maximum number of evidence for tuning.
maxEvidence |
|
inline |
Set the maximum number of tuning phases before a configuration is certainly tested again.
maxTuningPhasesWithoutTest |
|
inline |
Setter for the maximal Difference for the bucket distribution.
MPITuningMaxDifferenceForBucket |
|
inline |
Setter for the maxDensity-Weight in calculation for bucket distribution.
MPITuningWeightForMaxDensity |
|
inline |
Set number of samples taken per configuration during the tuning.
numSamples |
|
inline |
|
inline |
Set the range of the configurations that are not going to be blacklisted.
relativeBlacklistRange |
|
inline |
Set the range for the optimum in which has to be to be tested.
relativeOptimumRange |
|
inline |
Set rule file name for the RuleBasedTuning.
ruleFileName | The name of the rule file to use during rule based tuning. |
|
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.
selectorStrategy |
|
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.
sortingThreshold | Sum of the number of particles in two cells from which sorting should be enabled. |
|
inline |
Set tuning interval.
tuningInterval |
|
inline |
Setter for the tuning metric option.
For possible tuning metric choices see options::TuningMetricOption::Value.
tuningMetricOption |
|
inline |
Setter for the tuning strategy option.
For possible tuning strategy choices see options::TuningStrategyOption::Value.
tuningStrategyOptions |
|
inline |
Set flag for whether a LOESS-based smoothening is used.
useLOESSSmoothening |
|
inline |
Set if the tuning information should be logged to a file.
It can then be replayed to test other tuning strategies.
useTuningLogger |
|
inline |
Set Verlet cluster size.
verletClusterSize |
|
inline |
Set Verlet rebuild frequency.
verletRebuildFrequency |
|
inline |
Set length added to the cutoff for the Verlet lists' skin per timestep.
verletSkin |
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.