1 #ifndef AMREX_ParGDB_H_
2 #define AMREX_ParGDB_H_
3 #include <AMReX_Config.H>
51 [[nodiscard]] virtual
int maxLevel () const = 0;
59 [[nodiscard]]
bool OnSameGrids (
int level, const MF& mf) const;
86 [[nodiscard]]
const Geometry&
Geom (
int level)
const override;
92 (
int level)
const override;
94 (
int level)
const override;
113 [[nodiscard]]
bool LevelDefined (
int level)
const override;
115 [[nodiscard]]
int maxLevel ()
const override;
118 [[nodiscard]]
int MaxRefRatio (
int level)
const override;
160 m_nlevels(static_cast<
int>(ba.
size()))
172 m_nlevels(static_cast<
int>(ba.
size()))
269 m_ba[level] = new_ba;
344 int max_ref_ratio = 0;
345 for (
int lev = 0; lev <
m_nlevels-1; lev++) {
348 return max_ref_ratio;
#define AMREX_ASSERT(EX)
Definition: AMReX_BLassert.H:38
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 > TheUnitVector() noexcept
This static member function returns a reference to a constant IntVectND object, all of whose dim argu...
Definition: AMReX_IntVect.H:682
Definition: AMReX_ParGDB.H:13
virtual void SetParticleDistributionMap(int level, const DistributionMapping &new_dm)=0
virtual void SetParticleGeometry(int level, const Geometry &new_geom)=0
virtual const Vector< Geometry > & ParticleGeom() const =0
virtual const Vector< DistributionMapping > & ParticleDistributionMap() const =0
virtual int maxLevel() const =0
ParGDBBase() noexcept=default
virtual Vector< IntVect > refRatio() const =0
virtual const Vector< BoxArray > & ParticleBoxArray() const =0
virtual bool LevelDefined(int level) const =0
virtual void ClearParticleDistributionMap(int level)=0
virtual const Vector< Geometry > & Geom() const =0
bool OnSameGrids(int level, const MF &mf) const
Definition: AMReX_ParGDB.H:133
virtual const Vector< BoxArray > & boxArray() const =0
virtual void ClearParticleGeometry(int level)=0
virtual int finestLevel() const =0
virtual void SetParticleBoxArray(int level, const BoxArray &new_ba)=0
virtual void ClearParticleBoxArray(int level)=0
virtual int MaxRefRatio(int level) const =0
virtual const Vector< DistributionMapping > & DistributionMap() const =0
we use this for non-Amr particle code
Definition: AMReX_ParGDB.H:66
void ClearParticleBoxArray(int level) override
Definition: AMReX_ParGDB.H:290
void SetParticleBoxArray(int level, const BoxArray &new_ba) override
Definition: AMReX_ParGDB.H:266
void SetParticleDistributionMap(int level, const DistributionMapping &new_dm) override
Definition: AMReX_ParGDB.H:274
const Vector< DistributionMapping > & DistributionMap() const override
Definition: AMReX_ParGDB.H:231
void ClearParticleGeometry(int level) override
Definition: AMReX_ParGDB.H:306
const Vector< DistributionMapping > & ParticleDistributionMap() const override
Definition: AMReX_ParGDB.H:224
void SetParticleGeometry(int level, const Geometry &new_geom) override
Definition: AMReX_ParGDB.H:282
int m_nlevels
Definition: AMReX_ParGDB.H:128
int MaxRefRatio(int level) const override
Definition: AMReX_ParGDB.H:342
const Vector< BoxArray > & ParticleBoxArray() const override
Definition: AMReX_ParGDB.H:252
Vector< IntVect > refRatio() const override
Definition: AMReX_ParGDB.H:353
const Vector< Geometry > & ParticleGeom() const override
Definition: AMReX_ParGDB.H:203
const Vector< BoxArray > & boxArray() const override
Definition: AMReX_ParGDB.H:259
int maxLevel() const override
Definition: AMReX_ParGDB.H:328
const Vector< Geometry > & Geom() const override
Definition: AMReX_ParGDB.H:196
bool LevelDefined(int level) const override
Definition: AMReX_ParGDB.H:314
Vector< Geometry > m_geom
Definition: AMReX_ParGDB.H:124
void ClearParticleDistributionMap(int level) override
Definition: AMReX_ParGDB.H:298
Vector< IntVect > m_rr
Definition: AMReX_ParGDB.H:127
int finestLevel() const override
Definition: AMReX_ParGDB.H:321
Vector< DistributionMapping > m_dmap
Definition: AMReX_ParGDB.H:125
Vector< BoxArray > m_ba
Definition: AMReX_ParGDB.H:126
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition: AMReX_Vector.H:27
AMREX_GPU_HOST_DEVICE Long size(T const &b) noexcept
integer version
Definition: AMReX_GpuRange.H:26
@ max
Definition: AMReX_ParallelReduce.H:17
Definition: AMReX_Amr.cpp:49
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE const T & max(const T &a, const T &b) noexcept
Definition: AMReX_Algorithm.H:35
const int[]
Definition: AMReX_BLProfiler.cpp:1664