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. |
This module contains all functions for perfoming simulations at constant temperature
__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 .
[in] | N | Number of particles |
[in] | dim | System dimension |
[in] | T | Desired temperature |
[in,out] | dVel | Velocities |
[in] | vSumSq | Squared sum of all velocities |
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.
[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 |
Definition at line 188 of file gpu_tools.cu.
References checkCudaError(), and SqVecSumReduction().
Referenced by main().