Constant Temperature Simulation
[Tools]

Functions

__global__ void gpuRescaleTKernel (int N, int dim, float T, FLOAT_ARRAY_TYPE *dVel, float *vSumSq)
 Temperature rescale kernel function.
void rescaleT (int N, int dim, int numInterData, int numThreads, float T, int maxThreads, int maxBlocks, FLOAT_ARRAY_TYPE *dVel, float *sumSq)
 Rescale the system temperature.

Detailed Description

This module contains all functions for perfoming simulations at constant temperature


Function Documentation

__global__ void gpuRescaleTKernel ( int  N,
int  dim,
float  T,
FLOAT_ARRAY_TYPE *  dVel,
float *  vSumSq 
)

GPU kernel which calculates the rescaling factor and rescales all velocity to fit the desired temperature. The kernel is called via rescaleT .

Attention:
This rescaling assumes at the moment a 3D simulation!
Parameters:
[in] N Number of particles
[in] dim System dimension
[in] T Desired temperature
[in,out] dVel Velocities
[in] vSumSq Squared sum of all velocities
Returns:
Returns CUDA error information

Definition at line 198 of file gpu_tools.cu.

void rescaleT ( int  N,
int  dim,
int  numInterData,
int  numThreads,
float  T,
int  maxThreads,
int  maxBlocks,
FLOAT_ARRAY_TYPE *  dVel,
float *  sumSq 
)

To confine the system to a given temperature this function rescales the temperature accordingly.

Attention:
This rescaling assumes at the moment a 3D simulation!
Parameters:
[in] N Number of particles
[in] dim System dimension
[in] numInterData Intermediate data size for the reduction
[in] numThreads Number of threads used for reduction
[in] T Desired temperature
[in] maxThreads Maximum number of allowed threads
[in] maxBlocks Maximum number of allowed blocks
[in,out] dVel Velcity array on device
[in] sumSq Helper variable, content will be overwritten
Returns:
No return value.

Definition at line 188 of file gpu_tools.cu.

References checkCudaError(), and SqVecSumReduction().

Referenced by main().

 All Files Functions Defines

Generated on Thu Jun 17 14:22:54 2010 for mdgpu - a molecular dynamic simulation program using GPUs by  doxygen 1.6.1