19template <
class Particle_T,
class NeighborList>
32 VarVerletLists(
const std::array<double, 3> &boxMin,
const std::array<double, 3> &boxMax,
const double cutoff,
33 const double skin,
const unsigned int rebuildFrequency,
const double cellSizeFactor = 1.0)
35 compatibleTraversals::allVarVLAsBuildCompatibleTraversals(), cellSizeFactor),
41 [[nodiscard]] ContainerOption
getContainerType()
const override {
return _neighborList.getContainerType(); }
45 if (traversalInterface) {
49 "trying to use a traversal of wrong type in VarVerletLists::computeInteractions");
69 if (traversal->
getDataLayout() == DataLayoutOption::soa and not _neighborList.isSoAListValid()) {
70 _neighborList.generateSoAFromAoS();
75 NeighborList _neighborList;
This interface serves as a common parent class for all traversals.
Definition: TraversalInterface.h:18
virtual void endTraversal()=0
Finalizes the traversal.
virtual void traverseParticles()=0
Traverse the particles by pairs, triplets etc.
virtual void initTraversal()=0
Initializes the traversal.
DataLayoutOption getDataLayout() const
Return the data layout option.
Definition: TraversalInterface.h:69
bool getUseNewton3() const
Return whether the traversal uses newton 3.
Definition: TraversalInterface.h:63
Interface for all traversals for VarVerletLists containers.
Definition: VVLTraversalInterface.h:16
virtual void setNeighborListToTraverse(NeighborList &neighborList)
Sets the neighbor list to traverse.
Definition: VVLTraversalInterface.h:32
Variable Verlet Lists container with different neighbor lists.
Definition: VarVerletLists.h:20
void rebuildNeighborLists(TraversalInterface *traversal) override
Rebuilds the neighbor lists for the next traversals.
Definition: VarVerletLists.h:63
VarVerletLists(const std::array< double, 3 > &boxMin, const std::array< double, 3 > &boxMax, const double cutoff, const double skin, const unsigned int rebuildFrequency, const double cellSizeFactor=1.0)
Constructor of the Variable VerletLists class.
Definition: VarVerletLists.h:32
long getNumberOfNeighborPairs() const
Returns the number of neighbor pairs in the list.
Definition: VarVerletLists.h:61
void computeInteractions(TraversalInterface *traversal) override
Iterates over all particle multiples (e.g.
Definition: VarVerletLists.h:43
ContainerOption getContainerType() const override
Get the ContainerType.
Definition: VarVerletLists.h:41
Base class for Verlet lists which use an underlying linked cells container.
Definition: VerletListsLinkedBase.h:26
bool _verletBuiltNewton3
specifies if the current verlet list was built for newton3
Definition: VerletListsLinkedBase.h:329
std::atomic< bool > _neighborListIsValid
specifies if the neighbor list is currently valid
Definition: VerletListsLinkedBase.h:326
LinkedCells< Particle_T > _linkedCells
internal linked cells storage, handles Particle storage and used to build verlet lists
Definition: VerletListsLinkedBase.h:323
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