Base class for FabArray. More...
#include <AMReX_FabArrayBase.H>
Classes | |
| struct | BDKey |
| struct | CacheStats |
| struct | CFinfo |
| coarse/fine boundary More... | |
| struct | CommMetaData |
| struct | CopyComTag |
| Used by a bunch of routines when communicating via MPI. More... | |
| struct | CPC |
| parallel copy or add More... | |
| struct | FabArrayStats |
| struct | FabComTag |
| Used for collecting information used in communicating FABs. More... | |
| struct | FB |
| FillBoundary. More... | |
| struct | FPinfo |
| struct | meminfo |
| struct | ParForInfo |
| For ParallelFor(FabArray) More... | |
| struct | PolarB |
| Fill polar boundary in spherical coordinates. More... | |
| struct | RB180 |
| Rotate Boundary by 180. More... | |
| struct | RB90 |
| Rotate Boundary by 90. More... | |
| struct | RegionTag |
| struct | TileArray |
| Tiling. More... | |
Public Types | |
| enum | CpOp { COPY = 0 , ADD = 1 } |
| parallel copy or add More... | |
| using | CopyComTagsContainer = CopyComTag::CopyComTagsContainer |
| using | MapOfCopyComTagContainers = CopyComTag::MapOfCopyComTagContainers |
| using | FPinfoCache = std::multimap< BDKey, FabArrayBase::FPinfo * > |
| using | FPinfoCacheIter = FPinfoCache::iterator |
| using | CFinfoCache = std::multimap< BDKey, FabArrayBase::CFinfo * > |
| using | CFinfoCacheIter = CFinfoCache::iterator |
| using | TAMap = std::map< std::pair< IntVect, IntVect >, TileArray > |
| using | TACache = std::map< BDKey, TAMap > |
| using | FBCache = std::multimap< BDKey, FabArrayBase::FB * > |
| using | FBCacheIter = FBCache::iterator |
| using | CPCache = std::multimap< BDKey, FabArrayBase::CPC * > |
| using | CPCacheIter = CPCache::iterator |
| using | RB90Cache = std::multimap< BDKey, FabArrayBase::RB90 * > |
| using | RB90CacheIter = RB90Cache::iterator |
| using | RB180Cache = std::multimap< BDKey, FabArrayBase::RB180 * > |
| using | RB180CacheIter = RB180Cache::iterator |
| using | PolarBCache = std::multimap< BDKey, FabArrayBase::PolarB * > |
| using | PolarBCacheIter = PolarBCache::iterator |
Public Member Functions | |
| FabArrayBase ()=default | |
| ~FabArrayBase ()=default | |
| FabArrayBase (const BoxArray &bxs, const DistributionMapping &dm, int nvar, int ngrow) | |
| FabArrayBase (const BoxArray &bxs, const DistributionMapping &dm, int nvar, const IntVect &ngrow) | |
| FabArrayBase (FabArrayBase &&rhs) noexcept=default | |
| FabArrayBase (const FabArrayBase &rhs)=default | |
| FabArrayBase & | operator= (const FabArrayBase &rhs)=default |
| FabArrayBase & | operator= (FabArrayBase &&rhs)=default |
| void | define (const BoxArray &bxs, const DistributionMapping &dm, int nvar, int ngrow) |
| void | define (const BoxArray &bxs, const DistributionMapping &dm, int nvar, const IntVect &ngrow) |
| int | nGrow (int direction=0) const noexcept |
| Return the grow factor that defines the region of definition. | |
| IntVect | nGrowVect () const noexcept |
| int | nComp () const noexcept |
| Return number of variables (aka components) associated with each point. | |
| IndexType | ixType () const noexcept |
| Return index type. | |
| bool | empty () const noexcept |
| const BoxArray & | boxArray () const noexcept |
| Return a constant reference to the BoxArray that defines the valid region associated with this FabArray. | |
| Box | box (int K) const noexcept |
| Return the Kth Box in the BoxArray. That is, the valid region of the Kth grid. | |
| Box | fabbox (int K) const noexcept |
| Return the Kth FABs Box in the FabArray. That is, the region the Kth fab is actually defined on. | |
| int | size () const noexcept |
| Return the number of FABs in the FabArray. | |
| int | local_size () const noexcept |
| Return the number of local FABs in the FabArray. | |
| const Vector< int > & | IndexArray () const noexcept |
| Return constant reference to indices in the FabArray that we have access. | |
| int | localindex (int K) const noexcept |
| Return local index in the vector of FABs. | |
| const DistributionMapping & | DistributionMap () const noexcept |
| Return constant reference to associated DistributionMapping. | |
| bool | is_nodal () const noexcept |
| This tests on whether the FabArray is fully nodal. | |
| bool | is_nodal (int dir) const noexcept |
| This tests on whether the FabArray is nodal in direction dir. | |
| bool | is_cell_centered () const noexcept |
| This tests on whether the FabArray is cell-centered. | |
| void | setMultiGhost (bool a_multi_ghost) |
| IntVect | nGrowFilled () const noexcept |
| void | setNGrowFilled (IntVect const &ng) noexcept |
| bool | isFusingCandidate () const noexcept |
| Is this a good candidate for kernel fusing? | |
| BDKey | getBDKey () const noexcept |
| void | updateBDKey () |
| void | flushFPinfo (bool no_assertion=false) const |
| void | flushCFinfo (bool no_assertion=false) const |
| const TileArray * | getTileArray (const IntVect &tilesize) const |
| void | clear () |
| const std::vector< bool > & | OwnerShip () const noexcept |
| Return owenership of fabs. The concept of ownership only applies when UPC++ team is used. In that case, each fab is shared by team workers, with one taking the ownership. | |
| bool | isOwner (int li) const noexcept |
| void | buildTileArray (const IntVect &tilesize, TileArray &ta) const |
| void | flushTileArray (const IntVect &tilesize=IntVect::TheZeroVector(), bool no_assertion=false) const |
| void | define_fb_metadata (CommMetaData &cmd, const IntVect &nghost, bool cross, const Periodicity &period, bool multi_ghost) const |
| const FB & | getFB (const IntVect &nghost, const Periodicity &period, bool cross=false, bool enforce_periodicity_only=false, bool override_sync=false, IntVect const &sumboundary_src_nghost=IntVect(-1)) const |
| const CPC & | getCPC (const IntVect &dstng, const FabArrayBase &src, const IntVect &srcng, const Periodicity &period, bool to_ghost_cells_only=false, const IntVect &offset=IntVect(0)) const |
| const RB90 & | getRB90 (const IntVect &nghost, const Box &domain) const |
| void | flushRB90 (bool no_assertion=false) const |
| This flushes its own RB90. | |
| const RB180 & | getRB180 (const IntVect &nghost, const Box &domain) const |
| void | flushRB180 (bool no_assertion=false) const |
| This flushes its own RB180. | |
| const PolarB & | getPolarB (const IntVect &nghost, const Box &domain) const |
| void | flushPolarB (bool no_assertion=false) const |
| This flushes its own PolarB. | |
| ParForInfo const & | getParForInfo (const IntVect &nghost) const |
| void | flushParForInfo (bool no_assertion=false) const |
| void | clearThisBD (bool no_assertion=false) const |
| clear BD count and caches associated with this BD, if no other is using this BD. | |
| void | addThisBD () |
| add the current BD into BD count database | |
Static Public Member Functions | |
| static Long | bytesOfMapOfCopyComTagContainers (const MapOfCopyComTagContainers &) |
| static void | Initialize () |
| Initialize from ParmParse with "fabarray" prefix. | |
| static void | Finalize () |
| static const FPinfo & | TheFPinfo (const FabArrayBase &srcfa, const FabArrayBase &dstfa, const IntVect &dstng, const BoxConverter &coarsener, const Geometry &fgeom, const Geometry &cgeom, const EB2::IndexSpace *) |
| static const CFinfo & | TheCFinfo (const FabArrayBase &finefa, const Geometry &finegm, const IntVect &ng, bool include_periodic, bool include_physbndry) |
| static void | updateMemUsage (std::string const &tag, Long nbytes, Arena const *ar) |
| static void | printMemUsage () |
| static Long | queryMemUsage (const std::string &tag=std::string("All")) |
| static Long | queryMemUsageHWM (const std::string &tag=std::string("All")) |
| static void | pushRegionTag (const char *t) |
| static void | pushRegionTag (std::string t) |
| static void | popRegionTag () |
| static void | flushTileArrayCache () |
| This flushes the entire cache. | |
| static void | flushRB90Cache () |
| This flushes the entire cache. | |
| static void | flushRB180Cache () |
| This flushes the entire cache. | |
| static void | flushPolarBCache () |
| This flushes the entire cache. | |
| static void | flushParForCache () |
| static bool | getAllocSingleChunk () |
| static std::uint64_t | getNextCommMetaDataId () |
Public Attributes | |
| BoxArray | boxarray |
| DistributionMapping | distributionMap |
| Vector< int > | indexArray |
| std::vector< bool > | ownership |
| IntVect | n_grow |
| int | n_comp |
| BDKey | m_bdkey |
| IntVect | n_filled |
| bool | m_multi_ghost = false |
Static Public Attributes | |
| static IntVect | mfiter_tile_size |
| Default tilesize in MFIter. | |
| static int | MaxComp = 25 |
| The maximum number of components to copy() at a time. | |
| static IntVect | comm_tile_size |
| communication tile size | |
| static FPinfoCache | m_TheFillPatchCache |
| static CacheStats | m_FPinfo_stats |
| static CFinfoCache | m_TheCrseFineCache |
| static CacheStats | m_CFinfo_stats |
| static std::map< std::string, meminfo > | m_mem_usage |
| static std::vector< std::string > | m_region_tag |
| static TACache | m_TheTileArrayCache |
| static CacheStats | m_TAC_stats |
| static FBCache | m_TheFBCache |
| static CacheStats | m_FBC_stats |
| static CPCache | m_TheCPCache |
| static CacheStats | m_CPC_stats |
| static RB90Cache | m_TheRB90Cache |
| static RB180Cache | m_TheRB180Cache |
| static PolarBCache | m_ThePolarBCache |
| static std::multimap< BDKey, ParForInfo * > | m_TheParForCache |
| static std::map< BDKey, int > | m_BD_count |
| Keep track of how many FabArrays are built with the same BDKey. | |
| static FabArrayStats | m_FA_stats |
| static bool | m_alloc_single_chunk = false |
Private Member Functions | |
| void | flushFB (bool no_assertion=false) const |
| This flushes its own FB. | |
| void | flushCPC (bool no_assertion=false) const |
| This flushes its own CPC. | |
Static Private Member Functions | |
| static void | flushFBCache () |
| This flushes the entire cache. | |
| static void | flushCPCache () |
| This flusheds the entire cache. | |
Friends | |
| class | MFIter |
| template<class FAB > | |
| void | FillBoundary (Vector< FabArray< FAB > * > const &mf, const Periodicity &period) |
Base class for FabArray.
Not to be confused with FArrayBox or FAB shorthands. Can be read as FArrayBox-like Array Base.
| using amrex::FabArrayBase::CFinfoCache = std::multimap<BDKey,FabArrayBase::CFinfo*> |
| using amrex::FabArrayBase::CFinfoCacheIter = CFinfoCache::iterator |
| using amrex::FabArrayBase::CPCache = std::multimap<BDKey,FabArrayBase::CPC*> |
| using amrex::FabArrayBase::CPCacheIter = CPCache::iterator |
| using amrex::FabArrayBase::FBCache = std::multimap<BDKey,FabArrayBase::FB*> |
| using amrex::FabArrayBase::FBCacheIter = FBCache::iterator |
| using amrex::FabArrayBase::FPinfoCache = std::multimap<BDKey,FabArrayBase::FPinfo*> |
| using amrex::FabArrayBase::FPinfoCacheIter = FPinfoCache::iterator |
| using amrex::FabArrayBase::PolarBCache = std::multimap<BDKey,FabArrayBase::PolarB*> |
| using amrex::FabArrayBase::PolarBCacheIter = PolarBCache::iterator |
| using amrex::FabArrayBase::RB180Cache = std::multimap<BDKey,FabArrayBase::RB180*> |
| using amrex::FabArrayBase::RB180CacheIter = RB180Cache::iterator |
| using amrex::FabArrayBase::RB90Cache = std::multimap<BDKey,FabArrayBase::RB90*> |
| using amrex::FabArrayBase::RB90CacheIter = RB90Cache::iterator |
| using amrex::FabArrayBase::TACache = std::map<BDKey, TAMap> |
| using amrex::FabArrayBase::TAMap = std::map<std::pair<IntVect,IntVect>, TileArray> |
|
default |
|
default |
| amrex::FabArrayBase::FabArrayBase | ( | const BoxArray & | bxs, |
| const DistributionMapping & | dm, | ||
| int | nvar, | ||
| int | ngrow | ||
| ) |
| amrex::FabArrayBase::FabArrayBase | ( | const BoxArray & | bxs, |
| const DistributionMapping & | dm, | ||
| int | nvar, | ||
| const IntVect & | ngrow | ||
| ) |
|
defaultnoexcept |
|
default |
| void amrex::FabArrayBase::addThisBD | ( | ) |
add the current BD into BD count database
|
inlinenoexcept |
Return the Kth Box in the BoxArray. That is, the valid region of the Kth grid.
|
inlinenoexcept |
|
static |
| void amrex::FabArrayBase::clear | ( | ) |
| void amrex::FabArrayBase::clearThisBD | ( | bool | no_assertion = false | ) | const |
clear BD count and caches associated with this BD, if no other is using this BD.
| void amrex::FabArrayBase::define | ( | const BoxArray & | bxs, |
| const DistributionMapping & | dm, | ||
| int | nvar, | ||
| const IntVect & | ngrow | ||
| ) |
| void amrex::FabArrayBase::define | ( | const BoxArray & | bxs, |
| const DistributionMapping & | dm, | ||
| int | nvar, | ||
| int | ngrow | ||
| ) |
| void amrex::FabArrayBase::define_fb_metadata | ( | CommMetaData & | cmd, |
| const IntVect & | nghost, | ||
| bool | cross, | ||
| const Periodicity & | period, | ||
| bool | multi_ghost | ||
| ) | const |
|
inlinenoexcept |
Return constant reference to associated DistributionMapping.
|
inlinenoexcept |
|
noexcept |
Return the Kth FABs Box in the FabArray. That is, the region the Kth fab is actually defined on.
|
static |
| void amrex::FabArrayBase::flushCFinfo | ( | bool | no_assertion = false | ) | const |
|
private |
This flushes its own CPC.
|
staticprivate |
This flusheds the entire cache.
|
private |
This flushes its own FB.
|
staticprivate |
This flushes the entire cache.
| void amrex::FabArrayBase::flushFPinfo | ( | bool | no_assertion = false | ) | const |
|
static |
| void amrex::FabArrayBase::flushParForInfo | ( | bool | no_assertion = false | ) | const |
| void amrex::FabArrayBase::flushPolarB | ( | bool | no_assertion = false | ) | const |
This flushes its own PolarB.
|
static |
This flushes the entire cache.
| void amrex::FabArrayBase::flushRB180 | ( | bool | no_assertion = false | ) | const |
This flushes its own RB180.
|
static |
This flushes the entire cache.
| void amrex::FabArrayBase::flushRB90 | ( | bool | no_assertion = false | ) | const |
This flushes its own RB90.
|
static |
This flushes the entire cache.
| void amrex::FabArrayBase::flushTileArray | ( | const IntVect & | tilesize = IntVect::TheZeroVector(), |
| bool | no_assertion = false |
||
| ) | const |
|
static |
This flushes the entire cache.
|
inlinestatic |
|
inlinenoexcept |
| const FabArrayBase::CPC & amrex::FabArrayBase::getCPC | ( | const IntVect & | dstng, |
| const FabArrayBase & | src, | ||
| const IntVect & | srcng, | ||
| const Periodicity & | period, | ||
| bool | to_ghost_cells_only = false, |
||
| const IntVect & | offset = IntVect(0) |
||
| ) | const |
| const FabArrayBase::FB & amrex::FabArrayBase::getFB | ( | const IntVect & | nghost, |
| const Periodicity & | period, | ||
| bool | cross = false, |
||
| bool | enforce_periodicity_only = false, |
||
| bool | override_sync = false, |
||
| IntVect const & | sumboundary_src_nghost = IntVect(-1) |
||
| ) | const |
|
static |
| FabArrayBase::ParForInfo const & amrex::FabArrayBase::getParForInfo | ( | const IntVect & | nghost | ) | const |
| const FabArrayBase::PolarB & amrex::FabArrayBase::getPolarB | ( | const IntVect & | nghost, |
| const Box & | domain | ||
| ) | const |
| const FabArrayBase::RB180 & amrex::FabArrayBase::getRB180 | ( | const IntVect & | nghost, |
| const Box & | domain | ||
| ) | const |
| const FabArrayBase::RB90 & amrex::FabArrayBase::getRB90 | ( | const IntVect & | nghost, |
| const Box & | domain | ||
| ) | const |
| const FabArrayBase::TileArray * amrex::FabArrayBase::getTileArray | ( | const IntVect & | tilesize | ) | const |
|
inlinenoexcept |
Return constant reference to indices in the FabArray that we have access.
|
static |
Initialize from ParmParse with "fabarray" prefix.
|
noexcept |
This tests on whether the FabArray is cell-centered.
|
noexcept |
This tests on whether the FabArray is fully nodal.
|
noexcept |
This tests on whether the FabArray is nodal in direction dir.
|
noexcept |
Is this a good candidate for kernel fusing?
|
inlinenoexcept |
|
inlinenoexcept |
Return index type.
|
inlinenoexcept |
Return the number of local FABs in the FabArray.
|
inlinenoexcept |
Return local index in the vector of FABs.
|
inlinenoexcept |
Return number of variables (aka components) associated with each point.
|
inlinenoexcept |
Return the grow factor that defines the region of definition.
|
inlinenoexcept |
|
inlinenoexcept |
|
default |
|
default |
|
inlinenoexcept |
Return owenership of fabs. The concept of ownership only applies when UPC++ team is used. In that case, each fab is shared by team workers, with one taking the ownership.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
Return the number of FABs in the FabArray.
|
static |
|
static |
| void amrex::FabArrayBase::updateBDKey | ( | ) |
|
static |
|
friend |
|
friend |
|
mutable |
|
static |
communication tile size
To maximize thread efficiency we now can decompose things like intersections among boxes into smaller tiles. This sets their maximum size.
| DistributionMapping amrex::FabArrayBase::distributionMap |
| Vector<int> amrex::FabArrayBase::indexArray |
|
static |
|
static |
Keep track of how many FabArrays are built with the same BDKey.
|
mutable |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| bool amrex::FabArrayBase::m_multi_ghost = false |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
The maximum number of components to copy() at a time.
| int amrex::FabArrayBase::n_comp |
| IntVect amrex::FabArrayBase::n_filled |
| IntVect amrex::FabArrayBase::n_grow |
| std::vector<bool> amrex::FabArrayBase::ownership |