Block-Structured AMR Software Framework
amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor > Class Template Reference

#include <AMReX_ParIter.H>

Inheritance diagram for amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >:
amrex::MFIter

Public Types

using ContainerType = ParticleContainer_impl< T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >
 
using ParticleTileType = typename ContainerType::ParticleTileType
 
using AoS = typename ContainerType::AoS
 
using SoA = typename ContainerType::SoA
 
using ParticleType = T_ParticleType
 
using RealVector = typename SoA::RealVector
 
using IntVector = typename SoA::IntVector
 
using ParticleVector = typename ContainerType::ParticleVector
 
- Public Types inherited from amrex::MFIter
enum  Flags { Tiling = 0x01 , AllBoxes = 0x02 , NoTeamBarrier = 0x04 }
 Flags that specify tiling modes. All these flags are off by default. More...
 

Public Member Functions

 ParIterBase_impl (ContainerRef pc, int level)
 
 ParIterBase_impl (ContainerRef pc, int level, MFItInfo &info)
 
void operator++ ()
 
ParticleTileRef GetParticleTile () const
 
AoSRef GetArrayOfStructs () const
 
SoARef GetStructOfArrays () const
 
int numParticles () const
 
int numRealParticles () const
 
int numNeighborParticles () const
 
int GetLevel () const
 
std::pair< int, intGetPairIndex () const
 
const GeometryGeom (int lev) const
 
- Public Member Functions inherited from amrex::MFIter
 MFIter (const FabArrayBase &fabarray, unsigned char flags_=0)
 The default constructor does not enable tiling (flags_ is set to 0 by default). However, the tiling mode can be enabled by explicitly turning the tiling flag on (i.e. flags_ = Tiling). The tile size in this case is defined by FabArrayBase::mfiter_tile_size. More...
 
 MFIter (const FabArrayBase &fabarray, bool do_tiling)
 Enable tiling with the default tile size, which is defined by FabArrayBase::mfiter_tile_size. More...
 
 MFIter (const FabArrayBase &fabarray, const IntVect &tilesize, unsigned char flags_=0)
 Enable tiling with explicit tile size and flags (See type Flags for more information) More...
 
 MFIter (const BoxArray &ba, const DistributionMapping &dm, unsigned char flags_=0)
 
 MFIter (const BoxArray &ba, const DistributionMapping &dm, bool do_tiling)
 
 MFIter (const BoxArray &ba, const DistributionMapping &dm, const IntVect &tilesize, unsigned char flags_=0)
 
 MFIter (const FabArrayBase &fabarray, const MFItInfo &info)
 
 MFIter (const BoxArray &ba, const DistributionMapping &dm, const MFItInfo &info)
 
 MFIter (MFIter &&rhs)=default
 
 MFIter (MFIter const &)=delete
 
MFIteroperator= (MFIter const &)=delete
 
MFIteroperator= (MFIter &&)=delete
 
 ~MFIter ()
 
Box tilebox () const noexcept
 Return the tile Box at the current index. More...
 
Box tilebox (const IntVect &nodal) const noexcept
 Return the tilebox with provided nodal flag. More...
 
Box tilebox (const IntVect &nodal, const IntVect &ngrow) const noexcept
 Return the tilebox with provided nodal flag and grown cells. More...
 
Box nodaltilebox (int dir=-1) const noexcept
 Return the dir-nodal (or all nodal if dir<0) Box at the current index. More...
 
Box growntilebox (int ng=-1000000) const noexcept
 Return the tile box at the current index grown to include ghost cells. More...
 
Box growntilebox (const IntVect &ng) const noexcept
 
Box grownnodaltilebox (int dir=-1, int ng=-1000000) const noexcept
 Return the dir-nodal (or all nodal if dir<0) box grown to include ghost cells. More...
 
Box grownnodaltilebox (int dir, const IntVect &ng) const noexcept
 
Box validbox () const noexcept
 Return the valid Box in which the current tile resides. More...
 
Box fabbox () const noexcept
 Return the Box of the FAB at which we currently point. More...
 
void operator++ () noexcept
 Increment iterator to the next tile we own. More...
 
bool isValid () const noexcept
 Is the iterator valid i.e. is it associated with a FAB? More...
 
int index () const noexcept
 The index into the underlying BoxArray of the current FAB. More...
 
int length () const noexcept
 The number of indices. More...
 
int LocalTileIndex () const noexcept
 The current local tile index in the current grid;. More...
 
int numLocalTiles () const noexcept
 The the number of tiles in the current grid;. More...
 
int LocalIndex () const noexcept
 Return local index into the vector of fab pointers, m_fabs_v When AllBoxes is on, local_index_map is a nullptr and local index is current index. More...
 
const FabArrayBasetheFabArrayBase () const noexcept
 Constant reference to FabArray over which we're iterating. More...
 
int tileIndex () const noexcept
 
const DistributionMappingDistributionMap () const noexcept
 
void Finalize ()
 

Static Public Attributes

static constexpr int NStructReal = ParticleType::NReal
 
static constexpr int NStructInt = ParticleType::NInt
 

Protected Attributes

int m_level
 
ParticleTilePtr m_particle_current_tile = nullptr
 
ContainerPtr m_pc
 
- Protected Attributes inherited from amrex::MFIter
std::unique_ptr< FabArrayBasem_fa
 This must be the first member! More...
 
const FabArrayBasefabArray
 
IntVect tile_size
 
unsigned char flags
 
int currentIndex
 
int beginIndex
 
int endIndex
 
int streams
 
IndexType typ
 
bool dynamic
 
bool finalized = false
 
DeviceSync device_sync
 
const Vector< int > * index_map
 
const Vector< int > * local_index_map
 
const Vector< Box > * tile_array
 
const Vector< int > * local_tile_index_map
 
const Vector< int > * num_local_tiles
 

Private Types

using PCType = ParticleContainer_impl< T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >
 
using ContainerRef = std::conditional_t< is_const, PCType const &, PCType & >
 
using ContainerPtr = std::conditional_t< is_const, PCType const *, PCType * >
 
using ParticleTileRef = std::conditional_t< is_const, typename PCType::ParticleTileType const &, typename PCType::ParticleTileType & >
 
using ParticleTilePtr = std::conditional_t< is_const, typename PCType::ParticleTileType const *, typename PCType::ParticleTileType * >
 
using AoSRef = std::conditional_t< is_const, typename PCType::AoS const &, typename PCType::AoS & >
 
using SoARef = std::conditional_t< is_const, typename PCType::SoA const &, typename PCType::SoA & >
 

Additional Inherited Members

- Static Public Member Functions inherited from amrex::MFIter
static int allowMultipleMFIters (int allow)
 
static int currentDepth ()
 
- Protected Member Functions inherited from amrex::MFIter
void Initialize ()
 
- Static Protected Attributes inherited from amrex::MFIter
static AMREX_EXPORT int nextDynamicIndex = std::numeric_limits<int>::min()
 
static AMREX_EXPORT int depth = 0
 
static AMREX_EXPORT int allow_multiple_mfiters = 0
 

Member Typedef Documentation

◆ AoS

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
using amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::AoS = typename ContainerType::AoS

◆ AoSRef

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
using amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::AoSRef = std::conditional_t <is_const, typename PCType::AoS const&, typename PCType::AoS&>
private

◆ ContainerPtr

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
using amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::ContainerPtr = std::conditional_t<is_const, PCType const*, PCType*>
private

◆ ContainerRef

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
using amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::ContainerRef = std::conditional_t<is_const, PCType const&, PCType&>
private

◆ ContainerType

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
using amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::ContainerType = ParticleContainer_impl<T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor>

◆ IntVector

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
using amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::IntVector = typename SoA::IntVector

◆ ParticleTilePtr

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
using amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::ParticleTilePtr = std::conditional_t <is_const, typename PCType::ParticleTileType const*, typename PCType::ParticleTileType *>
private

◆ ParticleTileRef

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
using amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::ParticleTileRef = std::conditional_t <is_const, typename PCType::ParticleTileType const&, typename PCType::ParticleTileType &>
private

◆ ParticleTileType

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
using amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::ParticleTileType = typename ContainerType::ParticleTileType

◆ ParticleType

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
using amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::ParticleType = T_ParticleType

◆ ParticleVector

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
using amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::ParticleVector = typename ContainerType::ParticleVector

◆ PCType

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
using amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::PCType = ParticleContainer_impl<T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor>
private

◆ RealVector

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
using amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::RealVector = typename SoA::RealVector

◆ SoA

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
using amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::SoA = typename ContainerType::SoA

◆ SoARef

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
using amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::SoARef = std::conditional_t <is_const, typename PCType::SoA const&, typename PCType::SoA&>
private

Constructor & Destructor Documentation

◆ ParIterBase_impl() [1/2]

template<bool is_const, typename T_ParticleType , int NArrayReal, int NArrayInt, template< class > class Allocator, class CellAssignor >
amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::ParIterBase_impl ( ContainerRef  pc,
int  level 
)

◆ ParIterBase_impl() [2/2]

template<bool is_const, typename ParticleType , int NArrayReal, int NArrayInt, template< class > class Allocator, class CellAssignor >
amrex::ParIterBase_impl< is_const, ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::ParIterBase_impl ( ContainerRef  pc,
int  level,
MFItInfo info 
)

Member Function Documentation

◆ Geom()

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
const Geometry& amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::Geom ( int  lev) const
inline

◆ GetArrayOfStructs()

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
AoSRef amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::GetArrayOfStructs ( ) const
inline

◆ GetLevel()

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
int amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::GetLevel ( ) const
inline

◆ GetPairIndex()

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
std::pair<int, int> amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::GetPairIndex ( ) const
inline

◆ GetParticleTile()

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
ParticleTileRef amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::GetParticleTile ( ) const
inline

◆ GetStructOfArrays()

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
SoARef amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::GetStructOfArrays ( ) const
inline

◆ numNeighborParticles()

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
int amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::numNeighborParticles ( ) const
inline

◆ numParticles()

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
int amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::numParticles ( ) const
inline

◆ numRealParticles()

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
int amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::numRealParticles ( ) const
inline

◆ operator++()

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
void amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::operator++ ( )
inline

Member Data Documentation

◆ m_level

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
int amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::m_level
protected

◆ m_particle_current_tile

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
ParticleTilePtr amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::m_particle_current_tile = nullptr
protected

◆ m_pc

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
ContainerPtr amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::m_pc
protected

◆ NStructInt

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
constexpr int amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::NStructInt = ParticleType::NInt
staticconstexpr

◆ NStructReal

template<bool is_const, typename T_ParticleType , int NArrayReal = 0, int NArrayInt = 0, template< class > class Allocator = DefaultAllocator, class CellAssignor = DefaultAssignor>
constexpr int amrex::ParIterBase_impl< is_const, T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::NStructReal = ParticleType::NReal
staticconstexpr

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