XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends 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 (Species< DeviceType > &species, SortViews< DeviceType > &sort_views, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, int isp, bool send_phase0)
 
void shift_all_species (Plasma &plasma, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, Shift::ShiftPh0 shift_ph0)
 

Function Documentation

void shift ( Species< DeviceType > &  species,
SortViews< DeviceType > &  sort_views,
const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field,
const DomainDecomposition< DeviceType > &  pol_decomp,
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,out]speciescontains the particles
[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]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 ( 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,out]plasmacontains all species info
[in]gridis needed for the sort
[in]magnetic_fieldis needed for the sort
[in]pol_decompis needed for the sort
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function: