Go to the documentation of this file.
6 #ifndef OPENMPCD_CUDA_MPCSOLUTE_BASE_HPP
7 #define OPENMPCD_CUDA_MPCSOLUTE_BASE_HPP
34 template<
typename PositionCoordinate,
typename VelocityCoordinate>
Represents a vector whose data is stored elsewhere.
boost::scoped_array< VelocityCoordinate > h_velocities
Host buffer for particle velocities.
boost::scoped_array< PositionCoordinate > h_positions
Host buffer for particle positions.
Class for managing memory on the CUDA Device.
PositionCoordinate * getDevicePositions()
Returns a pointer to the MPC solute positions on the Device.
void fetchFromDevice() const
Copies the MPC solute particles from the CUDA Device to the Host.
VelocityCoordinate * d_velocities
Particle velocities on the Device.
Instrumentation::Base & getInstrumentation() const
Returns the solute instrumentation.
virtual std::size_t getNumberOfLogicalEntities() const =0
Returns the number of logical entities in the solute.
Base class for MPC solutes.
virtual ~Base()
The destructor.
Base class for MPC solutes instrumentation.
virtual void performMDTimestep()=0
Performs, on the Device, an MD timestep of size getMDTimeStepSize().
virtual FP getParticleMass() const =0
Returns the mass of a particle, which is assumed to be equal for all particles in this instance.
const RemotelyStoredVector< const PositionCoordinate > getPosition(const std::size_t particleID) const
Returns a MPC solute particle's position vector.
#define OPENMPCD_DEBUG_ASSERT_EXCEPTIONTYPE(assertion, ExceptionType)
FP mdTimeStepSize
The number of time units to advance per MD step.
void pushToDevice()
Copies the MPC solute particles from the Host to the CUDA Device.
PositionCoordinate * d_positions
Particle positions on the Device.
const RemotelyStoredVector< const VelocityCoordinate > getVelocity(const std::size_t particleID) const
Returns a MPC solute particle's velocity vector.
double FP
Default floating point type.
FP getMDTimeStepSize() const
Returns the number of time units advanced per MD step.
bool hasInstrumentation() const
Returns whether the solute has instrumentation configured.
VelocityCoordinate * getDeviceVelocities()
Returns a pointer to the MPC solute velocities on the Device.
const PositionCoordinate * getDevicePositions() const
Returns a const pointer to the MPC solute positions on the Device.
PositionCoordinate * getHostPositions()
Returns a pointer to the MPC solute positions on the Host.
const VelocityCoordinate * getDeviceVelocities() const
Returns a const pointer to the MPC solute velocities on the Device.
Instrumentation::Base * instrumentation
The solute instrumentation.
virtual std::size_t getParticleCount() const =0
Returns the number of MPC solute particles.
VelocityCoordinate * getHostVelocities()
Returns a pointer to the MPC solute velocities on the Host.
DeviceMemoryManager deviceMemoryManager
The Device memory manager.