1 #ifndef AMREX_PARTICLECONTAINERBASE_H_
2 #define AMREX_PARTICLECONTAINERBASE_H_
3 #include <AMReX_Config.H>
60 for (
auto const& iv : rr)
62 #if AMREX_SPACEDIM > 1
65 #if AMREX_SPACEDIM > 2
68 ref_ratio.push_back(iv[0]);
70 return ref_ratio; }() )),
#define AMREX_ASSERT(EX)
Definition: AMReX_BLassert.H:38
#define AMREX_EXPORT
Definition: AMReX_Extension.H:191
Definition: AMReX_ParticleLocator.H:250
A collection of Boxes stored in an Array.
Definition: AMReX_BoxArray.H:549
Calculates the distribution of FABs to MPI processes.
Definition: AMReX_DistributionMapping.H:41
Rectangular problem domain geometry.
Definition: AMReX_Geometry.H:73
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVectND< dim > TheZeroVector() noexcept
This static member function returns a reference to a constant IntVectND object, all of whose dim argu...
Definition: AMReX_IntVect.H:672
Definition: AMReX_MFIter.H:57
Definition: AMReX_ParGDB.H:13
virtual int maxLevel() const =0
virtual const DistributionMapping & ParticleDistributionMap(int level) const =0
bool OnSameGrids(int level, const MF &mf) const
Definition: AMReX_ParGDB.H:133
virtual const Geometry & ParticleGeom(int level) const =0
virtual int finestLevel() const =0
virtual const BoxArray & ParticleBoxArray(int level) const =0
we use this for non-Amr particle code
Definition: AMReX_ParGDB.H:66
Definition: AMReX_ParticleBufferMap.H:53
Definition: AMReX_ParticleContainerBase.H:23
const Geometry & ParticleGeom(int lev) const
Get the particle Geometry for a given level.
Definition: AMReX_ParticleContainerBase.H:213
int stableRedistribute() const
Definition: AMReX_ParticleContainerBase.H:234
static int AggregationBuffer()
Definition: AMReX_ParticleContainerBase.cpp:257
amrex::Vector< int > neighbor_procs
Definition: AMReX_ParticleContainerBase.H:274
const ParGDBBase * GetParGDB() const
Get the ParGDB object used to define this container (const version)
Definition: AMReX_ParticleContainerBase.H:225
void SetParticleDistributionMap(int lev, DistributionMapping new_dmap)
Set the particle DistributionMapping. If the container was previously set to to track the AMR hierarc...
Definition: AMReX_ParticleContainerBase.cpp:124
bool isDefined() const
Definition: AMReX_ParticleContainerBase.H:99
std::unique_ptr< iMultiFab > redistribute_mask_ptr
Definition: AMReX_ParticleContainerBase.H:272
ParticleContainerBase(const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< int > &rr)
Definition: AMReX_ParticleContainerBase.H:42
static Long MaxParticlesPerRead()
Definition: AMReX_ParticleContainerBase.cpp:212
void defineBufferMap() const
Definition: AMReX_ParticleContainerBase.cpp:72
ParGDBBase * m_gdb
Definition: AMReX_ParticleContainerBase.H:269
static AMREX_EXPORT bool do_tiling
Definition: AMReX_ParticleContainerBase.H:256
void SetVerbose(int verbose)
Definition: AMReX_ParticleContainerBase.H:232
void SetParGDB(const Geometry &geom, const DistributionMapping &dmap, const BoxArray &ba)
Set the particle Geometry, DistributionMapping, and BoxArray. If the container was previously set to ...
Definition: AMReX_ParticleContainerBase.cpp:82
ParticleBufferMap m_buffer_map
Definition: AMReX_ParticleContainerBase.H:275
MFIter MakeMFIter(int lev, bool tile) const
Definition: AMReX_ParticleContainerBase.H:115
void setStableRedistribute(int stable)
Definition: AMReX_ParticleContainerBase.H:236
virtual void resizeData()
Definition: AMReX_ParticleContainerBase.cpp:45
MFIter MakeMFIter(int lev) const
Definition: AMReX_ParticleContainerBase.H:110
Vector< int > NeighborProcs(int ngrow) const
Definition: AMReX_ParticleContainerBase.H:240
ParticleContainerBase & operator=(const ParticleContainerBase &)=delete
ParticleContainerBase()=default
void Define(ParGDBBase *gdb)
Definition: AMReX_ParticleContainerBase.H:83
static AMREX_EXPORT bool memEfficientSort
Definition: AMReX_ParticleContainerBase.H:258
ParticleContainerBase(const ParticleContainerBase &)=delete
ParticleContainerBase(const Geometry &geom, const DistributionMapping &dmap, const BoxArray &ba)
Definition: AMReX_ParticleContainerBase.H:33
int numLevels() const
the number of defined levels in the ParticleContainer
Definition: AMReX_ParticleContainerBase.H:222
static const std::string & CheckpointVersion()
Definition: AMReX_ParticleContainerBase.cpp:149
ParticleContainerBase(ParGDBBase *gdb)
Definition: AMReX_ParticleContainerBase.H:28
void SetParticleBoxArray(int lev, BoxArray new_ba)
Set the particle BoxArray. If the container was previously set to to track the AMR hierarchy of an Am...
Definition: AMReX_ParticleContainerBase.cpp:111
const DistributionMapping & ParticleDistributionMap(int lev) const
Get the DistributionMapping for a given level.
Definition: AMReX_ParticleContainerBase.H:200
std::unique_ptr< ParGDB > m_gdb_object
Definition: AMReX_ParticleContainerBase.H:268
void RedefineDummyMF(int lev)
Definition: AMReX_ParticleContainerBase.cpp:54
void SetParticleGeometry(int lev, Geometry new_geom)
Set the particle Geometry. If the container was previously set to to track the AMR hierarchy of an Am...
Definition: AMReX_ParticleContainerBase.cpp:137
int m_verbose
Definition: AMReX_ParticleContainerBase.H:266
static int MaxReaders()
Definition: AMReX_ParticleContainerBase.cpp:190
virtual void reserveData()
Definition: AMReX_ParticleContainerBase.cpp:40
bool OnSameGrids(int level, const MF &mf) const
Definition: AMReX_ParticleContainerBase.H:246
void BuildRedistributeMask(int lev, int nghost=1) const
Definition: AMReX_ParticleContainerBase.cpp:277
virtual ~ParticleContainerBase()=default
const Geometry & Geom(int lev) const
Get the Geometry for a given level.
Definition: AMReX_ParticleContainerBase.H:207
const BoxArray & ParticleBoxArray(int lev) const
Get the BoxArray for a given level.
Definition: AMReX_ParticleContainerBase.H:193
AmrParticleLocator< DenseBins< Box > > m_particle_locator
Definition: AMReX_ParticleContainerBase.H:259
int finestLevel() const
the finest level actually defined for the ParticleContainer
Definition: AMReX_ParticleContainerBase.H:216
static const std::string & PlotfileVersion()
Definition: AMReX_ParticleContainerBase.cpp:165
static const std::string & DataPrefix()
Definition: AMReX_ParticleContainerBase.cpp:180
int redistribute_mask_nghost
Definition: AMReX_ParticleContainerBase.H:273
static const std::string & AggregationType()
Definition: AMReX_ParticleContainerBase.cpp:237
int maxLevel() const
the finest allowed level in the ParticleContainer, whether it is defined or not.
Definition: AMReX_ParticleContainerBase.H:219
ParGDBBase * GetParGDB()
Get the ParGDB object used to define this container.
Definition: AMReX_ParticleContainerBase.H:228
static AMREX_EXPORT IntVect tile_size
Definition: AMReX_ParticleContainerBase.H:257
Vector< std::unique_ptr< MultiFab > > m_dummy_mf
Definition: AMReX_ParticleContainerBase.H:270
MFIter MakeMFIter(int lev, const MFItInfo &info) const
Definition: AMReX_ParticleContainerBase.H:105
const ParticleBufferMap & BufferMap() const
Definition: AMReX_ParticleContainerBase.H:238
int Verbose() const
Definition: AMReX_ParticleContainerBase.H:230
int m_stable_redistribute
Definition: AMReX_ParticleContainerBase.H:267
ParticleContainerBase(ParticleContainerBase &&)=default
ParticleContainerBase(const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< IntVect > &rr)
Definition: AMReX_ParticleContainerBase.H:52
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition: AMReX_Vector.H:27
@ min
Definition: AMReX_ParallelReduce.H:18
Definition: AMReX_Amr.cpp:49
constexpr AMREX_GPU_HOST_DEVICE GpuTupleElement< I, GpuTuple< Ts... > >::type & get(GpuTuple< Ts... > &tup) noexcept
Definition: AMReX_Tuple.H:179
Vector< int > computeNeighborProcs(const ParGDBBase *a_gdb, int ngrow)
Definition: AMReX_ParticleUtil.cpp:22
const int[]
Definition: AMReX_BLProfiler.cpp:1664
int verbose
Definition: AMReX_DistributionMapping.cpp:36
Definition: AMReX_MFIter.H:20