AutoPas  3.0.0
Loading...
Searching...
No Matches
PairwiseFunctor.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <type_traits>
11
12#include "Functor.h"
16
17namespace autopas {
18
19template <class Particle>
20class VerletListHelpers;
21
30template <class Particle_T, class CRTP_T>
31class PairwiseFunctor : public Functor<Particle_T, CRTP_T> {
32 public:
36 using SoAArraysType = typename Particle_T::SoAArraysType;
37
42 explicit PairwiseFunctor(double cutoff) : Functor<Particle_T, CRTP_T>(cutoff){};
43
44 virtual ~PairwiseFunctor() = default;
45
56 virtual void AoSFunctor(Particle_T &i, Particle_T &j, bool newton3) {
57 utils::ExceptionHandler::exception("{}::AoSFunctor: not implemented", this->getName());
58 }
59
70 virtual void SoAFunctorSingle(SoAView<SoAArraysType> soa, bool newton3) {
71 utils::ExceptionHandler::exception("{}::SoAFunctorSingle: not implemented", this->getName());
72 }
73
86 virtual void SoAFunctorVerlet(SoAView<SoAArraysType> soa, const size_t indexFirst,
87 const std::vector<size_t, AlignedAllocator<size_t>> &neighborList, bool newton3) {
88 utils::ExceptionHandler::exception("{}::SoAFunctorVerlet: not implemented", this->getName());
89 }
90
102 virtual void SoAFunctorPair(SoAView<SoAArraysType> soa1, SoAView<SoAArraysType> soa2, bool newton3) {
103 utils::ExceptionHandler::exception("{}::SoAFunctorPair: not implemented", this->getName());
104 }
105};
106
107} // namespace autopas
AlignedAllocator class.
Definition: AlignedAllocator.h:29
Functor base class.
Definition: Functor.h:40
virtual std::string getName()=0
Returns name of functor.
PairwiseFunctor class.
Definition: PairwiseFunctor.h:31
virtual void AoSFunctor(Particle_T &i, Particle_T &j, bool newton3)
PairwiseFunctor for arrays of structures (AoS).
Definition: PairwiseFunctor.h:56
virtual void SoAFunctorVerlet(SoAView< SoAArraysType > soa, const size_t indexFirst, const std::vector< size_t, AlignedAllocator< size_t > > &neighborList, bool newton3)
PairwiseFunctor for structure of arrays (SoA) for neighbor lists.
Definition: PairwiseFunctor.h:86
virtual void SoAFunctorPair(SoAView< SoAArraysType > soa1, SoAView< SoAArraysType > soa2, bool newton3)
PairwiseFunctor for structure of arrays (SoA)
Definition: PairwiseFunctor.h:102
PairwiseFunctor(double cutoff)
Constructor.
Definition: PairwiseFunctor.h:42
virtual void SoAFunctorSingle(SoAView< SoAArraysType > soa, bool newton3)
PairwiseFunctor for structure of arrays (SoA)
Definition: PairwiseFunctor.h:70
typename Particle_T::SoAArraysType SoAArraysType
Structure of the SoAs defined by the particle.
Definition: PairwiseFunctor.h:36
View on a fixed part of a SoA between a start index and an end index.
Definition: SoAView.h:23
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