ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
p3m_gpu_error_cuda.cu File Reference

P3M electrostatics on GPU. More...

#include "p3m_gpu_error.hpp"
#include "cuda/utils.cuh"
#include <utils/math/int_pow.hpp>
#include <utils/math/sinc.hpp>
#include <utils/math/sqr.hpp>
#include <thrust/device_vector.h>
#include <thrust/reduce.h>
#include <cuda.h>
#include <algorithm>
#include <cstddef>
+ Include dependency graph for p3m_gpu_error_cuda.cu:

Go to the source code of this file.

Functions

template<int cao>
static __device__ double p3m_analytic_cotangent_sum (int n, double mesh_i)
 
template<int cao>
__global__ void p3m_k_space_error_gpu_kernel_ik (int3 mesh, double3 meshi, double alpha_L, double *he_q)
 
double p3m_k_space_error_gpu (double prefactor, const int *mesh, int cao, int npart, double sum_q2, double alpha_L, const double *box)
 

Detailed Description

P3M electrostatics on GPU.

The corresponding header file is p3m_gpu_error.hpp.

Definition in file p3m_gpu_error_cuda.cu.

Function Documentation

◆ p3m_analytic_cotangent_sum()

template<int cao>
static __device__ double p3m_analytic_cotangent_sum ( int  n,
double  mesh_i 
)
static
Todo:
Extend to higher order. This comes from some 1/sin expansion in [23]

Definition at line 54 of file p3m_gpu_error_cuda.cu.

References Utils::pi().

Referenced by dp3m_k_space_error(), and p3m_k_space_error().

◆ p3m_k_space_error_gpu()

double p3m_k_space_error_gpu ( double  prefactor,
const int *  mesh,
int  cao,
int  npart,
double  sum_q2,
double  alpha_L,
const double *  box 
)

Definition at line 123 of file p3m_gpu_error_cuda.cu.

References block(), and KERNELCALL.

Referenced by p3mgpu_k_space_error().

◆ p3m_k_space_error_gpu_kernel_ik()

template<int cao>
__global__ void p3m_k_space_error_gpu_kernel_ik ( int3  mesh,
double3  meshi,
double  alpha_L,
double *  he_q 
)

Definition at line 87 of file p3m_gpu_error_cuda.cu.

References Utils::pi(), ROUND_ERROR_PREC, and Utils::sinc().