OpenMPCD
Public Member Functions | List of all members
OpenMPCD::PairPotentials::Base< T > Class Template Referenceabstract

Abstract base class for pair potentials. More...

#include <Base.hpp>

Public Member Functions

virtual OPENMPCD_CUDA_HOST_AND_DEVICE ~Base ()
 The destructor. More...
 
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. More...
 
virtual OPENMPCD_CUDA_HOST_AND_DEVICEpotential (const Vector3D< T > &Rvec) const =0
 Returns the potential of the interaction for a given position vector. More...
 
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. More...
 

Detailed Description

template<typename T = FP>
class OpenMPCD::PairPotentials::Base< T >

Abstract base class for pair potentials.

Template Parameters
TThe numeric base type.

Definition at line 24 of file PairPotentials/Base.hpp.

Constructor & Destructor Documentation

◆ ~Base()

template<typename T = FP>
virtual OPENMPCD_CUDA_HOST_AND_DEVICE OpenMPCD::PairPotentials::Base< T >::~Base ( )
inlinevirtual

The destructor.

Definition at line 31 of file PairPotentials/Base.hpp.

Member Function Documentation

◆ force()

template<typename T = FP>
virtual OPENMPCD_CUDA_HOST_AND_DEVICE Vector3D<T> OpenMPCD::PairPotentials::Base< T >::force ( const Vector3D< T > &  Rvec) const
pure virtual

Returns the force vector of the interaction for a given position vector.

This function returns the directional derivative

\[ - \nabla_R V \left( \vec{R} \right) \]

where \( \vec{R} \) is the Rvec parameter, \( V \) is the potential as given by the potential function, and \( \nabla_R V \) is the gradient of \( V \) with respect to \( \vec{R} \).

Parameters
[in]RvecThe relative position vector.

Implemented in OpenMPCD::PairPotentials::FENE< ForceCoordinate >, OpenMPCD::PairPotentials::MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles< ForceCoordinate >, and OpenMPCD::PairPotentials::WeeksChandlerAndersen_DistanceOffset< ForceCoordinate >.

◆ forceOnR1DueToR2()

template<typename T = FP>
const OPENMPCD_CUDA_HOST_AND_DEVICE Vector3D<T> OpenMPCD::PairPotentials::Base< T >::forceOnR1DueToR2 ( const Vector3D< T > &  r1,
const Vector3D< T > &  r2 
) const
inline

Returns the force exerted on the particle at r1 due to the particle at r2.

Parameters
[in]r1The position of the first particle.
[in]r2The position of the second particle.

Definition at line 65 of file PairPotentials/Base.hpp.

◆ potential()

template<typename T = FP>
virtual OPENMPCD_CUDA_HOST_AND_DEVICE T OpenMPCD::PairPotentials::Base< T >::potential ( const Vector3D< T > &  Rvec) const
pure virtual

The documentation for this class was generated from the following file: