CellGPU  0.8.0
GPU-accelerated simulations of cells
Functions
EnergyMinimizerFIRE2D Kernels

CUDA kernels and callers for the EnergyMinimizerFIRE2D class. More...

Functions

bool gpu_zero_velocity (Dscalar2 *d_velocity, int N)
 Zero out the velocity (if the power is negative) More...
 
bool gpu_update_velocity (Dscalar2 *d_velocity, Dscalar2 *d_force, Dscalar deltaT, int N)
 velocity = velocity +0.5*deltaT*force More...
 
bool gpu_update_velocity_FIRE (Dscalar2 *d_velocity, Dscalar2 *d_force, Dscalar alpha, Dscalar scaling, int N)
 velocity = (1-a)velocity +a*scaling*force More...
 
bool gpu_displacement_velocity_verlet (Dscalar2 *d_displacement, Dscalar2 *d_velocity, Dscalar2 *d_force, Dscalar deltaT, int N)
 displacement = dt*velocity + 0.5*dt^2*force More...
 
__global__ void gpu_zero_velocity_kernel (Dscalar2 *d_velocity, int N)
 
__global__ void gpu_update_velocity_kernel (Dscalar2 *d_velocity, Dscalar2 *d_force, Dscalar deltaT, int n)
 
__global__ void gpu_update_velocity_FIRE_kernel (Dscalar2 *d_velocity, Dscalar2 *d_force, Dscalar alpha, Dscalar scaling, int n)
 
__global__ void gpu_displacement_vv_kernel (Dscalar2 *d_displacement, Dscalar2 *d_velocity, Dscalar2 *d_force, Dscalar deltaT, int n)
 

Detailed Description

CUDA kernels and callers for the EnergyMinimizerFIRE2D class.

Function Documentation

◆ gpu_zero_velocity()

bool gpu_zero_velocity ( Dscalar2 *  d_velocity,
int  N 
)

Zero out the velocity (if the power is negative)

Parameters
d_velocitythe GPU array data of the velocities
Nlength of the array
Postcondition
all elements of d_velocity are set to (0.0,0.0)

◆ gpu_update_velocity()

bool gpu_update_velocity ( Dscalar2 *  d_velocity,
Dscalar2 *  d_force,
Dscalar  deltaT,
int  N 
)

velocity = velocity +0.5*deltaT*force

Parameters
d_velocityDscalar2 array of velocity
d_forceDscalar2 array of force
deltaTtime step
Nthe length of the arrays
Postcondition
v = v + 0.5*deltaT*force

Referenced by EnergyMinimizerFIRE::velocityVerletGPU().

◆ gpu_update_velocity_FIRE()

bool gpu_update_velocity_FIRE ( Dscalar2 *  d_velocity,
Dscalar2 *  d_force,
Dscalar  alpha,
Dscalar  scaling,
int  N 
)

velocity = (1-a)velocity +a*scaling*force

Parameters
d_velocityDscalar2 array of velocity
d_forceDscalar2 array of force
alphathe FIRE parameter
scalingthe square root of (v.v / f.f)
Nthe length of the arrays
Postcondition
v = (1-alpha)v + alpha*scalaing*force

◆ gpu_displacement_velocity_verlet()

bool gpu_displacement_velocity_verlet ( Dscalar2 *  d_displacement,
Dscalar2 *  d_velocity,
Dscalar2 *  d_force,
Dscalar  deltaT,
int  N 
)

displacement = dt*velocity + 0.5*dt^2*force

Parameters
d_displacementDscalar2 array of displacements
d_velocityDscalar2 array of velocities
d_forceDscalar2 array of forces
DscalardeltaT the current time step
Nthe length of the arrays
Postcondition
displacement = dt*velocity + 0.5 *dt^2*force

Referenced by EnergyMinimizerFIRE::velocityVerletGPU().

◆ gpu_zero_velocity_kernel()

__global__ void gpu_zero_velocity_kernel ( Dscalar2 *  d_velocity,
int  N 
)

set the first N elements of the d_velocity vector to 0.0

◆ gpu_update_velocity_kernel()

__global__ void gpu_update_velocity_kernel ( Dscalar2 *  d_velocity,
Dscalar2 *  d_force,
Dscalar  deltaT,
int  n 
)

update the velocity in a velocity Verlet step

◆ gpu_update_velocity_FIRE_kernel()

__global__ void gpu_update_velocity_FIRE_kernel ( Dscalar2 *  d_velocity,
Dscalar2 *  d_force,
Dscalar  alpha,
Dscalar  scaling,
int  n 
)

update the velocity according to a FIRE step

◆ gpu_displacement_vv_kernel()

__global__ void gpu_displacement_vv_kernel ( Dscalar2 *  d_displacement,
Dscalar2 *  d_velocity,
Dscalar2 *  d_force,
Dscalar  deltaT,
int  n 
)

calculate the displacement in a velocity verlet step according to the force and velocity