![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
#include "system/GpuParticleData.hpp"#include <utils/Vector.hpp>#include <cstddef>#include <memory>Go to the source code of this file.
Functions | |
| void | p3m_gpu_init (std::shared_ptr< P3MGpuParams > &data, int cao, Utils::Vector3i const &mesh, double alpha, Utils::Vector3d const &box_l, std::size_t n_part) |
| Initialize the internal data structure of the P3M GPU. | |
| void | p3m_gpu_add_farfield_force (P3MGpuParams &data, GpuParticleData &gpu, double prefactor, std::size_t n_part) |
| The long-range part of the P3M algorithm. | |
| void p3m_gpu_add_farfield_force | ( | P3MGpuParams & | data, |
| GpuParticleData & | gpu, | ||
| double | prefactor, | ||
| std::size_t | n_part | ||
| ) |
The long-range part of the P3M algorithm.
Definition at line 671 of file p3m_gpu_cuda.cu.
References apply_diff_op(), apply_influence_function(), assign_charges(), assign_forces(), P3MGpuFftPlan::back_plan, cuda_safe_mem, FFT_BACK_FFT, FFT_FORW_FFT, P3MGpuFftPlan::forw_plan, GpuParticleData::get_particle_charges_device(), GpuParticleData::get_particle_forces_device(), GpuParticleData::get_particle_positions_device(), KERNELCALL, P3MGpuData::n_part, P3MGpuParams::p3m_fft, P3MGpuParams::p3m_gpu_data, Utils::product(), REAL_TYPE, and stream.
Referenced by CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::add_long_range_forces_gpu().
| void p3m_gpu_init | ( | std::shared_ptr< P3MGpuParams > & | data, |
| int | cao, | ||
| Utils::Vector3i const & | mesh, | ||
| double | alpha, | ||
| Utils::Vector3d const & | box_l, | ||
| std::size_t | n_part | ||
| ) |
Initialize the internal data structure of the P3M GPU.
Mainly allocation on the device and influence function calculation. Be advised: this needs mesh^3*5*sizeof(REAL_TYPE) of device memory. We use real to complex FFTs, so the size of the reciprocal mesh is (cuFFT convention) Nx * Ny * ( Nz /2 + 1 ).
Definition at line 549 of file p3m_gpu_cuda.cu.
References block(), Utils::Vector< T, N >::broadcast(), cuda_safe_mem, FFT_PLAN_BACK_FLAG, FFT_PLAN_FORW_FLAG, FFT_TYPE_COMPLEX, KERNELCALL, REAL_TYPE, and stream.
Referenced by CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::init_gpu_kernels().