1 #ifndef AMREX_PARITER_H_
2 #define AMREX_PARITER_H_
3 #include <AMReX_Config.H>
11 template <
typename ParticleType,
int NArrayReal,
int NArrayInt,
12 template<
class>
class Allocator,
class CellAssignor>
13 class ParticleContainer_impl;
15 template <
int T_NReal,
int T_NInt>
18 template <
int NArrayReal,
int NArrayInt>
21 struct DefaultAssignor;
24 template <
int T_NStructReal,
int T_NStructInt=0,
int T_NArrayReal=0,
int T_NArrayInt=0,
25 template<
class>
class Allocator=
DefaultAllocator,
class CellAssignor=DefaultAssignor>
28 template <
bool is_const,
typename T_ParticleType,
int NArrayReal=0,
int NArrayInt=0,
37 using ContainerRef = std::conditional_t<is_const, PCType const&, PCType&>;
38 using ContainerPtr = std::conditional_t<is_const, PCType const*, PCType*>;
73 auto f = particles.find(key);
74 if (
f != particles.end() &&
f->second.numParticles() > 0) {
109 template <
typename T_ParticleType,
int NArrayReal=0,
int NArrayInt=0,
112 :
public ParIterBase_impl<false, T_ParticleType, NArrayReal, NArrayInt, Allocator, T_CellAssignor>
138 template <
typename T_ParticleType,
int NArrayReal=0,
int NArrayInt=0,
139 template<
class>
class Allocator=
DefaultAllocator,
class T_CellAssignor=DefaultAssignor>
141 :
public ParIterBase_impl<true,T_ParticleType, NArrayReal, NArrayInt, Allocator, T_CellAssignor>
163 template <
bool is_const,
typename ParticleType,
int NArrayReal,
int NArrayInt,
164 template<
class>
class Allocator,
class CellAssignor>
168 MFIter(*pc.m_dummy_mf[level], pc.do_tiling ? info.EnableTiling(pc.tile_size) : info),
176 auto f = particles.find(key);
177 if (
f != particles.end() &&
f->second.numParticles() > 0) {
187 template <
bool is_const,
typename T_ParticleType,
int NArrayReal,
int NArrayInt,
188 template<
class>
class Allocator,
class CellAssignor>
192 MFIter(*pc.m_dummy_mf[level],
193 pc.do_tiling ? pc.tile_size :
IntVect::TheZeroVector()),
201 auto f = particles.find(key);
202 if (
f != particles.end() &&
f->second.numParticles() > 0) {
212 template <
bool is_const,
int T_NStructReal,
int T_NStructInt,
int T_NArrayReal=0,
int T_NArrayInt=0,
216 template <
bool is_const,
int T_NArrayReal=0,
int T_NArrayInt=0,
220 template <
int T_NStructReal,
int T_NStructInt=0,
int T_NArrayReal=0,
int T_NArrayInt=0,
227 template <
int T_NStructReal,
int T_NStructInt=0,
int T_NArrayReal=0,
int T_NArrayInt=0,
Rectangular problem domain geometry.
Definition: AMReX_Geometry.H:73
Definition: AMReX_MFIter.H:57
int LocalTileIndex() const noexcept
The current local tile index in the current grid;.
Definition: AMReX_MFIter.H:150
bool isValid() const noexcept
Is the iterator valid i.e. is it associated with a FAB?
Definition: AMReX_MFIter.H:141
int index() const noexcept
The index into the underlying BoxArray of the current FAB.
Definition: AMReX_MFIter.H:144
void operator++() noexcept
Increment iterator to the next tile we own.
Definition: AMReX_MFIter.cpp:522
Definition: AMReX_ParIter.H:142
typename ContainerType::ParticleTileType ParticleTileType
Definition: AMReX_ParIter.H:148
typename ContainerType::AoS AoS
Definition: AMReX_ParIter.H:149
typename SoA::RealVector RealVector
Definition: AMReX_ParIter.H:151
T_ParticleType ParticleType
Definition: AMReX_ParIter.H:145
typename ContainerType::SoA SoA
Definition: AMReX_ParIter.H:150
ParConstIter_impl(ContainerType const &pc, int level, MFItInfo &info)
Definition: AMReX_ParIter.H:158
ParConstIter_impl(ContainerType const &pc, int level)
Definition: AMReX_ParIter.H:154
T_CellAssignor CellAssignor
Definition: AMReX_ParIter.H:146
typename SoA::IntVector IntVector
Definition: AMReX_ParIter.H:152
Definition: AMReX_ParIter.H:32
std::conditional_t< is_const, typename PCType::SoA const &, typename PCType::SoA & > SoARef
Definition: AMReX_ParIter.H:46
ContainerPtr m_pc
Definition: AMReX_ParIter.H:106
std::conditional_t< is_const, PCType const *, PCType * > ContainerPtr
Definition: AMReX_ParIter.H:38
std::conditional_t< is_const, PCType const &, PCType & > ContainerRef
Definition: AMReX_ParIter.H:37
void operator++()
Definition: AMReX_ParIter.H:65
T_ParticleType ParticleType
Definition: AMReX_ParIter.H:54
std::conditional_t< is_const, typename PCType::AoS const &, typename PCType::AoS & > AoSRef
Definition: AMReX_ParIter.H:44
static constexpr int NStructReal
Definition: AMReX_ParIter.H:58
int numParticles() const
Definition: AMReX_ParIter.H:90
static constexpr int NStructInt
Definition: AMReX_ParIter.H:59
std::conditional_t< is_const, typename PCType::ParticleTileType const &, typename PCType::ParticleTileType & > ParticleTileRef
Definition: AMReX_ParIter.H:40
AoSRef GetArrayOfStructs() const
Definition: AMReX_ParIter.H:86
int numRealParticles() const
Definition: AMReX_ParIter.H:92
int numNeighborParticles() const
Definition: AMReX_ParIter.H:94
typename SoA::RealVector RealVector
Definition: AMReX_ParIter.H:55
std::pair< int, int > GetPairIndex() const
Definition: AMReX_ParIter.H:98
typename ContainerType::SoA SoA
Definition: AMReX_ParIter.H:53
typename ContainerType::ParticleVector ParticleVector
Definition: AMReX_ParIter.H:57
int m_level
Definition: AMReX_ParIter.H:104
typename ContainerType::AoS AoS
Definition: AMReX_ParIter.H:52
ParticleTilePtr m_particle_current_tile
Definition: AMReX_ParIter.H:105
const Geometry & Geom(int lev) const
Definition: AMReX_ParIter.H:100
ParIterBase_impl(ContainerRef pc, int level, MFItInfo &info)
Definition: AMReX_ParIter.H:166
typename ContainerType::ParticleTileType ParticleTileType
Definition: AMReX_ParIter.H:51
ParticleTileRef GetParticleTile() const
Definition: AMReX_ParIter.H:84
typename SoA::IntVector IntVector
Definition: AMReX_ParIter.H:56
SoARef GetStructOfArrays() const
Definition: AMReX_ParIter.H:88
std::conditional_t< is_const, typename PCType::ParticleTileType const *, typename PCType::ParticleTileType * > ParticleTilePtr
Definition: AMReX_ParIter.H:42
int GetLevel() const
Definition: AMReX_ParIter.H:96
ParIterBase_impl(ContainerRef pc, int level)
Definition: AMReX_ParIter.H:190
Definition: AMReX_ParIter.H:113
typename ContainerType::SoA SoA
Definition: AMReX_ParIter.H:125
typename ContainerType::AoS AoS
Definition: AMReX_ParIter.H:124
ParIter_impl(ContainerType &pc, int level)
Definition: AMReX_ParIter.H:129
typename SoA::RealVector RealVector
Definition: AMReX_ParIter.H:126
T_CellAssignor CellAssignor
Definition: AMReX_ParIter.H:117
T_ParticleType ParticleType
Definition: AMReX_ParIter.H:116
typename ContainerType::ConstParticleType ConstParticleType
Definition: AMReX_ParIter.H:122
ParIter_impl(ContainerType &pc, int level, MFItInfo &info)
Definition: AMReX_ParIter.H:133
typename ContainerType::ParticleTileType ParticleTileType
Definition: AMReX_ParIter.H:123
static constexpr int NStructInt
Definition: AMReX_ParIter.H:119
typename SoA::IntVector IntVector
Definition: AMReX_ParIter.H:127
static constexpr int NStructReal
Definition: AMReX_ParIter.H:118
A distributed container for Particles sorted onto the levels, grids, and tiles of a block-structured ...
Definition: AMReX_ParticleContainer.H:145
typename ParticleTileType::AoS AoS
Definition: AMReX_ParticleContainer.H:187
typename ParticleType::ConstType ConstParticleType
Definition: AMReX_ParticleContainer.H:148
typename AoS::ParticleVector ParticleVector
Definition: AMReX_ParticleContainer.H:192
typename ParticleTileType::SoA SoA
Definition: AMReX_ParticleContainer.H:188
ParticleTile< ParticleType, NArrayReal, NArrayInt, Allocator > ParticleTileType
Definition: AMReX_ParticleContainer.H:181
static int f(amrex::Real t, N_Vector y_data, N_Vector y_rhs, void *user_data)
Definition: AMReX_SundialsIntegrator.H:44
Definition: AMReX_Amr.cpp:49
amrex::ArenaAllocator< T > DefaultAllocator
Definition: AMReX_GpuAllocators.H:194
Definition: AMReX_ParticleUtil.H:432
Definition: AMReX_MFIter.H:20
Definition: AMReX_ParticleTile.H:693