Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::ParticleContainerBase Class Reference

#include <AMReX_ParticleContainerBase.H>

Inheritance diagram for amrex::ParticleContainerBase:
amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, CellAssignor > amrex::ParticleContainer_impl< Particle< T_NStructReal, T_NStructInt >, T_NArrayReal, T_NArrayInt, Allocator, CellAssignor > amrex::ParticleContainer_impl< T_ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor > amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor > amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, NewAllocator > amrex::ParticleContainer_impl< SoAParticle< T_NArrayReal, T_NArrayInt >, T_NArrayReal, T_NArrayInt, Allocator, CellAssignor > amrex::ParticleContainer_impl< RTSoAParticle< RType, IType >, 0, 0, PolymorphicArenaAllocator, CellAssignor > amrex::ParticleContainer_impl< T_ParticleType, 0, 0, DefaultAllocator, DefaultAssignor > amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >

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
ParticleContainerBase & operator= (const ParticleContainerBase &)=delete
 ParticleContainerBase (ParticleContainerBase &&) noexcept=default
ParticleContainerBase & operator= (ParticleContainerBase &&) noexcept=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.
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.
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.
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.
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.
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.
const BoxArray & ParticleBoxArray (int lev) const
 Get the BoxArray for a given level.
const DistributionMapping & ParticleDistributionMap (int lev) const
 Get the DistributionMapping for a given level.
const Geometry & Geom (int lev) const
 Get the Geometry for a given level.
const Geometry & ParticleGeom (int lev) const
 Get the particle Geometry for a given level.
int finestLevel () const
 the finest level actually defined for the ParticleContainer
int maxLevel () const
 the finest allowed level in the ParticleContainer, whether it is defined or not.
int numLevels () const
 the number of defined levels in the ParticleContainer
const ParGDBBase * GetParGDB () const
 Get the ParGDB object used to define this container (const version).
ParGDBBase * GetParGDB ()
 Get the ParGDB object used to define this container.
int Verbose () const
void SetVerbose (int verbose)
int stableRedistribute () const
void setStableRedistribute (int stable)
const ParticleBufferMap & BufferMap () const
void ensureParticleHandshakeWindow () const
Long * particleHandshakeBuffer () const
MPI_Win particleHandshakeWindow () const
Vector< int > NeighborProcs (IntVect ngrow) const
Vector< int > NeighborProcs (int ngrow) const
template<class MF>
bool OnSameGrids (int level, const MF &mf) const
Arena * arena () const
void SetArena (Arena *a)

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 bool do_tiling = false
static IntVect tile_size { 1024000,8,8 }
static bool memEfficientSort = true
static bool use_comms_arena = false

Protected Member Functions

bool RedistributeMaskLooksCheap (int lev, IntVect nghost) const
void BuildRedistributeMask (int lev, IntVect nghost) const
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< ParGDB > m_gdb_object = std::make_unique<ParGDB>()
ParGDBBase * m_gdb {nullptr}
Vector< std::unique_ptr< MultiFab > > m_dummy_mf
Arena * m_arena = nullptr
std::unique_ptr< iMultiFab > redistribute_mask_ptr
IntVect redistribute_mask_nghost = IntVect(std::numeric_limits<int>::min())
bool redistribute_mask_cost_cached = false
bool redistribute_mask_cost = false
IntVect redistribute_mask_cost_nghost = IntVect(std::numeric_limits<int>::min())
BoxArray redistribute_mask_cost_ba
DistributionMapping redistribute_mask_cost_dmap
amrex::Vector< int > neighbor_procs
ParticleBufferMap m_buffer_map
std::unique_ptr< ParticleHandshakeWindow > m_particle_handshake_window

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 && )
defaultnoexcept

Member Function Documentation

◆ AggregationBuffer()

int amrex::ParticleContainerBase::AggregationBuffer ( )
static

◆ AggregationType()

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

◆ arena()

Arena * amrex::ParticleContainerBase::arena ( ) const
inlinenodiscard

◆ BufferMap()

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

◆ BuildRedistributeMask() [1/2]

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

◆ BuildRedistributeMask() [2/2]

void amrex::ParticleContainerBase::BuildRedistributeMask ( int lev,
IntVect nghost ) const
protected

◆ CheckpointVersion()

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

◆ DataPrefix()

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

◆ Define() [1/4]

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

◆ Define() [2/4]

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

◆ Define() [3/4]

void amrex::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 amrex::ParticleContainerBase::defineBufferMap ( ) const
protected

◆ ensureParticleHandshakeWindow()

void amrex::ParticleContainerBase::ensureParticleHandshakeWindow ( ) const

◆ 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 amrex::ParticleContainerBase::MaxParticlesPerRead ( )
static

◆ MaxReaders()

int amrex::ParticleContainerBase::MaxReaders ( )
static

◆ NeighborProcs() [1/2]

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

◆ NeighborProcs() [2/2]

Vector< int > amrex::ParticleContainerBase::NeighborProcs ( IntVect 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 && )
defaultnoexcept

◆ 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.

◆ particleHandshakeBuffer()

Long * amrex::ParticleContainerBase::particleHandshakeBuffer ( ) const
inlinenodiscard

◆ particleHandshakeWindow()

MPI_Win amrex::ParticleContainerBase::particleHandshakeWindow ( ) const
inlinenodiscard

◆ PlotfileVersion()

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

◆ RedefineDummyMF()

void amrex::ParticleContainerBase::RedefineDummyMF ( int lev)

◆ RedistributeMaskLooksCheap()

bool amrex::ParticleContainerBase::RedistributeMaskLooksCheap ( int lev,
IntVect nghost ) const
protected

◆ reserveData()

◆ resizeData()

◆ SetArena()

void amrex::ParticleContainerBase::SetArena ( Arena * a)
inline

◆ SetParGDB() [1/3]

void amrex::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 amrex::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 amrex::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 amrex::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 amrex::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 amrex::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
inlinenodiscard

◆ Verbose()

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

Member Data Documentation

◆ do_tiling

bool amrex::ParticleContainerBase::do_tiling = false
static

◆ m_arena

Arena* amrex::ParticleContainerBase::m_arena = nullptr
protected

◆ 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_handshake_window

std::unique_ptr<ParticleHandshakeWindow> amrex::ParticleContainerBase::m_particle_handshake_window
mutableprotected

◆ 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 amrex::ParticleContainerBase::memEfficientSort = true
static

◆ neighbor_procs

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

◆ redistribute_mask_cost

bool amrex::ParticleContainerBase::redistribute_mask_cost = false
mutableprotected

◆ redistribute_mask_cost_ba

BoxArray amrex::ParticleContainerBase::redistribute_mask_cost_ba
mutableprotected

◆ redistribute_mask_cost_cached

bool amrex::ParticleContainerBase::redistribute_mask_cost_cached = false
mutableprotected

◆ redistribute_mask_cost_dmap

DistributionMapping amrex::ParticleContainerBase::redistribute_mask_cost_dmap
mutableprotected

◆ redistribute_mask_cost_nghost

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

◆ redistribute_mask_nghost

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

◆ redistribute_mask_ptr

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

◆ tile_size

IntVect amrex::ParticleContainerBase::tile_size { 1024000,8,8 }
static

◆ use_comms_arena

bool amrex::ParticleContainerBase::use_comms_arena = false
static

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