XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Typedefs | Functions
send_particles.cpp File Reference
#include <Kokkos_Core.hpp>
#include "timer_macro.hpp"
#include "globals.hpp"
#include "species.hpp"
#include "send_particles.hpp"
Include dependency graph for send_particles.cpp:

Typedefs

using Unmanaged_AoSoA_type = Cabana::AoSoA< ParticleDataTypes, HostType, VEC_LEN, Kokkos::MemoryUnmanaged >
 

Functions

int get_spall_num (FortranPtr spall_fptr, int isp)
 
VecParticlesget_sp_ptl_ptr (int isp)
 
void set_buffer_particles (const TmpSpecies< DeviceType > &tmp_species)
 
void set_buffer_phase0 (const TmpSpecies< DeviceType > &tmp_species)
 
void copy_particles_from_device (FortranPtr spall_fptr, const TmpSpecies< DeviceType > &tmp_species, int isp)
 
void copy_particles_to_device (FortranPtr spall_fptr, TmpSpecies< DeviceType > &tmp_species, int isp)
 

Typedef Documentation

using Unmanaged_AoSoA_type = Cabana::AoSoA<ParticleDataTypes,HostType,VEC_LEN, Kokkos::MemoryUnmanaged>

Function Documentation

void copy_particles_from_device ( FortranPtr  spall_fptr,
const TmpSpecies< DeviceType > &  tmp_species,
int  isp 
)

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]spall_fptris the Pointer to fortran species
[in,out]tmp_speciesis the object containing the particles on device
[in]ispis the species index
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function:

void copy_particles_to_device ( FortranPtr  spall_fptr,
TmpSpecies< DeviceType > &  tmp_species,
int  isp 
)

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]spall_fptris the Pointer to fortran species
[in,out]tmp_speciesis the object containing the particles on device
[in]ispis the species index
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function:

VecParticles* get_sp_ptl_ptr ( int  isp)

Here is the caller graph for this function:

int get_spall_num ( FortranPtr  spall_fptr,
int  isp 
)
void set_buffer_particles ( const TmpSpecies< DeviceType > &  tmp_species)

Fills the remainder of the last AoSoA 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:

void set_buffer_phase0 ( const TmpSpecies< DeviceType > &  tmp_species)

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: