Block-Structured AMR Software Framework
amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor > Class Template Reference

A distributed container for Particles sorted onto the levels, grids, and tiles of a block-structured AMR hierarchy. More...

#include <AMReX_ParticleContainer.H>

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

Public Types

using ParticleType = T_ParticleType
 
using ConstParticleType = typename ParticleType::ConstType
 
using CellAssignor = T_CellAssignor
 
template<typename T >
using AllocatorType = Allocator< T >
 The memory allocator in use. More...
 
using SuperParticleType = Particle< NStructReal+NArrayReal, NStructInt+NArrayInt >
 The type of the "SuperParticle" which stored all components in AoS form. More...
 
using RealType = typename Particle< NStructReal, NStructInt >::RealType
 The type of the Real data. More...
 
using ParticleContainerType = ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >
 
using ParticleTileType = ParticleTile< ParticleType, NArrayReal, NArrayInt, Allocator >
 
using ParticleInitData = ParticleInitType< NStructReal, NStructInt, NArrayReal, NArrayInt >
 
using ParticleLevel = std::map< std::pair< int, int >, ParticleTileType >
 
using AoS = typename ParticleTileType::AoS
 
using SoA = typename ParticleTileType::SoA
 
using RealVector = typename SoA::RealVector
 
using IntVector = typename SoA::IntVector
 
using ParticleVector = typename AoS::ParticleVector
 
using CharVector = Gpu::DeviceVector< char >
 
using ParIterType = ParIter_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >
 
using ParConstIterType = ParConstIter_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >
 
template<template< class > class NewAllocator = amrex::DefaultAllocator>
using ContainerLike = amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, NewAllocator >
 

Public Member Functions

 ParticleContainer_impl ()
 Default constructor - construct an empty particle container that has no concept of a level hierarchy. Must be properly initialized later. More...
 
 ParticleContainer_impl (ParGDBBase *gdb)
 Construct a particle container using a ParGDB object. The container will track changes in the grid structure of the ParGDB automatically. More...
 
 ParticleContainer_impl (const Geometry &geom, const DistributionMapping &dmap, const BoxArray &ba)
 Construct a particle container using a given Geometry, DistributionMapping, and BoxArray. Single level version. More...
 
 ParticleContainer_impl (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< int > &rr)
 Construct a particle container using a given Geometry, DistributionMapping, BoxArray and Vector of refinement ratios. Multi-level version. More...
 
 ParticleContainer_impl (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< IntVect > &rr)
 Same as the above, but accepts different refinement ratios in each direction. More...
 
 ~ParticleContainer_impl () override=default
 
 ParticleContainer_impl (const ParticleContainer_impl &)=delete
 
ParticleContainer_imploperator= (const ParticleContainer_impl &)=delete
 
 ParticleContainer_impl (ParticleContainer_impl &&) noexcept=default
 
ParticleContainer_imploperator= (ParticleContainer_impl &&) noexcept=default
 
void Define (ParGDBBase *gdb)
 Define a default-constructed ParticleContainer using a ParGDB object. The container will track changes in the grid structure of the ParGDB automatically. More...
 
void Define (const Geometry &geom, const DistributionMapping &dmap, const BoxArray &ba)
 Define a default-constructed ParticleContainer using a ParGDB object. Single-level version. More...
 
void Define (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< int > &rr)
 Define a default-constructed ParticleContainer using a ParGDB object. Multi-level version. More...
 
void Define (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< IntVect > &rr)
 Define a default-constructed ParticleContainer using a ParGDB object. Multi-level version. More...
 
int numLocalTilesAtLevel (int lev) const
 The total number of tiles on this rank on this level. More...
 
void reserveData () override
 This reserves data in the vector of dummy MultiFabs used by the ParticleContainer for the maximum number of levels possible. More...
 
void resizeData () override
 This resizes the vector of dummy MultiFabs used by the ParticleContainer for the current number of levels and calls RedefineDummyMF on each level. Note that this must be done prior to using ParticleIterator. More...
 
void InitFromAsciiFile (const std::string &file, int extradata, const IntVect *Nrep=nullptr)
 
void InitFromBinaryFile (const std::string &file, int extradata)
 
void InitFromBinaryMetaFile (const std::string &file, int extradata)
 
void InitRandom (Long icount, ULong iseed, const ParticleInitData &pdata, bool serialize=false, RealBox bx=RealBox())
 This initializes the particle container with icount randomly distributed particles. If serialize is true, then the particles will all be generated on the IO Process, and the particle positions will be broadcast to all other process. If serialize is false, then the particle positions will be randomly generated in parallel, which each process using the random seed iseed + MyProc. The particles can be constrained to lie within the RealBox bx, if so desired. The default is the full domain. More...
 
void InitRandomPerBox (Long icount, ULong iseed, const ParticleInitData &pdata)
 This initializes the container with icount randomly distributed particles per box, using the random seed iseed. All the particles have the same data and attributes, which are passed using the pdata struct. More...
 
void InitOnePerCell (Real x_off, Real y_off, Real z_off, const ParticleInitData &pdata)
 This initializes the particle container with one particle per cell, where the other particle data and attributes are all constant. The coarsest level is used to generate the particle positions. The particle variable values are passed in through the pdata struct. The parameters x_off, y_off, and z_off represent offsets between 0 and 1 that show where inside the cells to place the particles. 0.5 means cell centered. More...
 
void InitNRandomPerCell (int n_per_cell, const ParticleInitData &pdata)
 This initializes the particle container with n_per_cell randomly distributed particles per cell, where the other particle data and and attributes are all constant. The cells on the coarsest level are used to generate the particle positions. The particle variable values are passed in through the pdata struct. More...
 
void Increment (MultiFab &mf, int level)
 
Long IncrementWithTotal (MultiFab &mf, int level, bool local=false)
 
void Redistribute (int lev_min=0, int lev_max=-1, int nGrow=0, int local=0, bool remove_negative=true)
 Redistribute puts all the particles back in the right places (for some value of right) More...
 
template<class index_type >
void ReorderParticles (int lev, const MFIter &mfi, const index_type *permutations)
 Reorder particles on the tile given by lev and mfi using a the permutations array. More...
 
void SortParticlesForDeposition (IntVect idx_type)
 Sort particles on each tile such that particles adjacent in memory are likely to map to adjacent cells. This ordering can be beneficial for performance on GPU when deposition quantities onto a grid. More...
 
void SortParticlesByCell ()
 Sort the particles on each tile by cell, using Fortran ordering. More...
 
void SortParticlesByBin (IntVect bin_size)
 Sort the particles on each tile by groups of cells, given an IntVect bin_size. More...
 
bool OK (int lev_min=0, int lev_max=-1, int nGrow=0) const
 OK checks that all particles are in the right places (for some value of right) More...
 
std::array< Long, 3 > ByteSpread () const
 
std::array< Long, 3 > PrintCapacity () const
 
void ShrinkToFit ()
 
Long NumberOfParticlesAtLevel (int level, bool only_valid=true, bool only_local=false) const
 Returns # of particles at specified the level. More...
 
Vector< Long > NumberOfParticlesInGrid (int level, bool only_valid=true, bool only_local=false) const
 
Long TotalNumberOfParticles (bool only_valid=true, bool only_local=false) const
 Returns # of particles at all levels. More...
 
void RemoveParticlesAtLevel (int level)
 The Following methods are for managing Virtual and Ghost Particles. More...
 
void RemoveParticlesNotAtFinestLevel ()
 
void CreateVirtualParticles (int level, AoS &virts) const
 Creates virtual particles for a given level that represent in some capacity all particles at finer levels. More...
 
void CreateGhostParticles (int level, int ngrow, AoS &ghosts) const
 Create ghost particles for a given level that are copies of particles near coarse->fine boundaries in level-1. More...
 
void AddParticlesAtLevel (AoS &particles, int level, int nGrow=0)
 Add particles from a pbox to the grid at this level. More...
 
void CreateVirtualParticles (int level, ParticleTileType &virts) const
 Creates virtual particles for a given level that represent in some capacity all particles at finer levels. More...
 
void CreateGhostParticles (int level, int ngrow, ParticleTileType &ghosts) const
 Create ghost particles for a given level that are copies of particles near coarse->fine boundaries in level-1. More...
 
void AddParticlesAtLevel (ParticleTileType &particles, int level, int nGrow=0)
 Add particles from a pbox to the grid at this level. More...
 
void clearParticles ()
 Clear all the particles in this container. This does not free memory. More...
 
template<class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo = 0>
void copyParticles (const PCType &other, bool local=false)
 Copy particles from other to this ParticleContainer. Will clear all the particles from this container first. local controls whether or not to call Redistribute() after adding the particles. More...
 
template<class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo = 0>
void addParticles (const PCType &other, bool local=false)
 Add particles from other to this ParticleContainer. local controls whether or not to call Redistribute after adding the particles. More...
 
template<class F , class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo = 0, std::enable_if_t<! std::is_integral_v< F >, int > bar = 0>
void copyParticles (const PCType &other, F &&f, bool local=false)
 Copy particles from other to this ParticleContainer. Will clear all the particles from this container first. local controls whether or not to call Redistribute() after adding the particles. More...
 
template<class F , class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo = 0, std::enable_if_t<! std::is_integral_v< F >, int > bar = 0>
void addParticles (const PCType &other, F const &f, bool local=false)
 Add particles from other to this ParticleContainer. local controls whether or not to call Redistribute after adding the particles. More...
 
void WriteParticleRealData (void *data, size_t size, std::ostream &os) const
 Write a contiguous chunk of real particle data to an ostream. More...
 
void ReadParticleRealData (void *data, size_t size, std::istream &is)
 Read a contiguous chunk of real particle data from an istream. More...
 
void Checkpoint (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names=Vector< std::string >(), const Vector< std::string > &int_comp_names=Vector< std::string >()) const
 Writes a particle checkpoint to file, suitable for restarting. More...
 
void Checkpoint (const std::string &dir, const std::string &name, bool is_checkpoint, const Vector< std::string > &real_comp_names=Vector< std::string >(), const Vector< std::string > &int_comp_names=Vector< std::string >()) const
 Writes a particle checkpoint to file, suitable for restarting. This version allows the particle component names to be passed in. This overload exists for backwards compatibility. The is_checkpoint parameter is ignored. More...
 
void Checkpoint (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names) const
 Writes a particle checkpoint to file, suitable for restarting. This version allows some components to be toggled off, if they don't need to be stored in the chk file. More...
 
template<class F >
void WriteBinaryParticleData (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, F &&f, bool is_checkpoint=false) const
 Writes particle data to disk in the AMReX native format. More...
 
void CheckpointPre ()
 
void CheckpointPost ()
 
void Restart (const std::string &dir, const std::string &file)
 Restart from checkpoint. More...
 
void Restart (const std::string &dir, const std::string &file, bool is_checkpoint)
 Older version, for backwards compatibility. More...
 
void WritePlotFile (const std::string &dir, const std::string &name) const
 This version of WritePlotFile writes all components and assigns component names. More...
 
template<class F , std::enable_if_t<!std::is_same_v< std::decay_t< F >, Vector< std::string >>> * = nullptr>
void WritePlotFile (const std::string &dir, const std::string &name, F &&f) const
 This version of WritePlotFile writes all components and assigns component names. More...
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names) const
 This version of WritePlotFile writes all components and allows the user to specify the names of the components. More...
 
template<class F >
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, F &&f) const
 This version of WritePlotFile writes all components and allows the user to specify the names of the components. More...
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names) const
 This version of WritePlotFile writes all components and allows the user to specify the names of the components. More...
 
template<class F , std::enable_if_t<!std::is_same_v< std::decay_t< F >, Vector< std::string >>> * = nullptr>
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, F &&f) const
 This version of WritePlotFile writes all components and allows the user to specify the names of the components. More...
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp) const
 This version of WritePlotFile assigns component names, but allows the user to pass in a vector of ints that toggle on / off the writing of specific components. More...
 
template<class F >
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, F &&f) const
 This version of WritePlotFile assigns component names, but allows the user to pass in a vector of ints that toggle on / off the writing of specific components. More...
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names) const
 This is the most general version of WritePlotFile, which takes component names and flags for whether to write each variable as components. Note that the user should pass in vectors containing names of all the components, whether they are written or not. More...
 
template<class F >
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, F &&f) const
 This is the most general version of WritePlotFile, which takes component names and flags for whether to write each variable as components. Note that the user should pass in vectors containing names of all the components, whether they are written or not. More...
 
void WritePlotFilePre ()
 
void WritePlotFilePost ()
 
void WriteAsciiFile (const std::string &file)
 
const Vector< ParticleLevel > & GetParticles () const
 Return the underlying Vector (over AMR levels) of ParticleLevels. Const version. More...
 
Vector< ParticleLevel > & GetParticles ()
 Return the underlying Vector (over AMR levels) of ParticleLevels. Non-const version. More...
 
const ParticleLevelGetParticles (int lev) const
 Return the ParticleLevel for level "lev". Const version. More...
 
ParticleLevelGetParticles (int lev)
 Return the ParticleLevel for level "lev". Non-const version. More...
 
const ParticleTileTypeParticlesAt (int lev, int grid, int tile) const
 Return the ParticleTile for level "lev", grid "grid" and tile "tile." Const version. More...
 
ParticleTileTypeParticlesAt (int lev, int grid, int tile)
 Return the ParticleTile for level "lev", grid "grid" and tile "tile." Non-const version. More...
 
template<class Iterator >
const ParticleTileTypeParticlesAt (int lev, const Iterator &iter) const
 Return the ParticleTile for level "lev" and Iterator "iter". Const version. More...
 
template<class Iterator >
ParticleTileTypeParticlesAt (int lev, const Iterator &iter)
 Return the ParticleTile for level "lev" and Iterator "iter". Non-const version. More...
 
ParticleTileTypeDefineAndReturnParticleTile (int lev, int grid, int tile)
 Define and return the ParticleTile for level "lev", grid "grid" and tile "tile.". More...
 
template<class Iterator >
ParticleTileTypeDefineAndReturnParticleTile (int lev, const Iterator &iter)
 Define and return the ParticleTile for level "lev", and Iterator "iter". More...
 
void AssignDensity (int rho_index, Vector< std::unique_ptr< MultiFab > > &mf_to_be_filled, int lev_min, int ncomp, int finest_level, int ngrow=2) const
 Functions depending the layout of the data. Use with caution. More...
 
void AssignCellDensitySingleLevel (int rho_index, MultiFab &mf, int level, int ncomp=1, int particle_lvl_offset=0) const
 
template<typename P , typename Assignor = CellAssignor>
IntVect Index (const P &p, int lev) const
 
ParticleLocData Reset (ParticleType &prt, bool update, bool verbose=true, ParticleLocData pld=ParticleLocData()) const
 Updates a particle's location (Where), tries to periodic shift any particles that have left the domain. May need work (see inline comments) More...
 
template<typename P >
bool PeriodicShift (P &p) const
 Returns true if the particle was shifted. More...
 
void SetLevelDirectoriesCreated (bool tf)
 
bool GetLevelDirectoriesCreated () const
 
void SetUsePrePost (bool tf) const
 
bool GetUsePrePost () const
 
int GetMaxNextIDPrePost () const
 
Long GetNParticlesPrePost () const
 
void SetUseUnlink (bool tf) const
 
bool GetUseUnlink () const
 
void RedistributeCPU (int lev_min=0, int lev_max=-1, int nGrow=0, int local=0, bool remove_negative=true)
 
void RedistributeGPU (int lev_min=0, int lev_max=-1, int nGrow=0, int local=0, bool remove_negative=true)
 
Long superParticleSize () const
 
void AddRealComp (std::string const &name, int communicate=1)
 
void AddRealComp (int communicate=1)
 
void AddIntComp (std::string const &name, int communicate=1)
 
void AddIntComp (int communicate=1)
 
int NumRuntimeRealComps () const
 
int NumRuntimeIntComps () const
 
int NumRealComps () const
 
int NumIntComps () const
 
void ResizeRuntimeRealComp (int new_size, bool communicate)
 
void ResizeRuntimeIntComp (int new_size, bool communicate)
 
template<template< class > class NewAllocator = amrex::DefaultAllocator>
ContainerLike< NewAllocator > make_alike () const
 
void WriteParticles (int level, std::ofstream &ofs, int fnum, Vector< int > &which, Vector< int > &count, Vector< Long > &where, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::map< std::pair< int, int >, IntVector >> &particle_io_flags, bool is_checkpoint) const
 
void SetSoACompileTimeNames (std::vector< std::string > const &rdata_name, std::vector< std::string > const &idata_name)
 
std::vector< std::string > GetRealSoANames () const
 
std::vector< std::string > GetIntSoANames () const
 
template<typename P , typename Assignor >
IntVect Index (const P &p, int lev) const
 
template<typename P >
bool Where (const P &p, ParticleLocData &pld, int lev_min, int lev_max, int nGrow, int local_grid) const
 
template<typename P >
bool EnforcePeriodicWhere (P &p, ParticleLocData &pld, int lev_min, int lev_max, int local_grid) const
 
template<typename P >
bool PeriodicShift (P &p) const
 
template<typename P >
void locateParticle (P &p, ParticleLocData &pld, int lev_min, int lev_max, int nGrow, int local_grid) const
 
template<class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo>
void copyParticles (const PCType &other, bool local)
 
template<class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo>
void addParticles (const PCType &other, bool local)
 
template<class F , class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo, std::enable_if_t<! std::is_integral_v< F >, int > bar>
void copyParticles (const PCType &other, F &&f, bool local)
 
template<class F , class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo, std::enable_if_t<! std::is_integral_v< F >, int > bar>
void addParticles (const PCType &other, F const &f, bool local)
 
template<class index_type >
void ReorderParticles (int lev, const MFIter &mfi, const index_type *permutations)
 
template<class F , std::enable_if_t<!std::is_same_v< std::decay_t< F >, Vector< std::string >>> * >
void WritePlotFile (const std::string &dir, const std::string &name, F &&f) const
 
template<class F >
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, F &&f) const
 
template<class F , std::enable_if_t<!std::is_same_v< std::decay_t< F >, Vector< std::string >>> * >
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, F &&f) const
 
template<class F >
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, F &&f) const
 
template<class F >
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, F &&f) const
 
template<class F >
void WriteBinaryParticleData (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, F &&f, bool is_checkpoint) const
 
template<class RTYPE >
void ReadParticles (int cnt, int grd, int lev, std::ifstream &ifs, int finest_level_in_file, bool convert_ids)
 
- Public Member Functions inherited from amrex::ParticleContainerBase
 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
 
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
 

Public Attributes

RealDescriptor ParticleRealDescriptor = FPC::Native64RealDescriptor()
 
Vector< inth_redistribute_real_comp
 
Vector< inth_redistribute_int_comp
 
bool levelDirectoriesCreated
 Variables for i/o optimization saved for pre and post checkpoint. More...
 
bool usePrePost
 
bool doUnlink
 
int maxnextidPrePost
 
int nOutFilesPrePost
 
Long nparticlesPrePost
 
Vector< Long > nParticlesAtLevelPrePost
 
Vector< Vector< int > > whichPrePost
 
Vector< Vector< int > > countPrePost
 
Vector< Vector< Long > > wherePrePost
 
std::string HdrFileNamePrePost
 
Vector< std::string > filePrefixPrePost
 
- Public Attributes inherited from amrex::ParticleContainerBase
AmrParticleLocator< DenseBins< Box > > m_particle_locator
 

Static Public Attributes

static constexpr int NStructReal = ParticleType::NReal
 Number of extra Real components in the particle struct. More...
 
static constexpr int NStructInt = ParticleType::NInt
 Number of extra integer components in the particle struct. More...
 
static constexpr int NArrayReal = T_NArrayReal
 Number of extra Real components stored in struct-of-array form. More...
 
static constexpr int NArrayInt = T_NArrayInt
 Number of extra integer components stored in struct-of-array form. More...
 
- Static Public Attributes inherited from amrex::ParticleContainerBase
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

template<typename P >
bool Where (const P &prt, ParticleLocData &pld, int lev_min=0, int lev_max=-1, int nGrow=0, int local_grid=-1) const
 Checks a particle's location on levels lev_min and higher. Returns false if the particle does not exist on that level. Only if lev_min == lev_max, nGrow can be > 0 (i.e., including nGrow ghost cells). More...
 
template<typename P >
bool EnforcePeriodicWhere (P &prt, ParticleLocData &pld, int lev_min=0, int lev_max=-1, int local_grid=-1) const
 Checks whether the particle has crossed a periodic boundary in such a way that it is on levels lev_min and higher. More...
 
template<class RTYPE >
void ReadParticles (int cnt, int grd, int lev, std::ifstream &ifs, int finest_level_in_file, bool convert_ids)
 
void SetParticleSize ()
 
- Protected Member Functions inherited from amrex::ParticleContainerBase
void BuildRedistributeMask (int lev, int nghost=1) const
 
void defineBufferMap () const
 

Protected Attributes

DenseBins< typename ParticleTileType::ParticleTileDataTypem_bins
 
- Protected Attributes inherited from amrex::ParticleContainerBase
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
 

Private Member Functions

virtual void particlePostLocate (ParticleType &, const ParticleLocData &, const int)
 
virtual void correctCellVectors (int, int, int, const ParticleType &)
 
void RedistributeMPI (std::map< int, Vector< char > > &not_ours, int lev_min=0, int lev_max=0, int nGrow=0, int local=0)
 
template<typename P >
void locateParticle (P &p, ParticleLocData &pld, int lev_min, int lev_max, int nGrow, int local_grid=-1) const
 
void Initialize ()
 

Private Attributes

bool m_runtime_comps_defined {false}
 
int m_num_runtime_real {0}
 
int m_num_runtime_int {0}
 
size_t particle_size
 
size_t superparticle_size
 
int num_real_comm_comps
 
int num_int_comm_comps
 
Vector< ParticleLevelm_particles
 
std::vector< std::string > m_soa_rdata_names
 
std::vector< std::string > m_soa_idata_names
 

Friends

class ParIterBase_impl< true, ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >
 The type of the "Particle". More...
 
class ParIterBase_impl< false, ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >
 

Additional Inherited Members

- Static Public Member Functions inherited from amrex::ParticleContainerBase
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 ()
 

Detailed Description

template<typename T_ParticleType, int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
class amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >

A distributed container for Particles sorted onto the levels, grids, and tiles of a block-structured AMR hierarchy.

The data layout on a single tile is determined by the value of the following template parameters:

Template Parameters
T_NStructRealThe number of extra Real components in the particle struct
T_NStructIntThe number of extra integer components in the particle struct
T_NArrayRealThe number of extra Real components stored in struct-of-array form
T_NArrayIntThe number of extra integer components stored in struct-of-array form

Member Typedef Documentation

◆ AllocatorType

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<typename T >
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::AllocatorType = Allocator<T>

The memory allocator in use.

◆ AoS

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::AoS = typename ParticleTileType::AoS

◆ CellAssignor

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::CellAssignor = T_CellAssignor

◆ CharVector

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::CharVector = Gpu::DeviceVector<char>

◆ ConstParticleType

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ConstParticleType = typename ParticleType::ConstType

◆ ContainerLike

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<template< class > class NewAllocator = amrex::DefaultAllocator>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ContainerLike = amrex::ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt, NewAllocator>

type trait to translate one particle container to another, with changed allocator

◆ IntVector

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::IntVector = typename SoA::IntVector

◆ ParConstIterType

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParConstIterType = ParConstIter_impl<ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor>

◆ ParIterType

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParIterType = ParIter_impl<ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor>

◆ ParticleContainerType

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticleContainerType = ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor>

◆ ParticleInitData

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticleInitData = ParticleInitType<NStructReal, NStructInt, NArrayReal, NArrayInt>

◆ ParticleLevel

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticleLevel = std::map<std::pair<int, int>, ParticleTileType>

A single level worth of particles is indexed (grid id, tile id) for both SoA and AoS data.

◆ ParticleTileType

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticleTileType = ParticleTile<ParticleType, NArrayReal, NArrayInt, Allocator>

◆ ParticleType

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticleType = T_ParticleType

◆ ParticleVector

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticleVector = typename AoS::ParticleVector

◆ RealType

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::RealType = typename Particle<NStructReal, NStructInt>::RealType

The type of the Real data.

◆ RealVector

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::RealVector = typename SoA::RealVector

◆ SoA

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::SoA = typename ParticleTileType::SoA

◆ SuperParticleType

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
using amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::SuperParticleType = Particle<NStructReal+NArrayReal, NStructInt+NArrayInt>

The type of the "SuperParticle" which stored all components in AoS form.

Constructor & Destructor Documentation

◆ ParticleContainer_impl() [1/7]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticleContainer_impl ( )
inline

Default constructor - construct an empty particle container that has no concept of a level hierarchy. Must be properly initialized later.

◆ ParticleContainer_impl() [2/7]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticleContainer_impl ( ParGDBBase gdb)
inline

Construct a particle container using a ParGDB object. The container will track changes in the grid structure of the ParGDB automatically.

Parameters
gdbA pointer to a ParGDBBase, which contains pointers to the Geometry, DistributionMapping, and BoxArray objects that define the AMR hierarchy. Usually, this is generated by an AmrCore or AmrLevel object.

◆ ParticleContainer_impl() [3/7]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticleContainer_impl ( const Geometry geom,
const DistributionMapping dmap,
const BoxArray ba 
)
inline

Construct a particle container using a given Geometry, DistributionMapping, and BoxArray. Single level version.

Parameters
theGeometry object, which describes the problem domain
ADistributionMapping, which describes how the boxes are distributed onto MPI tasks
ABoxArray, which gives the set of grid boxes

◆ ParticleContainer_impl() [4/7]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticleContainer_impl ( const Vector< Geometry > &  geom,
const Vector< DistributionMapping > &  dmap,
const Vector< BoxArray > &  ba,
const Vector< int > &  rr 
)
inline

Construct a particle container using a given Geometry, DistributionMapping, BoxArray and Vector of refinement ratios. Multi-level version.

Parameters
geomA Vector of Geometry objects, one for each level
dmapA Vector of DistributionMappings, one for each level
baA Vector of BoxArrays, one for each level
rrA Vector of integer refinement ratios, of size num_levels - 1. rr[n] gives the refinement ratio between levels n and n+1

◆ ParticleContainer_impl() [5/7]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticleContainer_impl ( const Vector< Geometry > &  geom,
const Vector< DistributionMapping > &  dmap,
const Vector< BoxArray > &  ba,
const Vector< IntVect > &  rr 
)
inline

Same as the above, but accepts different refinement ratios in each direction.

Parameters
geomA Vector of Geometry objects, one for each level
dmapA Vector of DistributionMappings, one for each level
baA Vector of BoxArrays, one for each level
rrA Vector of IntVect refinement ratios, of size num_levels - 1. rr[n] gives the refinement ratio between levels n and n+1

◆ ~ParticleContainer_impl()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::~ParticleContainer_impl ( )
overridedefault

◆ ParticleContainer_impl() [6/7]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticleContainer_impl ( const ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor > &  )
delete

◆ ParticleContainer_impl() [7/7]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticleContainer_impl ( ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor > &&  )
defaultnoexcept

Member Function Documentation

◆ AddIntComp() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::AddIntComp ( int  communicate = 1)
inline

◆ AddIntComp() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::AddIntComp ( std::string const &  name,
int  communicate = 1 
)
inline

◆ addParticles() [1/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::addParticles ( const PCType &  other,
bool  local 
)

◆ addParticles() [2/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo = 0>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::addParticles ( const PCType &  other,
bool  local = false 
)

Add particles from other to this ParticleContainer. local controls whether or not to call Redistribute after adding the particles.

Parameters
otherthe other pc to copy from
localwhether to call redistribute after

◆ addParticles() [3/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F , class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo, std::enable_if_t<! std::is_integral_v< F >, int > bar>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::addParticles ( const PCType &  other,
F const &  f,
bool  local 
)

◆ addParticles() [4/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F , class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo = 0, std::enable_if_t<! std::is_integral_v< F >, int > bar = 0>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::addParticles ( const PCType &  other,
F const &  f,
bool  local = false 
)

Add particles from other to this ParticleContainer. local controls whether or not to call Redistribute after adding the particles.

This version conditionally copies based on a predicate function applied to each particle.

Template Parameters
callablethat takes a SuperParticle and returns a bool
Parameters
otherthe other pc to copy from
ffunction to apply to each particle as a filter
localwhether to call redistribute after

◆ AddParticlesAtLevel() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::AddParticlesAtLevel ( AoS particles,
int  level,
int  nGrow = 0 
)

Add particles from a pbox to the grid at this level.

Parameters
particles
level
nGrow

◆ AddParticlesAtLevel() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::AddParticlesAtLevel ( ParticleTileType particles,
int  level,
int  nGrow = 0 
)

Add particles from a pbox to the grid at this level.

Parameters
particles
level
nGrow

◆ AddRealComp() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::AddRealComp ( int  communicate = 1)
inline

◆ AddRealComp() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::AddRealComp ( std::string const &  name,
int  communicate = 1 
)
inline

◆ AssignCellDensitySingleLevel()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::AssignCellDensitySingleLevel ( int  rho_index,
MultiFab mf,
int  level,
int  ncomp = 1,
int  particle_lvl_offset = 0 
) const

◆ AssignDensity()

template<typename ParticleType , int NArrayReal, int NArrayInt, template< class > class Allocator, class CellAssignor >
void amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::AssignDensity ( int  rho_index,
Vector< std::unique_ptr< MultiFab > > &  mf_to_be_filled,
int  lev_min,
int  ncomp,
int  finest_level,
int  ngrow = 2 
) const

Functions depending the layout of the data. Use with caution.

Parameters
rho_index
mf_to_be_filled
lev_min
ncomp
finest_level
ngrow

◆ ByteSpread()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
std::array< Long, 3 > ParticleContainer_impl::ByteSpread ( ) const

◆ Checkpoint() [1/3]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::Checkpoint ( const std::string &  dir,
const std::string &  name,
bool  is_checkpoint,
const Vector< std::string > &  real_comp_names = Vector< std::string >(),
const Vector< std::string > &  int_comp_names = Vector< std::string >() 
) const

Writes a particle checkpoint to file, suitable for restarting. This version allows the particle component names to be passed in. This overload exists for backwards compatibility. The is_checkpoint parameter is ignored.

◆ Checkpoint() [2/3]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::Checkpoint ( const std::string &  dir,
const std::string &  name,
const Vector< int > &  write_real_comp,
const Vector< int > &  write_int_comp,
const Vector< std::string > &  real_comp_names,
const Vector< std::string > &  int_comp_names 
) const

Writes a particle checkpoint to file, suitable for restarting. This version allows some components to be toggled off, if they don't need to be stored in the chk file.

Parameters
dirThe base directory into which to write (i.e. "plt00000")
nameThe name of the sub-directory for this particle type (i.e. "Tracer")
write_real_compfor each real component, whether or not we include that component in the file
write_int_compfor each integer component, whether or not we include that component in the file
real_comp_namesvector of real component names
int_comp_namesvector of int component names

◆ Checkpoint() [3/3]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::Checkpoint ( const std::string &  dir,
const std::string &  name,
const Vector< std::string > &  real_comp_names = Vector<std::string>(),
const Vector< std::string > &  int_comp_names = Vector<std::string>() 
) const
inline

Writes a particle checkpoint to file, suitable for restarting.

Parameters
dirThe base directory into which to write (i.e. "plt00000")
nameThe name of the sub-directory for this particle type (i.e. "Tracer")
real_comp_namesvector of real component names, optional
int_comp_namesvector of int component names, optional

◆ CheckpointPost()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::CheckpointPost ( )

◆ CheckpointPre()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::CheckpointPre ( )

◆ clearParticles()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::clearParticles ( )

Clear all the particles in this container. This does not free memory.

◆ copyParticles() [1/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::copyParticles ( const PCType &  other,
bool  local 
)

◆ copyParticles() [2/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo = 0>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::copyParticles ( const PCType &  other,
bool  local = false 
)

Copy particles from other to this ParticleContainer. Will clear all the particles from this container first. local controls whether or not to call Redistribute() after adding the particles.

Parameters
otherthe other pc to copy from
localwhether to call redistribute after

◆ copyParticles() [3/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F , class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo, std::enable_if_t<! std::is_integral_v< F >, int > bar>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::copyParticles ( const PCType &  other,
F &&  f,
bool  local 
)

◆ copyParticles() [4/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F , class PCType , std::enable_if_t< IsParticleContainer< PCType >::value, int > foo = 0, std::enable_if_t<! std::is_integral_v< F >, int > bar = 0>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::copyParticles ( const PCType &  other,
F &&  f,
bool  local = false 
)

Copy particles from other to this ParticleContainer. Will clear all the particles from this container first. local controls whether or not to call Redistribute() after adding the particles.

This version conditionally copies based on a predicate function applied to each particle.

Template Parameters
callablethat takes a SuperParticle and returns a bool
Parameters
otherthe other pc to copy from
ffunction to apply to each particle as a filter
localwhether to call redistribute after

◆ correctCellVectors()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
virtual void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::correctCellVectors ( int  ,
int  ,
int  ,
const ParticleType  
)
inlineprivatevirtual

◆ CreateGhostParticles() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::CreateGhostParticles ( int  level,
int  ngrow,
AoS ghosts 
) const

Create ghost particles for a given level that are copies of particles near coarse->fine boundaries in level-1.

Parameters
level
ngrow
ghosts

◆ CreateGhostParticles() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::CreateGhostParticles ( int  level,
int  ngrow,
ParticleTileType ghosts 
) const

Create ghost particles for a given level that are copies of particles near coarse->fine boundaries in level-1.

Parameters
level
ngrow
ghosts

◆ CreateVirtualParticles() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::CreateVirtualParticles ( int  level,
AoS virts 
) const

Creates virtual particles for a given level that represent in some capacity all particles at finer levels.

Parameters
level
virts

◆ CreateVirtualParticles() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::CreateVirtualParticles ( int  level,
ParticleTileType virts 
) const

Creates virtual particles for a given level that represent in some capacity all particles at finer levels.

Parameters
level
virts

◆ Define() [1/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::Define ( const Geometry geom,
const DistributionMapping dmap,
const BoxArray ba 
)
inline

Define a default-constructed ParticleContainer using a ParGDB object. Single-level version.

Parameters
theGeometry object, which describes the problem domain
ADistributionMapping, which describes how the boxes are distributed onto MPI tasks
ABoxArray, which gives the set of grid boxes

◆ Define() [2/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::Define ( const Vector< Geometry > &  geom,
const Vector< DistributionMapping > &  dmap,
const Vector< BoxArray > &  ba,
const Vector< int > &  rr 
)
inline

Define a default-constructed ParticleContainer using a ParGDB object. Multi-level version.

Parameters
geomA Vector of Geometry objects, one for each level
dmapA Vector of DistributionMappings, one for each level
baA Vector of BoxArrays, one for each level
rrA Vector of integer refinement ratios, of size num_levels - 1. rr[n] gives the refinement ratio between levels n and n+1

◆ Define() [3/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::Define ( const Vector< Geometry > &  geom,
const Vector< DistributionMapping > &  dmap,
const Vector< BoxArray > &  ba,
const Vector< IntVect > &  rr 
)
inline

Define a default-constructed ParticleContainer using a ParGDB object. Multi-level version.

Parameters
geomA Vector of Geometry objects, one for each level
dmapA Vector of DistributionMappings, one for each level
baA Vector of BoxArrays, one for each level
rrA Vector of integer refinement ratios, of size num_levels - 1. rr[n] gives the refinement ratio between levels n and n+1

◆ Define() [4/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::Define ( ParGDBBase gdb)
inline

Define a default-constructed ParticleContainer using a ParGDB object. The container will track changes in the grid structure of the ParGDB automatically.

Parameters
gdbA pointer to a ParGDBBase, which contains pointers to the Geometry, DistributionMapping, and BoxArray objects that define the AMR hierarchy. Usually, this is generated by an AmrCore or AmrLevel object.

◆ DefineAndReturnParticleTile() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class Iterator >
ParticleTileType& amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::DefineAndReturnParticleTile ( int  lev,
const Iterator &  iter 
)
inline

Define and return the ParticleTile for level "lev", and Iterator "iter".

   Here, iter is either an MFIter or ParIter object pointing to the
   tile you want.

   If a ParticleTile at "grid" and "tile" has not been created yet,
   this function call will add it. This call will also allocate space
   for any runtime-added particle components.

   The ParticleLevel must already exist, meaning that the "resizeData()"
   method of this ParticleContainer has been called.

   Note that, when using a ParticleContainer that has been constructed
   with an AmrCore*, "resizeData()" must be called *after* the grids
   have been created, meaning after the call to AmrCore::InitFromScratch
   or AmrCore::InitFromCheckpoint has been made.

   \param lev  the level at which to get the particles
   \param iter MFIter or ParIter pointing to the tile to return

◆ DefineAndReturnParticleTile() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
ParticleTileType& amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::DefineAndReturnParticleTile ( int  lev,
int  grid,
int  tile 
)
inline

Define and return the ParticleTile for level "lev", grid "grid" and tile "tile.".

   Here, grid and tile are integers that give the index and LocalTileIndex
   of the tile you want.

   If a ParticleTile at "grid" and "tile" has not been created yet,
   this function call will add it. This call will also allocate space
   for any runtime-added particle components.

   The ParticleLevel must already exist, meaning that the "resizeData()"
   method of this ParticleContainer has been called.

   Note that, when using a ParticleContainer that has been constructed
   with an AmrCore*, "resizeData()" must be called *after* the grids
   have been created, meaning after the call to AmrCore::InitFromScratch
   or AmrCore::InitFromCheckpoint has been made.

   \param lev  the level at which to get the particles
   \param grid the index of the grid at which to get the particles
   \param tile the LocalTileIndex of the tile at which to get the particles

◆ EnforcePeriodicWhere() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<typename P >
bool amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::EnforcePeriodicWhere ( P &  p,
ParticleLocData pld,
int  lev_min,
int  lev_max,
int  local_grid 
) const

◆ EnforcePeriodicWhere() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<typename P >
bool amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::EnforcePeriodicWhere ( P &  prt,
ParticleLocData pld,
int  lev_min = 0,
int  lev_max = -1,
int  local_grid = -1 
) const
protected

Checks whether the particle has crossed a periodic boundary in such a way that it is on levels lev_min and higher.

Parameters
prt
pld
lev_min
lev_max
local_grid

◆ GetIntSoANames()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
std::vector<std::string> amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::GetIntSoANames ( ) const
inline

Get the names for the int SoA components

◆ GetLevelDirectoriesCreated()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
bool amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::GetLevelDirectoriesCreated ( ) const
inline

◆ GetMaxNextIDPrePost()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::GetMaxNextIDPrePost ( ) const
inline

◆ GetNParticlesPrePost()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Long amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::GetNParticlesPrePost ( ) const
inline

◆ GetParticles() [1/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Vector<ParticleLevel>& amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::GetParticles ( )
inline

Return the underlying Vector (over AMR levels) of ParticleLevels. Non-const version.

◆ GetParticles() [2/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
const Vector<ParticleLevel>& amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::GetParticles ( ) const
inline

Return the underlying Vector (over AMR levels) of ParticleLevels. Const version.

◆ GetParticles() [3/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
ParticleLevel& amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::GetParticles ( int  lev)
inline

Return the ParticleLevel for level "lev". Non-const version.

   The ParticleLevel must already exist, meaning that the "resizeData()"
   method of this ParticleContainer has been called.

   Note that, when using a ParticleContainer that has been constructed
   with an AmrCore*, "resizeData()" must be called *after* the grids
   have been created, meaning after the call to AmrCore::InitFromScratch
   or AmrCore::InitFromCheckpoint has been made.

   \param lev the level at which to get the particles

◆ GetParticles() [4/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
const ParticleLevel& amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::GetParticles ( int  lev) const
inline

Return the ParticleLevel for level "lev". Const version.

   The ParticleLevel must already exist, meaning that the "resizeData()"
   method of this ParticleContainer has been called.

   Note that, when using a ParticleContainer that has been constructed
   with an AmrCore*, "resizeData()" must be called *after* the grids
   have been created, meaning after the call to AmrCore::InitFromScratch
   or AmrCore::InitFromCheckpoint has been made.

   \param lev the level at which to get the particles

◆ GetRealSoANames()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
std::vector<std::string> amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::GetRealSoANames ( ) const
inline

Get the names for the real SoA components

◆ GetUsePrePost()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
bool amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::GetUsePrePost ( ) const
inline

◆ GetUseUnlink()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
bool amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::GetUseUnlink ( ) const
inline

◆ Increment()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::Increment ( MultiFab mf,
int  lev 
)

Adds the number of particles in each cell to the values currently located in the input MultiFab.

◆ IncrementWithTotal()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Long ParticleContainer_impl::IncrementWithTotal ( MultiFab mf,
int  level,
bool  local = false 
)

◆ Index() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<typename P , typename Assignor = CellAssignor>
IntVect amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::Index ( const P &  p,
int  lev 
) const

◆ Index() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<typename P , typename Assignor >
IntVect amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::Index ( const P &  p,
int  lev 
) const

◆ InitFromAsciiFile()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::InitFromAsciiFile ( const std::string &  file,
int  extradata,
const IntVect Nrep = nullptr 
)

◆ InitFromBinaryFile()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::InitFromBinaryFile ( const std::string &  file,
int  extradata 
)

◆ InitFromBinaryMetaFile()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::InitFromBinaryMetaFile ( const std::string &  file,
int  extradata 
)

◆ Initialize()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::Initialize ( )
private

◆ InitNRandomPerCell()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::InitNRandomPerCell ( int  n_per_cell,
const ParticleInitData pdata 
)

This initializes the particle container with n_per_cell randomly distributed particles per cell, where the other particle data and and attributes are all constant. The cells on the coarsest level are used to generate the particle positions. The particle variable values are passed in through the pdata struct.

Parameters
n_per_cell
pdata

◆ InitOnePerCell()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::InitOnePerCell ( Real  x_off,
Real  y_off,
Real  z_off,
const ParticleInitData pdata 
)

This initializes the particle container with one particle per cell, where the other particle data and attributes are all constant. The coarsest level is used to generate the particle positions. The particle variable values are passed in through the pdata struct. The parameters x_off, y_off, and z_off represent offsets between 0 and 1 that show where inside the cells to place the particles. 0.5 means cell centered.

Parameters
x_off
y_off
z_off
pdata

◆ InitRandom()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::InitRandom ( Long  icount,
ULong  iseed,
const ParticleInitData pdata,
bool  serialize = false,
RealBox  bx = RealBox() 
)

This initializes the particle container with icount randomly distributed particles. If serialize is true, then the particles will all be generated on the IO Process, and the particle positions will be broadcast to all other process. If serialize is false, then the particle positions will be randomly generated in parallel, which each process using the random seed iseed + MyProc. The particles can be constrained to lie within the RealBox bx, if so desired. The default is the full domain.

Parameters
icount
iseed
mass
serialize
bx

◆ InitRandomPerBox()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::InitRandomPerBox ( Long  icount,
ULong  iseed,
const ParticleInitData pdata 
)

This initializes the container with icount randomly distributed particles per box, using the random seed iseed. All the particles have the same data and attributes, which are passed using the pdata struct.

This routine is used when we want to replicate a box for a scaling study – within each box the distribution is random but the particle data is replicated across all boxes in the container. The boxes are assumed to be those on the coarsest level.

Parameters
icount
iseed
pdata

◆ locateParticle() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<typename P >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::locateParticle ( P &  p,
ParticleLocData pld,
int  lev_min,
int  lev_max,
int  nGrow,
int  local_grid 
) const

◆ locateParticle() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<typename P >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::locateParticle ( P &  p,
ParticleLocData pld,
int  lev_min,
int  lev_max,
int  nGrow,
int  local_grid = -1 
) const
private

◆ make_alike()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<template< class > class NewAllocator = amrex::DefaultAllocator>
ContainerLike<NewAllocator> amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::make_alike ( ) const
inline

Create an empty particle container

This creates a new AMReX particle container type with same compile-time and run-time attributes. But, it can change its allocator. This is helpful when creating temporary particle buffers for filter operations and device-to-host copies.

Template Parameters
AllocatorAMReX allocator, e.g., amrex::PinnedArenaAllocator
Returns
an empty particle container

◆ NumberOfParticlesAtLevel()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Long ParticleContainer_impl::NumberOfParticlesAtLevel ( int  level,
bool  only_valid = true,
bool  only_local = false 
) const

Returns # of particles at specified the level.

If "only_valid" is true it only counts valid particles.

Parameters
level
only_valid
only_local

◆ NumberOfParticlesInGrid()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Vector< Long > ParticleContainer_impl::NumberOfParticlesInGrid ( int  level,
bool  only_valid = true,
bool  only_local = false 
) const

◆ NumIntComps()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::NumIntComps ( ) const
inline

◆ numLocalTilesAtLevel()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::numLocalTilesAtLevel ( int  lev) const
inline

The total number of tiles on this rank on this level.

◆ NumRealComps()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::NumRealComps ( ) const
inline

◆ NumRuntimeIntComps()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::NumRuntimeIntComps ( ) const
inline

◆ NumRuntimeRealComps()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::NumRuntimeRealComps ( ) const
inline

◆ OK()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
bool ParticleContainer_impl::OK ( int  lev_min = 0,
int  lev_max = -1,
int  nGrow = 0 
) const

OK checks that all particles are in the right places (for some value of right)

These flags are used to do proper checking for subcycling particles the default values are fine for non-subcycling methods

Parameters
lev_min
lev_max
nGrow

◆ operator=() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
ParticleContainer_impl& amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::operator= ( const ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor > &  )
delete

◆ operator=() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
ParticleContainer_impl& amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::operator= ( ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor > &&  )
defaultnoexcept

◆ particlePostLocate()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
virtual void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::particlePostLocate ( ParticleType ,
const ParticleLocData ,
const int   
)
inlineprivatevirtual

◆ ParticlesAt() [1/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class Iterator >
ParticleTileType& amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticlesAt ( int  lev,
const Iterator &  iter 
)
inline

Return the ParticleTile for level "lev" and Iterator "iter". Non-const version.

Here, iter is either an MFIter or ParIter object pointing to the tile you want.

This is a runtime error if a ParticleTile at "iter" has not been created yet.

The ParticleLevel must already exist, meaning that the "resizeData()" method of this ParticleContainer has been called.

Note that, when using a ParticleContainer that has been constructed with an AmrCore*, "resizeData()" must be called after the grids have been created, meaning after the call to AmrCore::InitFromScratch or AmrCore::InitFromCheckpoint has been made.

Parameters
levthe level at which to get the particles
iterMFIter or ParIter pointing to the tile to return

◆ ParticlesAt() [2/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class Iterator >
const ParticleTileType& amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticlesAt ( int  lev,
const Iterator &  iter 
) const
inline

Return the ParticleTile for level "lev" and Iterator "iter". Const version.

Here, iter is either an MFIter or ParIter object pointing to the tile you want.

This is a runtime error if a ParticleTile at "iter" has not been created yet.

The ParticleLevel must already exist, meaning that the "resizeData()" method of this ParticleContainer has been called.

Note that, when using a ParticleContainer that has been constructed with an AmrCore*, "resizeData()" must be called after the grids have been created, meaning after the call to AmrCore::InitFromScratch or AmrCore::InitFromCheckpoint has been made.

Parameters
levthe level at which to get the particles
iterMFIter or ParIter pointing to the tile to return

◆ ParticlesAt() [3/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
ParticleTileType& amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticlesAt ( int  lev,
int  grid,
int  tile 
)
inline

Return the ParticleTile for level "lev", grid "grid" and tile "tile." Non-const version.

Here, grid and tile are integers that give the index and LocalTileIndex of the tile you want.

This is a runtime error if a ParticleTile at "grid" and "tile" has not been created yet.

The ParticleLevel must already exist, meaning that the "resizeData()" method of this ParticleContainer has been called.

Note that, when using a ParticleContainer that has been constructed with an AmrCore*, "resizeData()" must be called after the grids have been created, meaning after the call to AmrCore::InitFromScratch or AmrCore::InitFromCheckpoint has been made.

Parameters
levthe level at which to get the particles
gridthe index of the grid at which to get the particles
tilethe LocalTileIndex of the tile at which to get the particles

◆ ParticlesAt() [4/4]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
const ParticleTileType& amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticlesAt ( int  lev,
int  grid,
int  tile 
) const
inline

Return the ParticleTile for level "lev", grid "grid" and tile "tile." Const version.

Here, grid and tile are integers that give the index and LocalTileIndex of the tile you want.

This is a runtime error if a ParticleTile at "grid" and "tile" has not been created yet.

The ParticleLevel must already exist, meaning that the "resizeData()" method of this ParticleContainer has been called.

Note that, when using a ParticleContainer that has been constructed with an AmrCore*, "resizeData()" must be called after the grids have been created, meaning after the call to AmrCore::InitFromScratch or AmrCore::InitFromCheckpoint has been made.

Parameters
levthe level at which to get the particles
gridthe index of the grid at which to get the particles
tilethe LocalTileIndex of the tile at which to get the particles

◆ PeriodicShift() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<typename P >
bool amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::PeriodicShift ( P &  p) const

Returns true if the particle was shifted.

Parameters
prt

◆ PeriodicShift() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<typename P >
bool amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::PeriodicShift ( P &  p) const

◆ PrintCapacity()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
std::array< Long, 3 > ParticleContainer_impl::PrintCapacity ( ) const

◆ ReadParticleRealData()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::ReadParticleRealData ( void *  data,
size_t  size,
std::istream &  is 
)

Read a contiguous chunk of real particle data from an istream.

Parameters
dataA pointer to the start of the buffer into which to read
sizeThe number of elements to read
osThe istream from which to read the data
rdA RealDescriptor describing the type of the floating point data

◆ ReadParticles() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class RTYPE >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ReadParticles ( int  cnt,
int  grd,
int  lev,
std::ifstream &  ifs,
int  finest_level_in_file,
bool  convert_ids 
)
protected

◆ ReadParticles() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class RTYPE >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ReadParticles ( int  cnt,
int  grd,
int  lev,
std::ifstream &  ifs,
int  finest_level_in_file,
bool  convert_ids 
)

◆ Redistribute()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::Redistribute ( int  lev_min = 0,
int  lev_max = -1,
int  nGrow = 0,
int  local = 0,
bool  remove_negative = true 
)

Redistribute puts all the particles back in the right places (for some value of right)

Assigns particles to the levels, grids, and tiles that contain their current positions. If periodic boundary conditions are used, those will be enforced here.

If Redistribute is called with default arguments, all particles will be placed on the finest level that covers their current positions.

The lev_min, lev_max, and nGrow flags are used to do proper checking for subcycling particles. The default values are fine for non-subcycling methods

The local flag controls whether this is local or global Redistribute. In a local Redistribute, particles can only have moved a certain distance since the last time Redistribute() was called. Thus, communication only needs to happen between neighboring ranks. In a global Redistribute, the particles can potentially go from any rank to any rank. This usually happens after initialization or when doing dynamic load balancing.

Parameters
lev_minThe minimum level consider. Particles on levels less than this will not be touched, and particles on finer levels will not be assigned to levels less than this, either. Default: 0.
lev_maxThe maximum level consider. Particles on levels greater than this will not be touched, and particles on coarser levels will not be assigned to levels greater than this, either. If negative, will use the finest level in the hierarchy. Default: -1.
nGrowIf particles are within nGrow cells of their current box, they will not moved. This is useful for subcycling methods, when fine level particles need to be redistributed but are not necessarily at the same time as those on the coarse level. Default: 0
localIf 0, this will be a non-local redistribute, meaning that particle can potentially go to any other box in the simulation. If > 0, this is the maximum number of cells a particle can have moved since the last Redistribute() call. Knowing this number allows an optimized MPI communication pattern to be used.

◆ RedistributeCPU()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::RedistributeCPU ( int  lev_min = 0,
int  lev_max = -1,
int  nGrow = 0,
int  local = 0,
bool  remove_negative = true 
)

◆ RedistributeGPU()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::RedistributeGPU ( int  lev_min = 0,
int  lev_max = -1,
int  nGrow = 0,
int  local = 0,
bool  remove_negative = true 
)

◆ RedistributeMPI()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::RedistributeMPI ( std::map< int, Vector< char > > &  not_ours,
int  lev_min = 0,
int  lev_max = 0,
int  nGrow = 0,
int  local = 0 
)
private

◆ RemoveParticlesAtLevel()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::RemoveParticlesAtLevel ( int  level)

The Following methods are for managing Virtual and Ghost Particles.

Removes all particles at a given level

Parameters
level

◆ RemoveParticlesNotAtFinestLevel()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::RemoveParticlesNotAtFinestLevel ( )

◆ ReorderParticles() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class index_type >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ReorderParticles ( int  lev,
const MFIter mfi,
const index_type *  permutations 
)

Reorder particles on the tile given by lev and mfi using a the permutations array.

permutations is a pointer to an array on the GPU of size numParticles() with permutations[new index] = old index.

Parameters
lev
mfi
permutations

◆ ReorderParticles() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class index_type >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ReorderParticles ( int  lev,
const MFIter mfi,
const index_type *  permutations 
)

◆ reserveData()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::reserveData ( )
overridevirtual

This reserves data in the vector of dummy MultiFabs used by the ParticleContainer for the maximum number of levels possible.

Reimplemented from amrex::ParticleContainerBase.

◆ Reset()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
ParticleLocData ParticleContainer_impl::Reset ( ParticleType prt,
bool  update,
bool  verbose = true,
ParticleLocData  pld = ParticleLocData() 
) const

Updates a particle's location (Where), tries to periodic shift any particles that have left the domain. May need work (see inline comments)

Parameters
prt
update
verbose
pld

◆ resizeData()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::resizeData ( )
overridevirtual

This resizes the vector of dummy MultiFabs used by the ParticleContainer for the current number of levels and calls RedefineDummyMF on each level. Note that this must be done prior to using ParticleIterator.

Reimplemented from amrex::ParticleContainerBase.

◆ ResizeRuntimeIntComp()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::ResizeRuntimeIntComp ( int  new_size,
bool  communicate 
)

Resize the Int runtime components (SoA)

Parameters
new_sizenew number of integer runtime components
communicateparticipate this component in redistribute

◆ ResizeRuntimeRealComp()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::ResizeRuntimeRealComp ( int  new_size,
bool  communicate 
)

Resize the Real runtime components (SoA)

Parameters
new_sizenew number of Real runtime components
communicateparticipate this component in redistribute

◆ Restart() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::Restart ( const std::string &  dir,
const std::string &  file 
)

Restart from checkpoint.

Parameters
dirThe base directory into which to write (i.e. "plt00000")
fileThe name of the sub-directory for this particle type (i.e. "Tracer")

◆ Restart() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::Restart ( const std::string &  dir,
const std::string &  file,
bool  is_checkpoint 
)

Older version, for backwards compatibility.

Parameters
dirThe base directory into which to write (i.e. "plt00000")
fileThe name of the sub-directory for this particle type (i.e. "Tracer")
is_checkpointWhether the particle id and cpu are included in the file.

◆ SetLevelDirectoriesCreated()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::SetLevelDirectoriesCreated ( bool  tf)
inline

◆ SetParticleSize()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::SetParticleSize ( )
protected

◆ SetSoACompileTimeNames()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::SetSoACompileTimeNames ( std::vector< std::string > const &  rdata_name,
std::vector< std::string > const &  idata_name 
)

Overwrite the default names for the compile-time SoA components

◆ SetUsePrePost()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::SetUsePrePost ( bool  tf) const
inline

◆ SetUseUnlink()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::SetUseUnlink ( bool  tf) const
inline

◆ ShrinkToFit()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::ShrinkToFit ( )

◆ SortParticlesByBin()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::SortParticlesByBin ( IntVect  bin_size)

Sort the particles on each tile by groups of cells, given an IntVect bin_size.

If bin_size is the zero vector, this operation is a no-op.

◆ SortParticlesByCell()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::SortParticlesByCell ( )

Sort the particles on each tile by cell, using Fortran ordering.

◆ SortParticlesForDeposition()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::SortParticlesForDeposition ( IntVect  idx_type)

Sort particles on each tile such that particles adjacent in memory are likely to map to adjacent cells. This ordering can be beneficial for performance on GPU when deposition quantities onto a grid.

idx_type = {0, 0, 0}: Sort particles to a cell centered grid idx_type = {1, 1, 1}: Sort particles to a node centered grid idx_type = {2, 2, 2}: Compromise between a cell and node centered grid. This last option uses more memory than the fist two. Mixed versions are also possible.

Parameters
idx_type

◆ superParticleSize()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Long amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::superParticleSize ( ) const
inline

◆ TotalNumberOfParticles()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Long ParticleContainer_impl::TotalNumberOfParticles ( bool  only_valid = true,
bool  only_local = false 
) const

Returns # of particles at all levels.

If "only_valid" is true it only counts valid particles.

Parameters
only_valid
only_local

◆ Where() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<typename P >
bool amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::Where ( const P &  p,
ParticleLocData pld,
int  lev_min,
int  lev_max,
int  nGrow,
int  local_grid 
) const

◆ Where() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<typename P >
bool amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::Where ( const P &  prt,
ParticleLocData pld,
int  lev_min = 0,
int  lev_max = -1,
int  nGrow = 0,
int  local_grid = -1 
) const
protected

Checks a particle's location on levels lev_min and higher. Returns false if the particle does not exist on that level. Only if lev_min == lev_max, nGrow can be > 0 (i.e., including nGrow ghost cells).

Parameters
prt
pld
lev_min
lev_max
nGrow
local_grid

◆ WriteAsciiFile()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::WriteAsciiFile ( const std::string &  file)

◆ WriteBinaryParticleData() [1/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WriteBinaryParticleData ( const std::string &  dir,
const std::string &  name,
const Vector< int > &  write_real_comp,
const Vector< int > &  write_int_comp,
const Vector< std::string > &  real_comp_names,
const Vector< std::string > &  int_comp_names,
F &&  f,
bool  is_checkpoint 
) const

◆ WriteBinaryParticleData() [2/2]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WriteBinaryParticleData ( const std::string &  dir,
const std::string &  name,
const Vector< int > &  write_real_comp,
const Vector< int > &  write_int_comp,
const Vector< std::string > &  real_comp_names,
const Vector< std::string > &  int_comp_names,
F &&  f,
bool  is_checkpoint = false 
) const

Writes particle data to disk in the AMReX native format.

Template Parameters
Ffunction type
Parameters
dirThe base directory into which to write (i.e. "plt00000")
nameThe name of the sub-directory for this particle type (i.e. "Tracer")
write_real_compfor each real component, whether or not we include that component in the file
write_int_compfor each integer component, whether or not we include that component in the file
real_comp_namesfor each real component, a name to label the data with
int_comp_namesfor each integer component, a name to label the data with
fcallable that returns whether a given particle should be written or not
is_checkpointwhether the data is written to a checkpoint or plotfile

◆ WriteParticleRealData()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::WriteParticleRealData ( void *  data,
size_t  size,
std::ostream &  os 
) const

Write a contiguous chunk of real particle data to an ostream.

Parameters
dataA pointer to the start of the buffer to write
sizeThe number of elements to write
osThe ostream into which to write the data

◆ WriteParticles()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::WriteParticles ( int  level,
std::ofstream &  ofs,
int  fnum,
Vector< int > &  which,
Vector< int > &  count,
Vector< Long > &  where,
const Vector< int > &  write_real_comp,
const Vector< int > &  write_int_comp,
const Vector< std::map< std::pair< int, int >, IntVector >> &  particle_io_flags,
bool  is_checkpoint 
) const

◆ WritePlotFile() [1/15]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::WritePlotFile ( const std::string &  dir,
const std::string &  name 
) const

This version of WritePlotFile writes all components and assigns component names.

Parameters
dirThe base directory into which to write (i.e. "plt00000")
nameThe name of the sub-directory for this particle type (i.e. "Tracer")

◆ WritePlotFile() [2/15]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::WritePlotFile ( const std::string &  dir,
const std::string &  name,
const Vector< int > &  write_real_comp,
const Vector< int > &  write_int_comp 
) const

This version of WritePlotFile assigns component names, but allows the user to pass in a vector of ints that toggle on / off the writing of specific components.

Parameters
dirThe base directory into which to write (i.e. "plt00000")
fileThe name of the sub-directory for this particle type (i.e. "Tracer")
write_real_compfor each real component, whether to include that comp in the file
write_int_compfor each integer component, whether to include that comp in the file

◆ WritePlotFile() [3/15]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::WritePlotFile ( const std::string &  dir,
const std::string &  name,
const Vector< int > &  write_real_comp,
const Vector< int > &  write_int_comp,
const Vector< std::string > &  real_comp_names,
const Vector< std::string > &  int_comp_names 
) const

This is the most general version of WritePlotFile, which takes component names and flags for whether to write each variable as components. Note that the user should pass in vectors containing names of all the components, whether they are written or not.

Parameters
dirThe base directory into which to write (i.e. "plt00000")
fileThe name of the sub-directory for this particle type (i.e. "Tracer")
write_real_compfor each real component, whether to include that comp in the file
write_int_compfor each integer component, whether to include that comp in the file
real_comp_namesfor each real component, a name to label the data with
int_comp_namesfor each integer component, a name to label the data with

◆ WritePlotFile() [4/15]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile ( const std::string &  dir,
const std::string &  name,
const Vector< int > &  write_real_comp,
const Vector< int > &  write_int_comp,
const Vector< std::string > &  real_comp_names,
const Vector< std::string > &  int_comp_names,
F &&  f 
) const

This is the most general version of WritePlotFile, which takes component names and flags for whether to write each variable as components. Note that the user should pass in vectors containing names of all the components, whether they are written or not.

This version also lets you pass in a functor to toggle whether each particle gets output.

Template Parameters
Ffunction type
Parameters
dirThe base directory into which to write (i.e. "plt00000")
fileThe name of the sub-directory for this particle type (i.e. "Tracer")
write_real_compfor each real component, whether to include that comp in the file
write_int_compfor each integer component, whether to include that comp in the file
real_comp_namesfor each real component, a name to label the data with
int_comp_namesfor each integer component, a name to label the data with
fcallable that returns whether or not to write each particle

◆ WritePlotFile() [5/15]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile ( const std::string &  dir,
const std::string &  name,
const Vector< int > &  write_real_comp,
const Vector< int > &  write_int_comp,
const Vector< std::string > &  real_comp_names,
const Vector< std::string > &  int_comp_names,
F &&  f 
) const

◆ WritePlotFile() [6/15]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile ( const std::string &  dir,
const std::string &  name,
const Vector< int > &  write_real_comp,
const Vector< int > &  write_int_comp,
F &&  f 
) const

This version of WritePlotFile assigns component names, but allows the user to pass in a vector of ints that toggle on / off the writing of specific components.

This version also lets you pass in a functor to toggle whether each particle gets output.

Template Parameters
Ffunction type
Parameters
dirThe base directory into which to write (i.e. "plt00000")
fileThe name of the sub-directory for this particle type (i.e. "Tracer")
write_real_compfor each real component, whether to include that comp in the file
write_int_compfor each integer component, whether to include that comp in the file
fcallable that returns whether or not to write each particle

◆ WritePlotFile() [7/15]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile ( const std::string &  dir,
const std::string &  name,
const Vector< int > &  write_real_comp,
const Vector< int > &  write_int_comp,
F &&  f 
) const

◆ WritePlotFile() [8/15]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::WritePlotFile ( const std::string &  dir,
const std::string &  name,
const Vector< std::string > &  real_comp_names 
) const

This version of WritePlotFile writes all components and allows the user to specify the names of the components.

Parameters
dirThe base directory into which to write (i.e. "plt00000")
fileThe name of the sub-directory for this particle type (i.e. "Tracer")
real_comp_namesfor each real component, a name to label the data with

◆ WritePlotFile() [9/15]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::WritePlotFile ( const std::string &  dir,
const std::string &  name,
const Vector< std::string > &  real_comp_names,
const Vector< std::string > &  int_comp_names 
) const

This version of WritePlotFile writes all components and allows the user to specify the names of the components.

Parameters
dirThe base directory into which to write (i.e. "plt00000")
fileThe name of the sub-directory for this particle type (i.e. "Tracer")
real_comp_namesfor each real component, a name to label the data with
int_comp_namesfor each integer component, a name to label the data with

◆ WritePlotFile() [10/15]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile ( const std::string &  dir,
const std::string &  name,
const Vector< std::string > &  real_comp_names,
const Vector< std::string > &  int_comp_names,
F &&  f 
) const

This version of WritePlotFile writes all components and allows the user to specify the names of the components.

This version also lets you pass in a functor to toggle whether each particle gets output.

Template Parameters
Ffunction type
Parameters
dirThe base directory into which to write (i.e. "plt00000")
fileThe name of the sub-directory for this particle type (i.e. "Tracer")
real_comp_namesfor each real component, a name to label the data with
int_comp_namesfor each integer component, a name to label the data with
fcallable that returns whether or not to write each particle

◆ WritePlotFile() [11/15]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile ( const std::string &  dir,
const std::string &  name,
const Vector< std::string > &  real_comp_names,
const Vector< std::string > &  int_comp_names,
F &&  f 
) const

◆ WritePlotFile() [12/15]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F , std::enable_if_t<!std::is_same_v< std::decay_t< F >, Vector< std::string >>> * = nullptr>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile ( const std::string &  dir,
const std::string &  name,
const Vector< std::string > &  real_comp_names,
F &&  f 
) const

This version of WritePlotFile writes all components and allows the user to specify the names of the components.

This version also lets you pass in a functor to toggle whether each particle gets output.

Template Parameters
Ffunction type
Parameters
dirThe base directory into which to write (i.e. "plt00000")
fileThe name of the sub-directory for this particle type (i.e. "Tracer")
real_comp_namesfor each real component, a name to label the data with
fcallable that returns whether or not to write each particle

◆ WritePlotFile() [13/15]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F , std::enable_if_t<!std::is_same_v< std::decay_t< F >, Vector< std::string >>> * >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile ( const std::string &  dir,
const std::string &  name,
const Vector< std::string > &  real_comp_names,
F &&  f 
) const

◆ WritePlotFile() [14/15]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F , std::enable_if_t<!std::is_same_v< std::decay_t< F >, Vector< std::string >>> * = nullptr>
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile ( const std::string &  dir,
const std::string &  name,
F &&  f 
) const

This version of WritePlotFile writes all components and assigns component names.

This version also lets you pass in a functor to toggle whether each particle gets output.

Template Parameters
Ffunction type
Parameters
dirThe base directory into which to write (i.e. "plt00000")
nameThe name of the sub-directory for this particle type (i.e. "Tracer")
fcallable that returns whether or not to write each particle

◆ WritePlotFile() [15/15]

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
template<class F , std::enable_if_t<!std::is_same_v< std::decay_t< F >, Vector< std::string >>> * >
void amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile ( const std::string &  dir,
const std::string &  name,
F &&  f 
) const

◆ WritePlotFilePost()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::WritePlotFilePost ( )

◆ WritePlotFilePre()

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
void ParticleContainer_impl::WritePlotFilePre ( )

Friends And Related Function Documentation

◆ ParIterBase_impl< false, ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
friend class ParIterBase_impl< false, ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >
friend

◆ ParIterBase_impl< true, ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
friend class ParIterBase_impl< true, ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >
friend

The type of the "Particle".

Member Data Documentation

◆ countPrePost

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Vector<Vector<int> > amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::countPrePost
mutable

◆ doUnlink

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
bool amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::doUnlink
mutable

◆ filePrefixPrePost

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Vector<std::string> amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::filePrefixPrePost
mutable

◆ h_redistribute_int_comp

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Vector<int> amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::h_redistribute_int_comp

◆ h_redistribute_real_comp

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Vector<int> amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::h_redistribute_real_comp

◆ HdrFileNamePrePost

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
std::string amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::HdrFileNamePrePost
mutable

◆ levelDirectoriesCreated

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
bool amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::levelDirectoriesCreated
mutable

Variables for i/o optimization saved for pre and post checkpoint.

◆ m_bins

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
DenseBins<typename ParticleTileType::ParticleTileDataType> amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::m_bins
protected

◆ m_num_runtime_int

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::m_num_runtime_int {0}
private

◆ m_num_runtime_real

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::m_num_runtime_real {0}
private

◆ m_particles

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Vector<ParticleLevel> amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::m_particles
private

◆ m_runtime_comps_defined

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
bool amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::m_runtime_comps_defined {false}
private

◆ m_soa_idata_names

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
std::vector<std::string> amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::m_soa_idata_names
private

◆ m_soa_rdata_names

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
std::vector<std::string> amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::m_soa_rdata_names
private

◆ maxnextidPrePost

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::maxnextidPrePost

◆ NArrayInt

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
constexpr int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::NArrayInt = T_NArrayInt
staticconstexpr

Number of extra integer components stored in struct-of-array form.

◆ NArrayReal

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
constexpr int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::NArrayReal = T_NArrayReal
staticconstexpr

Number of extra Real components stored in struct-of-array form.

◆ nOutFilesPrePost

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::nOutFilesPrePost
mutable

◆ nParticlesAtLevelPrePost

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Vector<Long> amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::nParticlesAtLevelPrePost

◆ nparticlesPrePost

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Long amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::nparticlesPrePost

◆ NStructInt

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
constexpr int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::NStructInt = ParticleType::NInt
staticconstexpr

Number of extra integer components in the particle struct.

◆ NStructReal

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
constexpr int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::NStructReal = ParticleType::NReal
staticconstexpr

Number of extra Real components in the particle struct.

◆ num_int_comm_comps

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::num_int_comm_comps
private

◆ num_real_comm_comps

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
int amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::num_real_comm_comps
private

◆ particle_size

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
size_t amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::particle_size
private

◆ ParticleRealDescriptor

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
RealDescriptor amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::ParticleRealDescriptor = FPC::Native64RealDescriptor()

◆ superparticle_size

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
size_t amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::superparticle_size
private

◆ usePrePost

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
bool amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::usePrePost
mutable

◆ wherePrePost

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Vector<Vector<Long> > amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::wherePrePost
mutable

◆ whichPrePost

template<typename T_ParticleType , int T_NArrayReal, int T_NArrayInt, template< class > class Allocator = DefaultAllocator, class T_CellAssignor = DefaultAssignor>
Vector<Vector<int> > amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::whichPrePost
mutable

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