15inline namespace options {
63 static_assert((
owned |
halo) ==
ownedOrHalo,
"Iterator behaviors are defined with non matching values!");
65 "Iterator behaviors are defined with non matching values!");
68 "Iterator behaviors are defined with non matching values!");
71 "Iterator behaviors are defined with non matching values!");
96 constexpr operator Value()
const {
return _value; }
131 template <
typename ParticleType>
133 switch (this->_value) {
137 return not particle.isDummy();
139 return particle.isHalo();
141 return particle.isOwned();
143 return particle.isDummy();
Class representing the choices for behaviors of iterators.
Definition: IteratorBehavior.h:20
Value
Different possibilities for iterator behaviors.
Definition: IteratorBehavior.h:30
@ owned
Iterate only over owned particles.
Definition: IteratorBehavior.h:34
@ halo
Iterate only over halo particles.
Definition: IteratorBehavior.h:38
@ ownedOrHalo
Iterate over both halo and owned particles.
Definition: IteratorBehavior.h:42
@ forceSequential
Force the iterator to behave like a sequential iterator even when created in a parallel region.
Definition: IteratorBehavior.h:54
@ dummy
Iterate only over dummy particles.
Definition: IteratorBehavior.h:46
@ containerOnly
Force the iterator to iterate over Container only.
Definition: IteratorBehavior.h:58
@ ownedOrHaloOrDummy
Iterate over both halo and owned particles and also dummy particles.
Definition: IteratorBehavior.h:50
IteratorBehavior()=default
Constructor.
static std::set< IteratorBehavior > getDiscouragedOptions()
Set of options that are very unlikely to be interesting.
Definition: IteratorBehavior.h:104
constexpr IteratorBehavior(Value option)
Constructor from value.
Definition: IteratorBehavior.h:82
constexpr IteratorBehavior(Value_t option)
Constructor from number value.
Definition: IteratorBehavior.h:90
unsigned int Value_t
Type used for the internal enum.
Definition: IteratorBehavior.h:25
bool contains(ParticleType &particle)
Check whether this iterator behavior covers the given particle.
Definition: IteratorBehavior.h:132
static std::map< IteratorBehavior, std::string > getOptionNames()
Provides a way to iterate over the possible choices of AcquisitionFunction.
Definition: IteratorBehavior.h:113
Base class for autopas options.
Definition: Option.h:25
static void exception(const Exception e)
Handle an exception derived by std::exception.
Definition: ExceptionHandler.h:63
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:32