ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
dipolar_direct_sum_gpu_cuda.cu File Reference
#include "config/config.hpp"
#include "magnetostatics/dipolar_direct_sum_gpu_cuda.cuh"
#include "cuda/utils.cuh"
#include <thrust/device_ptr.h>
#include <thrust/reduce.h>
#include <cuda.h>

Go to the source code of this file.

Functions

__device__ float scalar_product (float const *a, float const *b)
 
__device__ void vector_product (float const *a, float const *b, float *out)
 
__device__ void get_mi_vector_dds (float res[3], float const a[3], float const b[3], float const box_l[3], int const periodic[3])
 
__device__ void dipole_ia_force (float pf, float const *r1, float const *r2, float const *dip1, float const *dip2, float *f1, float *torque1, float *torque2, float box_l[3], int periodic[3])
 
__device__ float dipole_ia_energy (float pf, float const *r1, float const *r2, float const *dip1, float const *dip2, float box_l[3], int periodic[3])
 
__global__ void DipolarDirectSum_kernel_force (float pf, unsigned int n, float *pos, float *dip, float *f, float *torque, float box_l[3], int periodic[3])
 
__device__ void dds_sumReduction (float *input, float *sum)
 
__global__ void DipolarDirectSum_kernel_energy (float pf, unsigned int n, float *pos, float *dip, float box_l[3], int periodic[3], float *energySum)
 
void copy_box_data (float **box_l_gpu, int **periodic_gpu, float const *box_l, int const *periodic)
 
void DipolarDirectSum_kernel_wrapper_force (float k, unsigned int n, float *pos, float *dip, float *f, float *torque, float box_l[3], int periodic[3])
 
void DipolarDirectSum_kernel_wrapper_energy (float k, unsigned int n, float *pos, float *dip, float box_l[3], int periodic[3], float *E)
 

Function Documentation

◆ copy_box_data()

void copy_box_data ( float **  box_l_gpu,
int **  periodic_gpu,
float const *  box_l,
int const *  periodic 
)
inline

◆ dds_sumReduction()

__device__ void dds_sumReduction ( float *  input,
float *  sum 
)

Definition at line 189 of file dipolar_direct_sum_gpu_cuda.cu.

Referenced by DipolarDirectSum_kernel_energy().

◆ DipolarDirectSum_kernel_energy()

__global__ void DipolarDirectSum_kernel_energy ( float  pf,
unsigned int  n,
float *  pos,
float *  dip,
float  box_l[3],
int  periodic[3],
float *  energySum 
)

◆ DipolarDirectSum_kernel_force()

__global__ void DipolarDirectSum_kernel_force ( float  pf,
unsigned int  n,
float *  pos,
float *  dip,
float *  f,
float *  torque,
float  box_l[3],
int  periodic[3] 
)

Definition at line 137 of file dipolar_direct_sum_gpu_cuda.cu.

References dipole_ia_force().

Referenced by DipolarDirectSum_kernel_wrapper_force().

◆ DipolarDirectSum_kernel_wrapper_energy()

void DipolarDirectSum_kernel_wrapper_energy ( float  k,
unsigned int  n,
float *  pos,
float *  dip,
float  box_l[3],
int  periodic[3],
float *  E 
)

◆ DipolarDirectSum_kernel_wrapper_force()

void DipolarDirectSum_kernel_wrapper_force ( float  k,
unsigned int  n,
float *  pos,
float *  dip,
float *  f,
float *  torque,
float  box_l[3],
int  periodic[3] 
)

◆ dipole_ia_energy()

__device__ float dipole_ia_energy ( float  pf,
float const *  r1,
float const *  r2,
float const *  dip1,
float const *  dip2,
float  box_l[3],
int  periodic[3] 
)

◆ dipole_ia_force()

__device__ void dipole_ia_force ( float  pf,
float const *  r1,
float const *  r2,
float const *  dip1,
float const *  dip2,
float *  f1,
float *  torque1,
float *  torque2,
float  box_l[3],
int  periodic[3] 
)

◆ get_mi_vector_dds()

__device__ void get_mi_vector_dds ( float  res[3],
float const  a[3],
float const  b[3],
float const  box_l[3],
int const  periodic[3] 
)
inline

Definition at line 49 of file dipolar_direct_sum_gpu_cuda.cu.

Referenced by dipole_ia_energy(), and dipole_ia_force().

◆ scalar_product()

__device__ float scalar_product ( float const *  a,
float const *  b 
)
inline

Definition at line 38 of file dipolar_direct_sum_gpu_cuda.cu.

Referenced by dipole_ia_energy(), and dipole_ia_force().

◆ vector_product()