XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
send_particles.hpp File Reference
#include <Kokkos_Core.hpp>
#include "timer_macro.hpp"
#include "globals.hpp"
#include "species.hpp"
Include dependency graph for send_particles.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void set_buffer_phase0 (const TmpSpecies< DeviceType > &tmp_species, int n_ptl)
 
void copy_particles_from_device (Species< DeviceType > &species, const TmpSpecies< DeviceType > &tmp_species)
 
void copy_particles_to_device (TmpSpecies< DeviceType > &tmp_species, const Species< DeviceType > &species)
 

Function Documentation

void copy_particles_from_device ( Species< DeviceType > &  species,
const TmpSpecies< DeviceType > &  tmp_species 
)

Copies particles to the host (Fortran particle AoSoA) from the device (Cabana AoSoA data structure) by getting the pointer to the Fortran particles and wrapping that in an unmanaged Cabana AoSoA.

Parameters
[in]speciescontains the CPU particles
[in,out]tmp_speciesis the object containing the particles on device
Returns
void

Here is the caller graph for this function:

void copy_particles_to_device ( TmpSpecies< DeviceType > &  tmp_species,
const Species< DeviceType > &  species 
)

Copies particles from the host (Fortran particle AoSoA) to the device (Cabana AoSoA data structure) by getting the pointer to the Fortran particles and wrapping that in an unmanaged Cabana AoSoA.

Parameters
[in]speciescontains the CPU particles
[in,out]tmp_speciesis the object containing the particles on device
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function:

void set_buffer_phase0 ( const TmpSpecies< DeviceType > &  tmp_species,
int  n_ptl 
)

Fills the remainder of the last AoSoA phase0 vector with realistic-looking particles (clones of the final particle). Since gid is set to -1, they will basically act as tracers in the kernel. Ideally garbage data in this buffer doesn't affect anything, but better to be safe here

Parameters
[in,out]tmp_speciesis the object containing the particles on device
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function: