AutoPas  3.0.0
Loading...
Searching...
No Matches
TriwiseFunctor.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
27template <class Particle_T, class CRTP_T>
28class TriwiseFunctor : public Functor<Particle_T, CRTP_T> {
29 public:
33 using SoAArraysType = typename Particle_T::SoAArraysType;
34
39 explicit TriwiseFunctor(double cutoff) : Functor<Particle_T, CRTP_T>(cutoff){};
40
41 virtual ~TriwiseFunctor() = default;
42
54 virtual void AoSFunctor(Particle_T &i, Particle_T &j, Particle_T &k, bool newton3) {
55 utils::ExceptionHandler::exception("{}::AoSFunctor: not implemented", this->getName());
56 }
57
68 virtual void SoAFunctorSingle(SoAView<SoAArraysType> soa, bool newton3) {
69 utils::ExceptionHandler::exception("{}::SoAFunctorSingle: not implemented", this->getName());
70 }
71
84 virtual void SoAFunctorPair(SoAView<SoAArraysType> soa1, SoAView<SoAArraysType> soa2, bool newton3) {
85 utils::ExceptionHandler::exception("{}::SoAFunctorPair: not implemented", this->getName());
86 }
87
101 bool newton3) {
102 utils::ExceptionHandler::exception("{}::SoAFunctorTriple: not implemented", this->getName());
103 }
104
117 virtual void SoAFunctorVerlet(SoAView<SoAArraysType> soa, const size_t indexFirst,
118 const std::vector<size_t, AlignedAllocator<size_t>> &neighborList, bool newton3) {
119 utils::ExceptionHandler::exception("{}::SoAFunctorVerlet: not implemented", this->getName());
120 }
121};
122
123} // namespace autopas
AlignedAllocator class.
Definition: AlignedAllocator.h:29
Functor base class.
Definition: Functor.h:40
virtual std::string getName()=0
Returns name of functor.
View on a fixed part of a SoA between a start index and an end index.
Definition: SoAView.h:23
TriwiseFunctor class.
Definition: TriwiseFunctor.h:28
virtual void SoAFunctorPair(SoAView< SoAArraysType > soa1, SoAView< SoAArraysType > soa2, bool newton3)
TriwiseFunctor for structure of arrays (SoA)
Definition: TriwiseFunctor.h:84
virtual void SoAFunctorSingle(SoAView< SoAArraysType > soa, bool newton3)
TriwiseFunctor for structure of arrays (SoA)
Definition: TriwiseFunctor.h:68
virtual void AoSFunctor(Particle_T &i, Particle_T &j, Particle_T &k, bool newton3)
TriwiseFunctor for arrays of structures (AoS).
Definition: TriwiseFunctor.h:54
typename Particle_T::SoAArraysType SoAArraysType
Structure of the SoAs defined by the particle.
Definition: TriwiseFunctor.h:33
virtual void SoAFunctorVerlet(SoAView< SoAArraysType > soa, const size_t indexFirst, const std::vector< size_t, AlignedAllocator< size_t > > &neighborList, bool newton3)
TriwiseFunctor for structure of arrays (SoA) for neighbor lists.
Definition: TriwiseFunctor.h:117
virtual void SoAFunctorTriple(SoAView< SoAArraysType > soa1, SoAView< SoAArraysType > soa2, SoAView< SoAArraysType > soa3, bool newton3)
TriwiseFunctor for structure of arrays (SoA)
Definition: TriwiseFunctor.h:100
TriwiseFunctor(double cutoff)
Constructor.
Definition: TriwiseFunctor.h:39
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