Block-Structured AMR Software Framework
amrex::ParticleContainerBase Class Reference

#include <AMReX_ParticleContainerBase.H>

Inheritance diagram for amrex::ParticleContainerBase:
amrex::ParticleContainer_impl< T_ParticleType, 0, 0, DefaultAllocator, DefaultAssignor > amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor > amrex::AmrParticleContainer_impl< T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor > amrex::NeighborParticleContainer< NStructReal, NStructInt, NArrayReal, NArrayInt > amrex::TracerParticleContainer amrex::AmrTracerParticleContainer

Public Member Functions

 ParticleContainerBase ()=default
 
 ParticleContainerBase (ParGDBBase *gdb)
 
 ParticleContainerBase (const Geometry &geom, const DistributionMapping &dmap, const BoxArray &ba)
 
 ParticleContainerBase (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< int > &rr)
 
 ParticleContainerBase (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< IntVect > &rr)
 
virtual ~ParticleContainerBase ()=default
 
 ParticleContainerBase (const ParticleContainerBase &)=delete
 
ParticleContainerBaseoperator= (const ParticleContainerBase &)=delete
 
 ParticleContainerBase (ParticleContainerBase &&)=default
 
ParticleContainerBaseoperator= (ParticleContainerBase &&)=default
 
void Define (ParGDBBase *gdb)
 
void Define (const Geometry &geom, const DistributionMapping &dmap, const BoxArray &ba)
 
void Define (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< int > &rr)
 
void Define (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< IntVect > &rr)
 
bool isDefined () const
 
virtual void reserveData ()
 
virtual void resizeData ()
 
void RedefineDummyMF (int lev)
 
MFIter MakeMFIter (int lev, const MFItInfo &info) const
 
MFIter MakeMFIter (int lev) const
 
MFIter MakeMFIter (int lev, bool tile) const
 
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 to track the AMR hierarchy of an AmrCore or AmrLevel object, that correspondence will be broken here. This is the single-level version. More...
 
void SetParGDB (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< IntVect > &rr)
 Set the particle Geometry, DistributionMapping, ref ratios, and BoxArray. If the container was previously set to to track the AMR hierarchy of an AmrCore or AmrLevel object, that correspondence will be broken here. This is the multi-level version. More...
 
void SetParGDB (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< int > &rr)
 Set the particle Geometry, DistributionMapping, ref ratios, and BoxArray. If the container was previously set to to track the AMR hierarchy of an AmrCore or AmrLevel object, that correspondence will be broken here. This is the multi-level version. More...
 
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 AmrCore or AmrLevel object, that correspondence will be broken here. More...
 
void SetParticleDistributionMap (int lev, DistributionMapping new_dmap)
 Set the particle DistributionMapping. If the container was previously set to to track the AMR hierarchy of an AmrCore or AmrLevel object, that correspondence will be broken here. More...
 
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 AmrCore or AmrLevel object, that correspondence will be broken here. More...
 
const BoxArrayParticleBoxArray (int lev) const
 Get the BoxArray for a given level. More...
 
const DistributionMappingParticleDistributionMap (int lev) const
 Get the DistributionMapping for a given level. More...
 
const GeometryGeom (int lev) const
 Get the Geometry for a given level. More...
 
const GeometryParticleGeom (int lev) const
 Get the particle Geometry for a given level. More...
 
int finestLevel () const
 the finest level actually defined for the ParticleContainer More...
 
int maxLevel () const
 the finest allowed level in the ParticleContainer, whether it is defined or not. More...
 
int numLevels () const
 the number of defined levels in the ParticleContainer More...
 
const ParGDBBaseGetParGDB () const
 Get the ParGDB object used to define this container (const version) More...
 
ParGDBBaseGetParGDB ()
 Get the ParGDB object used to define this container. More...
 
int Verbose () const
 
void SetVerbose (int verbose)
 
int stableRedistribute () const
 
void setStableRedistribute (int stable)
 
const ParticleBufferMapBufferMap () const
 
Vector< intNeighborProcs (int ngrow) const
 
template<class MF >
bool OnSameGrids (int level, const MF &mf) const
 

Static Public Member Functions

static const std::string & CheckpointVersion ()
 
static const std::string & PlotfileVersion ()
 
static const std::string & DataPrefix ()
 
static int MaxReaders ()
 
static Long MaxParticlesPerRead ()
 
static const std::string & AggregationType ()
 
static int AggregationBuffer ()
 

Public Attributes

AmrParticleLocator< DenseBins< Box > > m_particle_locator
 

Static Public Attributes

static AMREX_EXPORT bool do_tiling = false
 
static AMREX_EXPORT IntVect tile_size { AMREX_D_DECL(1024000,8,8) }
 
static AMREX_EXPORT bool memEfficientSort = true
 

Protected Member Functions

void BuildRedistributeMask (int lev, int nghost=1) const
 
void defineBufferMap () const
 

Protected Attributes

int m_verbose {0}
 
int m_stable_redistribute = 0
 
std::unique_ptr< ParGDBm_gdb_object = std::make_unique<ParGDB>()
 
ParGDBBasem_gdb {nullptr}
 
Vector< std::unique_ptr< MultiFab > > m_dummy_mf
 
std::unique_ptr< iMultiFabredistribute_mask_ptr
 
int redistribute_mask_nghost = std::numeric_limits<int>::min()
 
amrex::Vector< intneighbor_procs
 
ParticleBufferMap m_buffer_map
 

Constructor & Destructor Documentation

◆ ParticleContainerBase() [1/7]

amrex::ParticleContainerBase::ParticleContainerBase ( )
default

◆ ParticleContainerBase() [2/7]

amrex::ParticleContainerBase::ParticleContainerBase ( ParGDBBase gdb)
inline

◆ ParticleContainerBase() [3/7]

amrex::ParticleContainerBase::ParticleContainerBase ( const Geometry geom,
const DistributionMapping dmap,
const BoxArray ba 
)
inline

◆ ParticleContainerBase() [4/7]

amrex::ParticleContainerBase::ParticleContainerBase ( const Vector< Geometry > &  geom,
const Vector< DistributionMapping > &  dmap,
const Vector< BoxArray > &  ba,
const Vector< int > &  rr 
)
inline

◆ ParticleContainerBase() [5/7]

amrex::ParticleContainerBase::ParticleContainerBase ( const Vector< Geometry > &  geom,
const Vector< DistributionMapping > &  dmap,
const Vector< BoxArray > &  ba,
const Vector< IntVect > &  rr 
)
inline

◆ ~ParticleContainerBase()

virtual amrex::ParticleContainerBase::~ParticleContainerBase ( )
virtualdefault

◆ ParticleContainerBase() [6/7]

amrex::ParticleContainerBase::ParticleContainerBase ( const ParticleContainerBase )
delete

◆ ParticleContainerBase() [7/7]

amrex::ParticleContainerBase::ParticleContainerBase ( ParticleContainerBase &&  )
default

Member Function Documentation

◆ AggregationBuffer()

int ParticleContainerBase::AggregationBuffer ( )
static

◆ AggregationType()

const std::string & ParticleContainerBase::AggregationType ( )
static

◆ BufferMap()

const ParticleBufferMap& amrex::ParticleContainerBase::BufferMap ( ) const
inline

◆ BuildRedistributeMask()

void ParticleContainerBase::BuildRedistributeMask ( int  lev,
int  nghost = 1 
) const
protected

◆ CheckpointVersion()

const std::string & ParticleContainerBase::CheckpointVersion ( )
static

◆ DataPrefix()

const std::string & ParticleContainerBase::DataPrefix ( )
static

◆ Define() [1/4]

void ParticleContainerBase::Define ( const Geometry geom,
const DistributionMapping dmap,
const BoxArray ba 
)

◆ Define() [2/4]

void ParticleContainerBase::Define ( const Vector< Geometry > &  geom,
const Vector< DistributionMapping > &  dmap,
const Vector< BoxArray > &  ba,
const Vector< int > &  rr 
)

◆ Define() [3/4]

void ParticleContainerBase::Define ( const Vector< Geometry > &  geom,
const Vector< DistributionMapping > &  dmap,
const Vector< BoxArray > &  ba,
const Vector< IntVect > &  rr 
)

◆ Define() [4/4]

void amrex::ParticleContainerBase::Define ( ParGDBBase gdb)
inline

◆ defineBufferMap()

void ParticleContainerBase::defineBufferMap ( ) const
protected

◆ finestLevel()

int amrex::ParticleContainerBase::finestLevel ( ) const
inline

the finest level actually defined for the ParticleContainer

◆ Geom()

const Geometry& amrex::ParticleContainerBase::Geom ( int  lev) const
inline

Get the Geometry for a given level.

Parameters
levThe level.

◆ GetParGDB() [1/2]

ParGDBBase* amrex::ParticleContainerBase::GetParGDB ( )
inline

Get the ParGDB object used to define this container.

◆ GetParGDB() [2/2]

const ParGDBBase* amrex::ParticleContainerBase::GetParGDB ( ) const
inline

Get the ParGDB object used to define this container (const version)

◆ isDefined()

bool amrex::ParticleContainerBase::isDefined ( ) const
inline

◆ MakeMFIter() [1/3]

MFIter amrex::ParticleContainerBase::MakeMFIter ( int  lev) const
inline

◆ MakeMFIter() [2/3]

MFIter amrex::ParticleContainerBase::MakeMFIter ( int  lev,
bool  tile 
) const
inline

◆ MakeMFIter() [3/3]

MFIter amrex::ParticleContainerBase::MakeMFIter ( int  lev,
const MFItInfo info 
) const
inline

◆ maxLevel()

int amrex::ParticleContainerBase::maxLevel ( ) const
inline

the finest allowed level in the ParticleContainer, whether it is defined or not.

◆ MaxParticlesPerRead()

Long ParticleContainerBase::MaxParticlesPerRead ( )
static

◆ MaxReaders()

int ParticleContainerBase::MaxReaders ( )
static

◆ NeighborProcs()

Vector<int> amrex::ParticleContainerBase::NeighborProcs ( int  ngrow) const
inline

◆ numLevels()

int amrex::ParticleContainerBase::numLevels ( ) const
inline

the number of defined levels in the ParticleContainer

◆ OnSameGrids()

template<class MF >
bool amrex::ParticleContainerBase::OnSameGrids ( int  level,
const MF &  mf 
) const
inline

◆ operator=() [1/2]

ParticleContainerBase& amrex::ParticleContainerBase::operator= ( const ParticleContainerBase )
delete

◆ operator=() [2/2]

ParticleContainerBase& amrex::ParticleContainerBase::operator= ( ParticleContainerBase &&  )
default

◆ ParticleBoxArray()

const BoxArray& amrex::ParticleContainerBase::ParticleBoxArray ( int  lev) const
inline

Get the BoxArray for a given level.

Parameters
levThe level.

◆ ParticleDistributionMap()

const DistributionMapping& amrex::ParticleContainerBase::ParticleDistributionMap ( int  lev) const
inline

Get the DistributionMapping for a given level.

Parameters
levThe level.

◆ ParticleGeom()

const Geometry& amrex::ParticleContainerBase::ParticleGeom ( int  lev) const
inline

Get the particle Geometry for a given level.

Parameters
levThe level.

◆ PlotfileVersion()

const std::string & ParticleContainerBase::PlotfileVersion ( )
static

◆ RedefineDummyMF()

void ParticleContainerBase::RedefineDummyMF ( int  lev)

◆ reserveData()

◆ resizeData()

◆ SetParGDB() [1/3]

void ParticleContainerBase::SetParGDB ( const Geometry geom,
const DistributionMapping dmap,
const BoxArray ba 
)

Set the particle Geometry, DistributionMapping, and BoxArray. If the container was previously set to to track the AMR hierarchy of an AmrCore or AmrLevel object, that correspondence will be broken here. This is the single-level version.

Parameters
geomThe new Geometry to use.
dmapThe new DistributionMapping to use.
baThe new BoxArray to use.

◆ SetParGDB() [2/3]

void ParticleContainerBase::SetParGDB ( const Vector< Geometry > &  geom,
const Vector< DistributionMapping > &  dmap,
const Vector< BoxArray > &  ba,
const Vector< int > &  rr 
)

Set the particle Geometry, DistributionMapping, ref ratios, and BoxArray. If the container was previously set to to track the AMR hierarchy of an AmrCore or AmrLevel object, that correspondence will be broken here. This is the multi-level version.

Like the above, except the refinement ratios are expressed as ints

Parameters
geomThe new vector of Geometry objects to use.
dmapThe new vector of DistributionMapping objects to use.
baThe new vector of BoxArray objects to use.
rrThe new vector of refinement ratios to use.

◆ SetParGDB() [3/3]

void ParticleContainerBase::SetParGDB ( const Vector< Geometry > &  geom,
const Vector< DistributionMapping > &  dmap,
const Vector< BoxArray > &  ba,
const Vector< IntVect > &  rr 
)

Set the particle Geometry, DistributionMapping, ref ratios, and BoxArray. If the container was previously set to to track the AMR hierarchy of an AmrCore or AmrLevel object, that correspondence will be broken here. This is the multi-level version.

Parameters
geomThe new vector of Geometry objects to use.
dmapThe new vector of DistributionMapping objects to use.
baThe new vector of BoxArray objects to use.
rrThe new vector of refinement ratios to use.

◆ SetParticleBoxArray()

void ParticleContainerBase::SetParticleBoxArray ( int  lev,
BoxArray  new_ba 
)

Set the particle BoxArray. If the container was previously set to to track the AMR hierarchy of an AmrCore or AmrLevel object, that correspondence will be broken here.

Parameters
levThe level on which to set the BoxArray.
new_baThe new BoxArray to use.

◆ SetParticleDistributionMap()

void ParticleContainerBase::SetParticleDistributionMap ( int  lev,
DistributionMapping  new_dmap 
)

Set the particle DistributionMapping. If the container was previously set to to track the AMR hierarchy of an AmrCore or AmrLevel object, that correspondence will be broken here.

Parameters
levThe level on which to set the dm.
new_dmapThe new DistributionMapping to use.

◆ SetParticleGeometry()

void ParticleContainerBase::SetParticleGeometry ( int  lev,
Geometry  new_geom 
)

Set the particle Geometry. If the container was previously set to to track the AMR hierarchy of an AmrCore or AmrLevel object, that correspondence will be broken here.

Parameters
levThe level on which to set the Geometry.
new_geomThe new Geometry to use.

◆ setStableRedistribute()

void amrex::ParticleContainerBase::setStableRedistribute ( int  stable)
inline

◆ SetVerbose()

void amrex::ParticleContainerBase::SetVerbose ( int  verbose)
inline

◆ stableRedistribute()

int amrex::ParticleContainerBase::stableRedistribute ( ) const
inline

◆ Verbose()

int amrex::ParticleContainerBase::Verbose ( ) const
inline

Member Data Documentation

◆ do_tiling

bool ParticleContainerBase::do_tiling = false
static

◆ m_buffer_map

ParticleBufferMap amrex::ParticleContainerBase::m_buffer_map
mutableprotected

◆ m_dummy_mf

Vector<std::unique_ptr<MultiFab> > amrex::ParticleContainerBase::m_dummy_mf
protected

◆ m_gdb

ParGDBBase* amrex::ParticleContainerBase::m_gdb {nullptr}
protected

◆ m_gdb_object

std::unique_ptr<ParGDB> amrex::ParticleContainerBase::m_gdb_object = std::make_unique<ParGDB>()
protected

◆ m_particle_locator

AmrParticleLocator<DenseBins<Box> > amrex::ParticleContainerBase::m_particle_locator
mutable

◆ m_stable_redistribute

int amrex::ParticleContainerBase::m_stable_redistribute = 0
protected

◆ m_verbose

int amrex::ParticleContainerBase::m_verbose {0}
protected

◆ memEfficientSort

bool ParticleContainerBase::memEfficientSort = true
static

◆ neighbor_procs

amrex::Vector<int> amrex::ParticleContainerBase::neighbor_procs
mutableprotected

◆ redistribute_mask_nghost

int amrex::ParticleContainerBase::redistribute_mask_nghost = std::numeric_limits<int>::min()
mutableprotected

◆ redistribute_mask_ptr

std::unique_ptr<iMultiFab> amrex::ParticleContainerBase::redistribute_mask_ptr
mutableprotected

◆ tile_size

IntVect ParticleContainerBase::tile_size { AMREX_D_DECL(1024000,8,8) }
static

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