Block-Structured AMR Software Framework
AMReX_ParticleUtil.H File Reference
#include <AMReX_Config.H>
#include <AMReX_IntVect.H>
#include <AMReX_Box.H>
#include <AMReX_Gpu.H>
#include <AMReX_Print.H>
#include <AMReX_MakeParticle.H>
#include <AMReX_Math.H>
#include <AMReX_MFIter.H>
#include <AMReX_ParGDB.H>
#include <AMReX_ParticleTile.H>
#include <AMReX_ParticleBufferMap.H>
#include <AMReX_TypeTraits.H>
#include <AMReX_Scan.H>
#include <limits>

Go to the source code of this file.

Classes

struct  amrex::BinMapper
 
struct  amrex::GetParticleBin
 
struct  amrex::DefaultAssignor
 

Namespaces

 amrex
 
 amrex::particle_detail
 

Functions

template<class Iterator , std::enable_if_t< IsParticleIterator< Iterator >::value, int > foo = 0>
int amrex::numParticlesOutOfRange (Iterator const &pti, int nGrow)
 Returns the number of particles that are more than nGrow cells from the box correspond to the input iterator. More...
 
template<class Iterator , std::enable_if_t< IsParticleIterator< Iterator >::value &&!Iterator::ContainerType::ParticleType::is_soa_particle, int > foo = 0>
int amrex::numParticlesOutOfRange (Iterator const &pti, IntVect nGrow)
 Returns the number of particles that are more than nGrow cells from the box correspond to the input iterator. More...
 
template<class PC , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
int amrex::numParticlesOutOfRange (PC const &pc, int nGrow)
 Returns the number of particles that are more than nGrow cells from their assigned box. More...
 
template<class PC , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
int amrex::numParticlesOutOfRange (PC const &pc, IntVect nGrow)
 Returns the number of particles that are more than nGrow cells from their assigned box. More...
 
template<class PC , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
int amrex::numParticlesOutOfRange (PC const &pc, int lev_min, int lev_max, int nGrow)
 Returns the number of particles that are more than nGrow cells from their assigned box. More...
 
template<class PC , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
int amrex::numParticlesOutOfRange (PC const &pc, int lev_min, int lev_max, IntVect nGrow)
 Returns the number of particles that are more than nGrow cells from their assigned box. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int amrex::getTileIndex (const IntVect &iv, const Box &box, const bool a_do_tiling, const IntVect &a_tile_size, Box &tbx)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int amrex::numTilesInBox (const Box &box, const bool a_do_tiling, const IntVect &a_tile_size)
 
template<typename P >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect amrex::getParticleCell (P const &p, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &plo, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &dxi) noexcept
 Returns the cell index for a given particle using the provided lower bounds and cell sizes. More...
 
template<typename P >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect amrex::getParticleCell (P const &p, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &plo, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &dxi, const Box &domain) noexcept
 Returns the cell index for a given particle using the provided lower bounds, cell sizes and global domain offset. More...
 
template<typename PTD >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect amrex::getParticleCell (PTD const &ptd, int i, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &plo, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &dxi, const Box &domain) noexcept
 
template<typename P >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int amrex::getParticleGrid (P const &p, amrex::Array4< int > const &mask, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &plo, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &dxi, const Box &domain) noexcept
 
template<typename P >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::enforcePeriodic (P &p, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &plo, amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > const &phi, amrex::GpuArray< amrex::ParticleReal, AMREX_SPACEDIM > const &rlo, amrex::GpuArray< amrex::ParticleReal, AMREX_SPACEDIM > const &rhi, amrex::GpuArray< int, AMREX_SPACEDIM > const &is_per) noexcept
 
template<typename PTile , typename ParFunc >
int amrex::partitionParticles (PTile &ptile, ParFunc const &is_left)
 Reorders the ParticleTile into two partitions left [0, num_left-1] and right [num_left, ptile.numParticles()-1] and returns the number of particles in the left partition. More...
 
template<typename PTile >
void amrex::removeInvalidParticles (PTile &ptile)
 
template<typename PTile , typename PLocator , typename CellAssignor >
int amrex::partitionParticlesByDest (PTile &ptile, const PLocator &ploc, CellAssignor const &assignor, const ParticleBufferMap &pmap, const GpuArray< Real, AMREX_SPACEDIM > &plo, const GpuArray< Real, AMREX_SPACEDIM > &phi, const GpuArray< ParticleReal, AMREX_SPACEDIM > &rlo, const GpuArray< ParticleReal, AMREX_SPACEDIM > &rhi, const GpuArray< int, AMREX_SPACEDIM > &is_per, int lev, int gid, int, int lev_min, int lev_max, int nGrow, bool remove_negative)
 
template<class PC1 , class PC2 >
bool amrex::SameIteratorsOK (const PC1 &pc1, const PC2 &pc2)
 
template<class PC >
void amrex::EnsureThreadSafeTiles (PC &pc)
 
IntVect amrex::computeRefFac (const ParGDBBase *a_gdb, int src_lev, int lev)
 
Vector< int > amrex::computeNeighborProcs (const ParGDBBase *a_gdb, int ngrow)
 
template<typename C >
void amrex::particle_detail::clearEmptyEntries (C &c)
 
template<class index_type , typename F >
void amrex::PermutationForDeposition (Gpu::DeviceVector< index_type > &perm, index_type nitems, index_type nbins, F const &f)
 
template<class index_type , class PTile >
void amrex::PermutationForDeposition (Gpu::DeviceVector< index_type > &perm, index_type nitems, const PTile &ptile, Box bx, Geometry geom, const IntVect idx_type)
 
template<typename P >
std::string amrex::getDefaultCompNameReal (const int i)
 
template<typename P >
std::string amrex::getDefaultCompNameInt (const int i)