Block-Structured AMR Software Framework
AMReX_ParticleTransformation.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_ParticleTile.H>
#include <AMReX_ParticleUtil.H>

Go to the source code of this file.

Namespaces

 amrex
 

Functions

template<typename T_ParticleType , int NAR, int NAI>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::copyParticle (const ParticleTileData< T_ParticleType, NAR, NAI > &dst, const ConstParticleTileData< T_ParticleType, NAR, NAI > &src, int src_i, int dst_i) noexcept
 A general single particle copying routine that can run on the GPU. More...
 
template<typename T_ParticleType , int NAR, int NAI>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::copyParticle (const ParticleTileData< T_ParticleType, NAR, NAI > &dst, const ParticleTileData< T_ParticleType, NAR, NAI > &src, int src_i, int dst_i) noexcept
 A general single particle copying routine that can run on the GPU. More...
 
template<typename T_ParticleType , int NAR, int NAI>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::swapParticle (const ParticleTileData< T_ParticleType, NAR, NAI > &dst, const ParticleTileData< T_ParticleType, NAR, NAI > &src, int src_i, int dst_i) noexcept
 A general single particle swapping routine that can run on the GPU. More...
 
template<typename DstTile , typename SrcTile >
void amrex::copyParticles (DstTile &dst, const SrcTile &src) noexcept
 Copy particles from src to dst. This version copies all the particles, writing them to the beginning of dst. More...
 
template<typename DstTile , typename SrcTile , typename Index , typename N , std::enable_if_t< std::is_integral_v< Index >, int > foo = 0>
void amrex::copyParticles (DstTile &dst, const SrcTile &src, Index src_start, Index dst_start, N n) noexcept
 Copy particles from src to dst. This version copies n particles starting at index src_start, writing the result starting at dst_start. More...
 
template<typename DstTile , typename SrcTile , typename F >
void amrex::transformParticles (DstTile &dst, const SrcTile &src, F &&f) noexcept
 Apply the function f to all the particles in src, writing the result to dst. This version does all the particles in src. More...
 
template<typename DstTile , typename SrcTile , typename Index , typename N , typename F , std::enable_if_t< std::is_integral_v< Index >, int > foo = 0>
void amrex::transformParticles (DstTile &dst, const SrcTile &src, Index src_start, Index dst_start, N n, F const &f) noexcept
 Apply the function f to particles in src, writing the result to dst. This version applies the function to n particles starting at index src_start, writing the result starting at dst_start. More...
 
template<typename DstTile1 , typename DstTile2 , typename SrcTile , typename F >
void amrex::transformParticles (DstTile1 &dst1, DstTile2 &dst2, const SrcTile &src, F &&f) noexcept
 Apply the function f to all the particles in src, writing the results to dst1 and dst2. This version does all the particles in src. More...
 
template<typename DstTile1 , typename DstTile2 , typename SrcTile , typename Index , typename N , typename F , std::enable_if_t< std::is_integral_v< Index >, int > foo = 0>
void amrex::transformParticles (DstTile1 &dst1, DstTile2 &dst2, const SrcTile &src, Index src_start, Index dst1_start, Index dst2_start, N n, F const &f) noexcept
 Apply the function f to particles in src, writing the results to dst1 and dst2. This version applies the function to n particles starting at index src_start, writing the result starting at dst1_start and dst2_start. More...
 
template<typename DstTile , typename SrcTile , typename Index , typename N , std::enable_if_t< std::is_integral_v< Index >, int > foo = 0>
Index amrex::filterParticles (DstTile &dst, const SrcTile &src, const Index *mask) noexcept
 Conditionally copy particles from src to dst based on the value of mask. More...
 
template<typename DstTile , typename SrcTile , typename Index , typename N , std::enable_if_t< std::is_integral_v< Index >, int > foo = 0>
Index amrex::filterParticles (DstTile &dst, const SrcTile &src, const Index *mask, Index src_start, Index dst_start, N n) noexcept
 Conditionally copy particles from src to dst based on the value of mask. This version conditionally copies n particles starting at index src_start, writing the result starting at dst_start. More...
 
template<typename DstTile , typename SrcTile , typename Pred , std::enable_if_t<!std::is_pointer_v< std::decay_t< Pred >>, int > foo = 0>
int amrex::filterParticles (DstTile &dst, const SrcTile &src, Pred &&p) noexcept
 Conditionally copy particles from src to dst based on a predicate. More...
 
template<typename DstTile , typename SrcTile , typename Pred , typename Index , typename N , std::enable_if_t<!std::is_pointer_v< std::decay_t< Pred >>, Index > nvccfoo = 0>
Index amrex::filterParticles (DstTile &dst, const SrcTile &src, Pred const &p, Index src_start, Index dst_start, N n) noexcept
 Conditionally copy particles from src to dst based on a predicate. This version conditionally copies n particles starting at index src_start, writing the result starting at dst_start. More...
 
template<typename DstTile , typename SrcTile , typename Index , typename F , std::enable_if_t< std::is_integral_v< Index >, int > foo = 0>
Index amrex::filterAndTransformParticles (DstTile &dst, const SrcTile &src, Index *mask, F const &f, Index src_start, Index dst_start) noexcept
 Conditionally copy particles from src to dst based on the value of mask. A transformation will also be applied to the particles on copy. More...
 
template<typename DstTile , typename SrcTile , typename Index , typename F , std::enable_if_t< std::is_integral_v< Index >, int > foo = 0>
Index amrex::filterAndTransformParticles (DstTile &dst, const SrcTile &src, Index *mask, F &&f) noexcept
 Conditionally copy particles from src to dst based on the value of mask. A transformation will also be applied to the particles on copy. More...
 
template<typename DstTile , typename SrcTile , typename Pred , typename F , std::enable_if_t<!std::is_pointer_v< std::decay_t< Pred >>, int > foo = 0>
int amrex::filterAndTransformParticles (DstTile &dst, const SrcTile &src, Pred &&p, F &&f) noexcept
 Conditionally copy particles from src to dst based on a predicate. A transformation will also be applied to the particles on copy. More...
 
template<typename DstTile1 , typename DstTile2 , typename SrcTile , typename Index , typename F , std::enable_if_t< std::is_integral_v< Index >, int > foo = 0>
Index amrex::filterAndTransformParticles (DstTile1 &dst1, DstTile2 &dst2, const SrcTile &src, Index *mask, F const &f) noexcept
 Conditionally copy particles from src to dst1 and dst2 based on the value of mask. A transformation will also be applied to the particles on copy. More...
 
template<typename DstTile1 , typename DstTile2 , typename SrcTile , typename Pred , typename F , std::enable_if_t<!std::is_pointer_v< std::decay_t< Pred >>, int > foo = 0>
int amrex::filterAndTransformParticles (DstTile1 &dst1, DstTile2 &dst2, const SrcTile &src, Pred const &p, F &&f) noexcept
 Conditionally copy particles from src to dst1 and dst2 based on a predicate. A transformation will also be applied to the particles on copy. More...
 
template<typename DstTile , typename SrcTile , typename Pred , typename F , typename Index , std::enable_if_t<!std::is_pointer_v< std::decay_t< Pred >>, Index > nvccfoo = 0>
Index amrex::filterAndTransformParticles (DstTile &dst, const SrcTile &src, Pred const &p, F &&f, Index src_start, Index dst_start) noexcept
 Conditionally copy particles from src to dst based on a predicate. This version conditionally copies n particles starting at index src_start, writing the result starting at dst_start. More...
 
template<typename PTile , typename N , typename Index , std::enable_if_t< std::is_integral_v< Index >, int > foo = 0>
void amrex::gatherParticles (PTile &dst, const PTile &src, N np, const Index *inds)
 Gather particles copies particles into contiguous order from an arbitrary order. Specifically, the particle at the index inds[i] in src will be copied to the index i in dst. More...
 
template<typename PTile , typename N , typename Index , std::enable_if_t< std::is_integral_v< Index >, int > foo = 0>
void amrex::scatterParticles (PTile &dst, const PTile &src, N np, const Index *inds)
 Scatter particles copies particles from contiguous order into an arbitrary order. Specifically, the particle at the index i in src will be copied to the index inds[i] in dst. More...