WarpX
Loading...
Searching...
No Matches
IndependentPairHelper< index_type > Struct Template Reference

#include <ShuffleFisherYates.H>

Public Member Functions

 IndependentPairHelper (int a_n_cells, index_type const *AMREX_RESTRICT a_cell_offsets_1, index_type const *AMREX_RESTRICT a_cell_offsets_2)
 Constructor.
 
void Initialize ()
 
void shuffle (index_type *AMREX_RESTRICT a_indices_1, index_type *AMREX_RESTRICT a_indices_2)
 Shuffle the particles in each cell using the Fisher-Yates algorithm, for both species.
 
int numIndependentPairs () const
 
const index_type * collisionOffsetsPtr () const
 

Public Attributes

int m_n_cells
 
index_type const *AMREX_RESTRICT m_cell_offsets_1
 
index_type const *AMREX_RESTRICT m_cell_offsets_2
 
amrex::Gpu::DeviceVector< index_type > m_n_ind_pairs_in_each_cell
 
amrex::Gpu::DeviceVector< index_type > m_coll_offsets
 
int m_n_independent_pairs
 

Constructor & Destructor Documentation

◆ IndependentPairHelper()

template<typename index_type>
IndependentPairHelper< index_type >::IndependentPairHelper ( int a_n_cells,
index_type const *AMREX_RESTRICT a_cell_offsets_1,
index_type const *AMREX_RESTRICT a_cell_offsets_2 )
inline

Constructor.

Parameters
[in]a_n_cellsthe number of cells in this tile
[in]a_cell_offsets_1the offset array storing the number of particles per cell for species 1
[in]a_cell_offsets_2the offset array storing the number of particles per cell for species 2

Member Function Documentation

◆ collisionOffsetsPtr()

template<typename index_type>
const index_type * IndependentPairHelper< index_type >::collisionOffsetsPtr ( ) const
inline

◆ Initialize()

template<typename index_type>
void IndependentPairHelper< index_type >::Initialize ( )
inline

◆ numIndependentPairs()

template<typename index_type>
int IndependentPairHelper< index_type >::numIndependentPairs ( ) const
inline

◆ shuffle()

template<typename index_type>
void IndependentPairHelper< index_type >::shuffle ( index_type *AMREX_RESTRICT a_indices_1,
index_type *AMREX_RESTRICT a_indices_2 )
inline

Shuffle the particles in each cell using the Fisher-Yates algorithm, for both species.

Parameters
[in,out]a_indices_1the indices of the particles sorted by cell for species 1
[in,out]a_indices_2the indices of the particles sorted by cell for species 2

Member Data Documentation

◆ m_cell_offsets_1

template<typename index_type>
index_type const* AMREX_RESTRICT IndependentPairHelper< index_type >::m_cell_offsets_1

◆ m_cell_offsets_2

template<typename index_type>
index_type const* AMREX_RESTRICT IndependentPairHelper< index_type >::m_cell_offsets_2

◆ m_coll_offsets

template<typename index_type>
amrex::Gpu::DeviceVector<index_type> IndependentPairHelper< index_type >::m_coll_offsets

◆ m_n_cells

template<typename index_type>
int IndependentPairHelper< index_type >::m_n_cells

◆ m_n_ind_pairs_in_each_cell

template<typename index_type>
amrex::Gpu::DeviceVector<index_type> IndependentPairHelper< index_type >::m_n_ind_pairs_in_each_cell

◆ m_n_independent_pairs

template<typename index_type>
int IndependentPairHelper< index_type >::m_n_independent_pairs

The documentation for this struct was generated from the following file: