XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
sort.cpp File Reference
#include "globals.hpp"
#include "sml.hpp"
#include "magnetic_field.hpp"
#include "grid.hpp"
#include "particles.hpp"
#include "species.hpp"
#include "get_current_triangles.hpp"
#include "get_current_pid.hpp"
#include "sheath.hpp"
#include "sort.hpp"
Include dependency graph for sort.cpp:

Functions

template<class Device >
void get_perm_array (const SortViews< Device > &sort_views, int n_ptl)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void ptl_to_sorted_tmp_array_ph1_c (const SortViews< DeviceType > &sort_views, const TmpSpecies< Device > &tmp_species, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void ptl_to_tmp_array_ph1_c (const SortViews< DeviceType > &sort_views, const TmpSpecies< Device > &tmp_species, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void tmp_array_to_ptl_ph1_c (const TmpSpecies< Device > &tmp_species, const SortViews< DeviceType > &sort_views, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void ptl_to_sorted_tmp_array_ph2_c (const SortViews< DeviceType > &sort_views, const TmpSpecies< Device > &tmp_species, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void ptl_to_tmp_array_ph2_c (const SortViews< DeviceType > &sort_views, const TmpSpecies< Device > &tmp_species, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void tmp_array_to_ptl_ph2_c (const TmpSpecies< Device > &tmp_species, const SortViews< DeviceType > &sort_views, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void ptl_to_sorted_tmp_array_ct_c (const SortViews< DeviceType > &sort_views, const TmpSpecies< Device > &tmp_species, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void ptl_to_tmp_array_ct_c (const SortViews< DeviceType > &sort_views, const TmpSpecies< Device > &tmp_species, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void tmp_array_to_ptl_ct_c (const TmpSpecies< Device > &tmp_species, const SortViews< DeviceType > &sort_views, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void ph0_to_sorted_tmp_array_ph1_c (const SortViews< DeviceType > &sort_views, const TmpSpecies< Device > &tmp_species, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void tmp_array_to_ph0_ph1_c (const TmpSpecies< Device > &tmp_species, const SortViews< DeviceType > &sort_views, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void ph0_to_sorted_tmp_array_ph2_c (const SortViews< DeviceType > &sort_views, const TmpSpecies< Device > &tmp_species, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void tmp_array_to_ph0_ph2_c (const TmpSpecies< Device > &tmp_species, const SortViews< DeviceType > &sort_views, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void sheath_en_to_sorted_tmp_c (const SortViews< DeviceType > &sort_views, const SheathParticles< Device > &sheath_particles, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void sheath_tmp_to_en_c (const SortViews< DeviceType > &sort_views, const SheathParticles< Device > &sheath_particles, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void sheath_ph2_to_sorted_tmp_c (const SortViews< DeviceType > &sort_views, const SheathParticles< Device > &sheath_particles, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void sheath_tmp_to_ph2_c (const SortViews< DeviceType > &sort_views, const SheathParticles< Device > &sheath_particles, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void sheath_ph1_to_sorted_tmp_c (const SortViews< DeviceType > &sort_views, const SheathParticles< Device > &sheath_particles, int i_item)
 
template<class Device >
KOKKOS_INLINE_FUNCTION void sheath_tmp_to_ph1_c (const SortViews< DeviceType > &sort_views, const SheathParticles< Device > &sheath_particles, int i_item)
 
void sort_particles (const SortViews< DeviceType > &sort_views, const TmpSpecies< DeviceType > &tmp_species, int n_ptl, bool sort_phase0)
 
void sort_sheath_particles (const SortViews< DeviceType > &sort_views, const SheathParticles< DeviceType > &sheath_particles, int n_ptl)
 
void sort_particles_by_triangle (const SortViews< DeviceType > &sort_views, const Grid< DeviceType > &grid, const TmpSpecies< DeviceType > &tmp_species, int n_ptl, const SheathParticles< DeviceType > &sheath_particles, bool sort_sheath_ptl, bool sort_phase0)
 
void sort_particles_by_pid (const SortViews< DeviceType > &sort_views, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, const TmpSpecies< DeviceType > &tmp_species, int n_ptl, bool sort_phase0)
 

Function Documentation

template<class Device >
void get_perm_array ( const SortViews< Device > &  sort_views,
int  n_ptl 
)
inline

Generate the permutation array

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void ph0_to_sorted_tmp_array_ph1_c ( const SortViews< DeviceType > &  sort_views,
const TmpSpecies< Device > &  tmp_species,
int  i_item 
)

Write the first half of phase from the AoSoA to the temporary array with permuted indices

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void ph0_to_sorted_tmp_array_ph2_c ( const SortViews< DeviceType > &  sort_views,
const TmpSpecies< Device > &  tmp_species,
int  i_item 
)

Write the second half of phase from the AoSoA to the temporary array with permuted indices

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void ptl_to_sorted_tmp_array_ct_c ( const SortViews< DeviceType > &  sort_views,
const TmpSpecies< Device > &  tmp_species,
int  i_item 
)

Write the constants from the AoSoA to the temporary array with permuted indices

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void ptl_to_sorted_tmp_array_ph1_c ( const SortViews< DeviceType > &  sort_views,
const TmpSpecies< Device > &  tmp_species,
int  i_item 
)

Write the first half of phase from the AoSoA to the temporary array with permuted indices

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void ptl_to_sorted_tmp_array_ph2_c ( const SortViews< DeviceType > &  sort_views,
const TmpSpecies< Device > &  tmp_species,
int  i_item 
)

Write the second half of phase from the AoSoA to the temporary array with permuted indices

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void ptl_to_tmp_array_ct_c ( const SortViews< DeviceType > &  sort_views,
const TmpSpecies< Device > &  tmp_species,
int  i_item 
)

Write the constants from the AoSoA to the temporary array

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index
template<class Device >
KOKKOS_INLINE_FUNCTION void ptl_to_tmp_array_ph1_c ( const SortViews< DeviceType > &  sort_views,
const TmpSpecies< Device > &  tmp_species,
int  i_item 
)

Write the first half of phase from the AoSoA to the temporary array

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index
template<class Device >
KOKKOS_INLINE_FUNCTION void ptl_to_tmp_array_ph2_c ( const SortViews< DeviceType > &  sort_views,
const TmpSpecies< Device > &  tmp_species,
int  i_item 
)

Write the second half of phase from the AoSoA to the temporary array

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index
template<class Device >
KOKKOS_INLINE_FUNCTION void sheath_en_to_sorted_tmp_c ( const SortViews< DeviceType > &  sort_views,
const SheathParticles< Device > &  sheath_particles,
int  i_item 
)

Write part of the sheath particle info to the temporary array with permuted indices

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void sheath_ph1_to_sorted_tmp_c ( const SortViews< DeviceType > &  sort_views,
const SheathParticles< Device > &  sheath_particles,
int  i_item 
)

Write part of the sheath particle info to the temporary array with permuted indices

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void sheath_ph2_to_sorted_tmp_c ( const SortViews< DeviceType > &  sort_views,
const SheathParticles< Device > &  sheath_particles,
int  i_item 
)

Write part of the sheath particle info to the temporary array with permuted indices

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void sheath_tmp_to_en_c ( const SortViews< DeviceType > &  sort_views,
const SheathParticles< Device > &  sheath_particles,
int  i_item 
)

Write the tmp array back to the part of the sheath particle info

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void sheath_tmp_to_ph1_c ( const SortViews< DeviceType > &  sort_views,
const SheathParticles< Device > &  sheath_particles,
int  i_item 
)

Write the tmp array back to the part of the sheath particle info

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void sheath_tmp_to_ph2_c ( const SortViews< DeviceType > &  sort_views,
const SheathParticles< Device > &  sheath_particles,
int  i_item 
)

Write the tmp array back to the part of the sheath particle info

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function:

void sort_particles ( const SortViews< DeviceType > &  sort_views,
const TmpSpecies< DeviceType > &  tmp_species,
int  n_ptl,
bool  sort_phase0 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void sort_particles_by_pid ( const SortViews< DeviceType > &  sort_views,
const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field,
const DomainDecomposition< DeviceType > &  pol_decomp,
const TmpSpecies< DeviceType > &  tmp_species,
int  n_ptl,
bool  sort_phase0 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void sort_particles_by_triangle ( const SortViews< DeviceType > &  sort_views,
const Grid< DeviceType > &  grid,
const TmpSpecies< DeviceType > &  tmp_species,
int  n_ptl,
const SheathParticles< DeviceType > &  sheath_particles,
bool  sort_sheath_ptl,
bool  sort_phase0 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void sort_sheath_particles ( const SortViews< DeviceType > &  sort_views,
const SheathParticles< DeviceType > &  sheath_particles,
int  n_ptl 
)

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void tmp_array_to_ph0_ph1_c ( const TmpSpecies< Device > &  tmp_species,
const SortViews< DeviceType > &  sort_views,
int  i_item 
)

Write the first half of phase from the temporary array to the AoSoA

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void tmp_array_to_ph0_ph2_c ( const TmpSpecies< Device > &  tmp_species,
const SortViews< DeviceType > &  sort_views,
int  i_item 
)

Write the second half of phase from the temporary array to the AoSoA

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void tmp_array_to_ptl_ct_c ( const TmpSpecies< Device > &  tmp_species,
const SortViews< DeviceType > &  sort_views,
int  i_item 
)

Write the constants from the temporary array to the AoSoA

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void tmp_array_to_ptl_ph1_c ( const TmpSpecies< Device > &  tmp_species,
const SortViews< DeviceType > &  sort_views,
int  i_item 
)

Write the first half of phase from the temporary array to the AoSoA

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function:

template<class Device >
KOKKOS_INLINE_FUNCTION void tmp_array_to_ptl_ph2_c ( const TmpSpecies< Device > &  tmp_species,
const SortViews< DeviceType > &  sort_views,
int  i_item 
)

Write the second half of phase from the temporary array to the AoSoA

Parameters
[in]partParticle AoSoA
[in]i_itemParticle/vector index

Here is the caller graph for this function: