OpenMPCD
DeviceCode/GaussianDumbbells.hpp
Go to the documentation of this file.
1 /**
2  * @file
3  * Defines CUDA Device code for OpenMPCD::CUDA::MPCFluid::GaussianDumbbells
4  */
5 
6 #ifndef OPENMPCD_CUDA_MPCFLUID_DEVICECODE_GAUSSIANDUMBBELLS_HPP
7 #define OPENMPCD_CUDA_MPCFLUID_DEVICECODE_GAUSSIANDUMBBELLS_HPP
8 
9 #include <OpenMPCD/Types.hpp>
10 
11 namespace OpenMPCD
12 {
13 namespace CUDA
14 {
15 namespace MPCFluid
16 {
17 namespace DeviceCode
18 {
19  /**
20  * Sets the constant symbols.
21  * @param[in] omega_ The omega factor. (see http://dx.doi.org/10.1063/1.4792196)
22  * @param[in] timestep The timestep for the MPC fluid streaming step.
23  */
24  void setGaussianDumbbellSymbols(const FP omega_, const FP timestep);
25 
26 
27  /**
28  * Streams the given dumbbell by applying the analytical solution of the equations of motion.
29  * No boundary conditions are considered.
30  * @param[in] particle1ID The ID of the first particle; the partner is the one with this ID incremented by 1.
31  * @param[in,out] positions The array of MPC fluid particle positions.
32  * @param[in,out] velocities The array of MPC fluid particle velocities.
33  */
34  __device__ void streamDumbbellAnalytically(
35  const unsigned int particle1ID,
36  MPCParticlePositionType* const positions,
37  MPCParticleVelocityType* const velocities);
38 
39  /**
40  * Streams the dumbbells by applying the analytical solution of the equations of motion.
41  * No boundary conditions are considered.
42  * @param[in] workUnitOffset The number of dumbbells to skip.
43  * @param[in,out] positions The array of MPC fluid particle positions.
44  * @param[in,out] velocities The array of MPC fluid particle velocities.
45  */
46  __global__ void streamDumbbellsAnalytically(
47  const unsigned int workUnitOffset,
48  MPCParticlePositionType* const positions,
49  MPCParticleVelocityType* const velocities);
50 
51  /**
52  * Streams the given dumbbell by applying the velocity-Verlet algorithm.
53  * No boundary conditions are considered.
54  * @param[in] particle1ID The ID of the first particle; the partner is the one with this ID incremented by 1.
55  * @param[in,out] positions The array of MPC fluid particle positions.
56  * @param[in,out] velocities The array of MPC fluid particle velocities.
57  * @param[in] reducedSpringConstant The spring constant connecting the two dumbbell contituents,
58  * divided by the mass of each one constituent.
59  * @param[in] timestep The timestep for an individual velocity-Verlet step.
60  * @param[in] stepCount The number of velocity-Verlet steps to perform.
61  */
62  __device__ void streamDumbbellVelocityVerlet(
63  const unsigned int particle1ID,
64  MPCParticlePositionType* const positions,
65  MPCParticleVelocityType* const velocities,
66  const FP reducedSpringConstant,
67  const FP timestep,
68  const unsigned int stepCount);
69 
70  /**
71  * Streams the dumbbells by applying the velocity-Verlet algorithm.
72  * No boundary conditions are considered.
73  * @param[in] workUnitOffset The number of dumbbells to skip.
74  * @param[in,out] positions The array of MPC fluid particle positions.
75  * @param[in,out] velocities The array of MPC fluid particle velocities.
76  * @param[in] reducedSpringConstant The spring constant connecting the two dumbbell contituents,
77  * divided by the mass of each one constituent.
78  * @param[in] timestep The timestep for an individual velocity-Verlet step.
79  * @param[in] stepCount The number of velocity-Verlet steps to perform.
80  */
81  __global__ void streamDumbbellsVelocityVerlet(
82  const unsigned int workUnitOffset,
83  MPCParticlePositionType* const positions,
84  MPCParticleVelocityType* const velocities,
85  const FP reducedSpringConstant,
86  const FP timestep,
87  const unsigned int stepCount);
88 } //namespace DeviceCode
89 } //namespace MPCFluid
90 } //namespace CUDA
91 } //namespace OpenMPCD
92 
93 #endif
OpenMPCD::CUDA::MPCFluid::DeviceCode::streamDumbbellsVelocityVerlet
__global__ void streamDumbbellsVelocityVerlet(const unsigned int workUnitOffset, MPCParticlePositionType *const positions, MPCParticleVelocityType *const velocities, const FP reducedSpringConstant, const FP timestep, const unsigned int stepCount)
Streams the dumbbells by applying the velocity-Verlet algorithm.
OpenMPCD::CUDA::MPCFluid::DeviceCode::streamDumbbellsAnalytically
__global__ void streamDumbbellsAnalytically(const unsigned int workUnitOffset, MPCParticlePositionType *const positions, MPCParticleVelocityType *const velocities)
Streams the dumbbells by applying the analytical solution of the equations of motion.
Types.hpp
OpenMPCD::CUDA::MPCFluid::DeviceCode::streamDumbbellVelocityVerlet
__device__ void streamDumbbellVelocityVerlet(const unsigned int particle1ID, MPCParticlePositionType *const positions, MPCParticleVelocityType *const velocities, const FP reducedSpringConstant, const FP timestep, const unsigned int stepCount)
Streams the given dumbbell by applying the velocity-Verlet algorithm.
OpenMPCD::CUDA::MPCFluid::DeviceCode::streamDumbbellAnalytically
__device__ void streamDumbbellAnalytically(const unsigned int particle1ID, MPCParticlePositionType *const positions, MPCParticleVelocityType *const velocities)
Streams the given dumbbell by applying the analytical solution of the equations of motion.
OpenMPCD::CUDA::MPCFluid::DeviceCode::setGaussianDumbbellSymbols
void setGaussianDumbbellSymbols(const FP omega_, const FP timestep)
Sets the constant symbols.