22#if defined(ESPRESSO_DIPOLES) and defined(ESPRESSO_CUDA)
28#include "communication.hpp"
30#include "system/System.hpp"
34 for (
unsigned int i = 0
u; i < 3u; i++) {
35 box[i] =
static_cast<float>(box_geo.
length()[i]);
46#ifdef ESPRESSO_DIPOLE_FIELD_TRACKING
61 auto const npart =
static_cast<unsigned>(gpu.n_particles());
67#ifdef ESPRESSO_DIPOLE_FIELD_TRACKING
86 auto const npart =
static_cast<unsigned>(gpu.n_particles());
87 auto const energy_device = &(gpu.get_energy_device()->dipolar);
Utils::Vector3d const & length() const
Box length.
constexpr bool periodic(unsigned coord) const
Check periodicity in direction.
double prefactor
Magnetostatics prefactor.
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
int this_node
The number of this node.
static void get_simulation_box(BoxGeometry const &box_geo, float *box, int *per)
void DipolarDirectSum_kernel_wrapper_energy(float k, unsigned int n, float const *const pos, float const *const dip, float box_l[3], int periodic[3], float *E)
void DipolarDirectSum_kernel_wrapper_force(float k, unsigned int n, float const *const pos, float const *const dip, float *dip_fld, float *f, float *torque, float box_l[3], int periodic[3], int n_replicas)
void long_range_energy_gpu() const
void on_activation_gpu() const
void add_long_range_forces_gpu() const
static constexpr std::size_t force
static constexpr std::size_t dip_fld
static constexpr std::size_t torque
static constexpr std::size_t pos
static constexpr std::size_t dip