XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Namespaces | Enumerations | Functions
shift.hpp File Reference
#include "plasma.hpp"
#include "domain_decomposition.hpp"
#include "grid.hpp"
#include "sort.hpp"
Include dependency graph for shift.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Shift
 

Enumerations

enum  Shift::ShiftPh0 : bool { Shift::NoPhase0 =false, Shift::Phase0 =true }
 

Functions

void shift (const Simulation< DeviceType > &sml, Species< DeviceType > &species, const SortViews< DeviceType > &sort_views, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, TmpSpecies< DeviceType > &tmp_species, int isp, bool send_phase0)
 
void shift_all_species (const Simulation< DeviceType > &sml, Plasma &plasma, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, Shift::ShiftPh0 shift_ph0)
 

Function Documentation

void shift ( const Simulation< DeviceType > &  sml,
Species< DeviceType > &  species,
const SortViews< DeviceType > &  sort_views,
const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field,
const DomainDecomposition< DeviceType > &  pol_decomp,
TmpSpecies< DeviceType > &  tmp_species,
int  isp,
bool  send_phase0 
)

Shifts particles between MPI ranks. First the particles are sorted by destination rank The particles are packed into a buffer and sent with an MPI all-to-all Then they are unpacked from the receiving buffer back into the particle AoSoA The same is done for phase0, needed for ions

Parameters
[in]smlis needed for the sort
[in]speciesis needed for the sort
[in]sort_viewsis needed for the sort
[in]gridis needed for the sort
[in]magnetic_fieldis needed for the sort
[in]pol_decompis needed for the sort and shift
[in,out]tmp_speciesis where the particles are located 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 shift_all_species ( const Simulation< DeviceType > &  sml,
Plasma plasma,
const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field,
const DomainDecomposition< DeviceType > &  pol_decomp,
Shift::ShiftPh0  shift_ph0 
)

Shifts particles between MPI ranks. First the particles are sorted by destination rank The particles are packed into a buffer and sent with an MPI all-to-all Then they are unpacked from the receiving buffer back into the particle AoSoA The same is done for phase0, needed for ions

Parameters
[in]smlis needed for the sort
[in]plasmacontains all species info
[in]gridis needed for the sort
[in]magnetic_fieldis needed for the sort
[in]pol_decompis needed for the sort
[in,out]tmp_speciesis where the particles are located on device
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function: