1 #ifndef OPENMPCD_PAIRPOTENTIALS_BASE_HPP
2 #define OPENMPCD_PAIRPOTENTIALS_BASE_HPP
15 namespace PairPotentials
23 template<
typename T = FP>
67 return force(r1 - r2);
74 #endif //OPENMPCD_PAIRPOTENTIALS_BASE_HPP
const OPENMPCD_CUDA_HOST_AND_DEVICE Vector3D< T > forceOnR1DueToR2(const Vector3D< T > &r1, const Vector3D< T > &r2) const
Returns the force exerted on the particle at r1 due to the particle at r2.
virtual OPENMPCD_CUDA_HOST_AND_DEVICE ~Base()
The destructor.
virtual OPENMPCD_CUDA_HOST_AND_DEVICE T potential(const Vector3D< T > &Rvec) const =0
Returns the potential of the interaction for a given position vector.
#define OPENMPCD_CUDA_HOST_AND_DEVICE
Denotes a function to be callable both from the Host and from a CUDA Device.
virtual OPENMPCD_CUDA_HOST_AND_DEVICE Vector3D< T > force(const Vector3D< T > &Rvec) const =0
Returns the force vector of the interaction for a given position vector.
Abstract base class for pair potentials.