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

Base class for FabArray. More...

#include <AMReX_FabArrayBase.H>

Inheritance diagram for amrex::FabArrayBase:
amrex::FabArray< FArrayBox > amrex::FabArray< TagBox > amrex::FabArray< IArrayBox > amrex::FabArray< amrex::EBCellFlagFab > amrex::FabArray< BaseFab< GpuComplex< Real > > > amrex::FabArray< BaseFab< GpuComplex< typename MF::value_type > > > amrex::FabArray< BaseFab< GpuComplex< T > > > amrex::FabArray< amrex::BaseFab< HYPRE_Int > > amrex::FabArray< amrex::BaseFab< AtomicInt > > amrex::FabArray< amrex::CutFab > amrex::FabArray< amrex::Mask > amrex::FabArray< amrex::BaseFab< PetscInt > > amrex::LayoutData< GFab > amrex::LayoutData< amrex::Vector< amrex::Vector< amrex::BoundCond > > > amrex::LayoutData< RealTuple > amrex::LayoutData< int > amrex::LayoutData< HYPRE_Int > amrex::LayoutData< Int > amrex::LayoutData< amrex::PODVector< Int > > amrex::LayoutData< amrex::PODVector< HYPRE_Int > > amrex::LayoutData< amrex::PODVector< int > > amrex::LayoutData< PetscInt > amrex::FabArray< FAB > amrex::LayoutData< T >

Classes

struct  BDKey
 
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
 
FabArrayBaseoperator= (const FabArrayBase &rhs)=default
 
FabArrayBaseoperator= (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 BoxArrayboxArray () 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 DistributionMappingDistributionMap () 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)
 Record whether this FabArrayBase participates in multi-ghost exchanges.
 
IntVect nGrowFilled () const noexcept
 Return the halo width currently recorded as up to date.
 
void setNGrowFilled (IntVect const &ng) noexcept
 Update the bookkeeping on how many ghost cells are known to be valid.
 
bool isFusingCandidate () const noexcept
 Is this a good candidate for kernel fusing?
 
BDKey getBDKey () const noexcept
 
void updateBDKey ()
 Refresh the cached BDKey after rebinding BoxArray or DistributionMapping data.
 
void flushFPinfo (bool no_assertion=false) const
 
void flushCFinfo (bool no_assertion=false) const
 
const TileArraygetTileArray (const IntVect &tilesize) const
 Return the cached tile decomposition used by MFIter.
 
void clear ()
 Clear this object's BoxArray, DistributionMapping, local index/ownership data, and BDKey so the container can be redefined.
 
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
 Populate communication metadata for FillBoundary-style operations.
 
const FBgetFB (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
 Retrieve (and cache) the FillBoundary metadata for the requested halo.
 
const CPCgetCPC (const IntVect &dstng, const FabArrayBase &src, const IntVect &srcng, const Periodicity &period, bool to_ghost_cells_only=false, const IntVect &offset=IntVect(0)) const
 Retrieve (and cache) the ParallelCopy metadata between two FabArrays.
 
const RB90getRB90 (const IntVect &nghost, const Box &domain) const
 
void flushRB90 (bool no_assertion=false) const
 This flushes its own RB90.
 
const RB180getRB180 (const IntVect &nghost, const Box &domain) const
 
void flushRB180 (bool no_assertion=false) const
 This flushes its own RB180.
 
const PolarBgetPolarB (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
 Obtain metadata describing how to launch device ParallelFor over this FabArray.
 
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 FPinfoTheFPinfo (const FabArrayBase &srcfa, const FabArrayBase &dstfa, const IntVect &dstng, const BoxConverter &coarsener, const Geometry &fgeom, const Geometry &cgeom, const EB2::IndexSpace *)
 
static const CFinfoTheCFinfo (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)
 Accumulate memory usage statistics for diagnostics.
 
static void printMemUsage ()
 Print the tracked memory usage table on the current subcommunicator's I/O process.
 
static Long queryMemUsage (const std::string &tag=std::string("All"))
 Query the currently-live bytes tracked under tag (defaults to the All tag).
 
static Long queryMemUsageHWM (const std::string &tag=std::string("All"))
 Query the recorded high-water mark tracked under tag (defaults to the All tag).
 
static void pushRegionTag (const char *t)
 Push a memory-region tag used to classify subsequent FabArray allocations.
 
static void pushRegionTag (std::string t)
 Overload accepting std::string.
 
static void popRegionTag ()
 Pop the most recent region tag. The tag stack must be nonempty.
 
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 ()
 Query whether single-chunk allocation is enabled for new FabArrays.
 
static std::uint64_t getNextCommMetaDataId ()
 Generate a monotonically increasing identifier for communication metadata objects.
 

Public Attributes

BoxArray boxarray
 
DistributionMapping distributionMap
 
Vector< intindexArray
 
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, meminfom_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, intm_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
 

Friends

class MFIter
 
template<class FAB >
void FillBoundary (Vector< FabArray< FAB > * > const &mf, const Periodicity &period)
 

Detailed Description

Base class for FabArray.

Not to be confused with FArrayBox or FAB shorthands. Can be read as FArrayBox-like Array Base.

Member Typedef Documentation

◆ CFinfoCache

◆ CFinfoCacheIter

using amrex::FabArrayBase::CFinfoCacheIter = CFinfoCache::iterator

◆ CopyComTagsContainer

◆ CPCache

◆ CPCacheIter

using amrex::FabArrayBase::CPCacheIter = CPCache::iterator

◆ FBCache

◆ FBCacheIter

using amrex::FabArrayBase::FBCacheIter = FBCache::iterator

◆ FPinfoCache

◆ FPinfoCacheIter

using amrex::FabArrayBase::FPinfoCacheIter = FPinfoCache::iterator

◆ MapOfCopyComTagContainers

◆ PolarBCache

◆ PolarBCacheIter

using amrex::FabArrayBase::PolarBCacheIter = PolarBCache::iterator

◆ RB180Cache

◆ RB180CacheIter

using amrex::FabArrayBase::RB180CacheIter = RB180Cache::iterator

◆ RB90Cache

◆ RB90CacheIter

using amrex::FabArrayBase::RB90CacheIter = RB90Cache::iterator

◆ TACache

◆ TAMap

using amrex::FabArrayBase::TAMap = std::map<std::pair<IntVect,IntVect>, TileArray>

Member Enumeration Documentation

◆ CpOp

parallel copy or add

Enumerator
COPY 
ADD 

Constructor & Destructor Documentation

◆ FabArrayBase() [1/5]

amrex::FabArrayBase::FabArrayBase ( )
default

◆ ~FabArrayBase()

amrex::FabArrayBase::~FabArrayBase ( )
default

◆ FabArrayBase() [2/5]

amrex::FabArrayBase::FabArrayBase ( const BoxArray bxs,
const DistributionMapping dm,
int  nvar,
int  ngrow 
)

◆ FabArrayBase() [3/5]

amrex::FabArrayBase::FabArrayBase ( const BoxArray bxs,
const DistributionMapping dm,
int  nvar,
const IntVect ngrow 
)

◆ FabArrayBase() [4/5]

amrex::FabArrayBase::FabArrayBase ( FabArrayBase &&  rhs)
defaultnoexcept

◆ FabArrayBase() [5/5]

amrex::FabArrayBase::FabArrayBase ( const FabArrayBase rhs)
default

Member Function Documentation

◆ addThisBD()

void amrex::FabArrayBase::addThisBD ( )

add the current BD into BD count database

◆ box()

Box amrex::FabArrayBase::box ( int  K) const
inlinenoexcept

Return the Kth Box in the BoxArray. That is, the valid region of the Kth grid.

◆ boxArray()

const BoxArray & amrex::FabArrayBase::boxArray ( ) const
inlinenoexcept

Return a constant reference to the BoxArray that defines the valid region associated with this FabArray.

◆ buildTileArray()

void amrex::FabArrayBase::buildTileArray ( const IntVect tilesize,
TileArray ta 
) const

◆ bytesOfMapOfCopyComTagContainers()

Long amrex::FabArrayBase::bytesOfMapOfCopyComTagContainers ( const MapOfCopyComTagContainers m)
static

◆ clear()

void amrex::FabArrayBase::clear ( )

Clear this object's BoxArray, DistributionMapping, local index/ownership data, and BDKey so the container can be redefined.

The communication-metadata caches (FillBoundary/ParallelCopy/etc.) are global and are not flushed here.

◆ clearThisBD()

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.

◆ define() [1/2]

void amrex::FabArrayBase::define ( const BoxArray bxs,
const DistributionMapping dm,
int  nvar,
const IntVect ngrow 
)

◆ define() [2/2]

void amrex::FabArrayBase::define ( const BoxArray bxs,
const DistributionMapping dm,
int  nvar,
int  ngrow 
)

◆ define_fb_metadata()

void amrex::FabArrayBase::define_fb_metadata ( CommMetaData cmd,
const IntVect nghost,
bool  cross,
const Periodicity period,
bool  multi_ghost 
) const

Populate communication metadata for FillBoundary-style operations.

Parameters
cmdReference to the metadata record that will own the tag arrays.
nghostGrow vector describing the ghost region of interest.
crossWhether to skip corner ghost cells.
periodPeriodicity object defining wrapped intersections.
multi_ghostInclude overlapping ghost-node regions for grow widths greater than one.

◆ DistributionMap()

const DistributionMapping & amrex::FabArrayBase::DistributionMap ( ) const
inlinenoexcept

Return constant reference to associated DistributionMapping.

◆ empty()

bool amrex::FabArrayBase::empty ( ) const
inlinenoexcept

◆ fabbox()

Box amrex::FabArrayBase::fabbox ( int  K) const
noexcept

Return the Kth FABs Box in the FabArray. That is, the region the Kth fab is actually defined on.

◆ Finalize()

void amrex::FabArrayBase::Finalize ( )
static

◆ flushCFinfo()

void amrex::FabArrayBase::flushCFinfo ( bool  no_assertion = false) const

◆ flushFPinfo()

void amrex::FabArrayBase::flushFPinfo ( bool  no_assertion = false) const

◆ flushParForCache()

void amrex::FabArrayBase::flushParForCache ( )
static

◆ flushParForInfo()

void amrex::FabArrayBase::flushParForInfo ( bool  no_assertion = false) const

◆ flushPolarB()

void amrex::FabArrayBase::flushPolarB ( bool  no_assertion = false) const

This flushes its own PolarB.

◆ flushPolarBCache()

void amrex::FabArrayBase::flushPolarBCache ( )
static

This flushes the entire cache.

◆ flushRB180()

void amrex::FabArrayBase::flushRB180 ( bool  no_assertion = false) const

This flushes its own RB180.

◆ flushRB180Cache()

void amrex::FabArrayBase::flushRB180Cache ( )
static

This flushes the entire cache.

◆ flushRB90()

void amrex::FabArrayBase::flushRB90 ( bool  no_assertion = false) const

This flushes its own RB90.

◆ flushRB90Cache()

void amrex::FabArrayBase::flushRB90Cache ( )
static

This flushes the entire cache.

◆ flushTileArray()

void amrex::FabArrayBase::flushTileArray ( const IntVect tilesize = IntVect::TheZeroVector(),
bool  no_assertion = false 
) const

◆ flushTileArrayCache()

void amrex::FabArrayBase::flushTileArrayCache ( )
static

This flushes the entire cache.

◆ getAllocSingleChunk()

static bool amrex::FabArrayBase::getAllocSingleChunk ( )
inlinestatic

Query whether single-chunk allocation is enabled for new FabArrays.

◆ getBDKey()

BDKey amrex::FabArrayBase::getBDKey ( ) const
inlinenoexcept

◆ getCPC()

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

Retrieve (and cache) the ParallelCopy metadata between two FabArrays.

Parameters
dstngDestination ghost cells included in the transfer.
srcSource FabArrayBase driving the exchange.
srcngSource ghost cells included in the transfer.
periodPeriodicity description honoring domain wrapping.
to_ghost_cells_onlyRestrict transfers to destination ghost cells.
offsetIndex offset pairing destination index iv with source index iv-offset, with periodic images included as specified by period.

◆ getFB()

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

Retrieve (and cache) the FillBoundary metadata for the requested halo.

Parameters
nghostNumber of grow cells required.
periodPeriodicity description honoring domain wrapping.
crossSkip corner fills when true.
enforce_periodicity_onlyGenerate tags strictly for periodic exchanges.
override_syncUse the override-sync tag pattern instead of the normal ghost-cell FillBoundary pattern.
sumboundary_src_nghostSource grow vector; if every component is nonnegative, and neither enforce_periodicity_only nor override_sync is set, SumBoundary metadata is built.

◆ getNextCommMetaDataId()

std::uint64_t amrex::FabArrayBase::getNextCommMetaDataId ( )
static

Generate a monotonically increasing identifier for communication metadata objects.

◆ getParForInfo()

FabArrayBase::ParForInfo const & amrex::FabArrayBase::getParForInfo ( const IntVect nghost) const

Obtain metadata describing how to launch device ParallelFor over this FabArray.

Parameters
nghostGrow vector describing which halo width will participate in the loop.

◆ getPolarB()

const FabArrayBase::PolarB & amrex::FabArrayBase::getPolarB ( const IntVect nghost,
const Box domain 
) const

Retrieve the spherical polar-boundary metadata used by NonLocalBC::FillPolar() for a given halo width and domain.

◆ getRB180()

const FabArrayBase::RB180 & amrex::FabArrayBase::getRB180 ( const IntVect nghost,
const Box domain 
) const

Retrieve the rotation-by-180 metadata used by NonLocalBC::Rotate180() for a given halo width and domain.

◆ getRB90()

const FabArrayBase::RB90 & amrex::FabArrayBase::getRB90 ( const IntVect nghost,
const Box domain 
) const

Retrieve the rotation-by-90 metadata used by NonLocalBC::Rotate90() for a given halo width and domain.

◆ getTileArray()

const FabArrayBase::TileArray * amrex::FabArrayBase::getTileArray ( const IntVect tilesize) const

Return the cached tile decomposition used by MFIter.

The cache is keyed by this FabArrayBase BDKey plus the pair of requested tile size and BoxArray coarsening ratio. If no entry exists, this builds it on first use with buildTileArray() and records the use before returning.

It is not guaranteed that the all the tiles in the decomposition will be have exactly the input tile_size. Some of the tiles may be slightly larger. It is guaranteed, however, that the tiles associated with a given box will be non-overlapping.

IntVect::TheZeroVector() means untiled iteration: the TileArray has one tile per owned local FAB. Otherwise each owned local valid box is split by the requested tile size. The parallel vectors in TileArray provide the global FAB index, local FAB index, local tile index, number of tiles in that FAB, and the cell-centered tile boxes consumed by MFIter.

TileArray::tileArray always stores cell-centered boxes; MFIter converts them to the requested IndexType for tilebox(), growntilebox(), and related accessors. The returned pointer is owned by the static tile-array cache; treat it as immutable and do not keep it after the cache entry can be flushed.

◆ IndexArray()

const Vector< int > & amrex::FabArrayBase::IndexArray ( ) const
inlinenoexcept

Return constant reference to indices in the FabArray that we have access.

◆ Initialize()

void amrex::FabArrayBase::Initialize ( )
static

Initialize from ParmParse with "fabarray" prefix.

◆ is_cell_centered()

bool amrex::FabArrayBase::is_cell_centered ( ) const
noexcept

This tests on whether the FabArray is cell-centered.

◆ is_nodal() [1/2]

bool amrex::FabArrayBase::is_nodal ( ) const
noexcept

This tests on whether the FabArray is fully nodal.

◆ is_nodal() [2/2]

bool amrex::FabArrayBase::is_nodal ( int  dir) const
noexcept

This tests on whether the FabArray is nodal in direction dir.

◆ isFusingCandidate()

bool amrex::FabArrayBase::isFusingCandidate ( ) const
noexcept

Is this a good candidate for kernel fusing?

◆ isOwner()

bool amrex::FabArrayBase::isOwner ( int  li) const
inlinenoexcept

◆ ixType()

IndexType amrex::FabArrayBase::ixType ( ) const
inlinenoexcept

Return index type.

◆ local_size()

int amrex::FabArrayBase::local_size ( ) const
inlinenoexcept

Return the number of local FABs in the FabArray.

◆ localindex()

int amrex::FabArrayBase::localindex ( int  K) const
inlinenoexcept

Return local index in the vector of FABs.

◆ nComp()

int amrex::FabArrayBase::nComp ( ) const
inlinenoexcept

Return number of variables (aka components) associated with each point.

◆ nGrow()

int amrex::FabArrayBase::nGrow ( int  direction = 0) const
inlinenoexcept

Return the grow factor that defines the region of definition.

◆ nGrowFilled()

IntVect amrex::FabArrayBase::nGrowFilled ( ) const
inlinenoexcept

Return the halo width currently recorded as up to date.

◆ nGrowVect()

IntVect amrex::FabArrayBase::nGrowVect ( ) const
inlinenoexcept

◆ operator=() [1/2]

FabArrayBase & amrex::FabArrayBase::operator= ( const FabArrayBase rhs)
default

◆ operator=() [2/2]

FabArrayBase & amrex::FabArrayBase::operator= ( FabArrayBase &&  rhs)
default

◆ OwnerShip()

const std::vector< bool > & amrex::FabArrayBase::OwnerShip ( ) const
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.

◆ popRegionTag()

void amrex::FabArrayBase::popRegionTag ( )
static

Pop the most recent region tag. The tag stack must be nonempty.

◆ printMemUsage()

void amrex::FabArrayBase::printMemUsage ( )
static

Print the tracked memory usage table on the current subcommunicator's I/O process.

◆ pushRegionTag() [1/2]

void amrex::FabArrayBase::pushRegionTag ( const char *  t)
static

Push a memory-region tag used to classify subsequent FabArray allocations.

Tags form a process-wide stack, allowing nested regions.

◆ pushRegionTag() [2/2]

void amrex::FabArrayBase::pushRegionTag ( std::string  t)
static

Overload accepting std::string.

◆ queryMemUsage()

Long amrex::FabArrayBase::queryMemUsage ( const std::string &  tag = std::string("All"))
static

Query the currently-live bytes tracked under tag (defaults to the All tag).

◆ queryMemUsageHWM()

Long amrex::FabArrayBase::queryMemUsageHWM ( const std::string &  tag = std::string("All"))
static

Query the recorded high-water mark tracked under tag (defaults to the All tag).

◆ setMultiGhost()

void amrex::FabArrayBase::setMultiGhost ( bool  a_multi_ghost)
inline

Record whether this FabArrayBase participates in multi-ghost exchanges.

For grow widths greater than one, multi-ghost mode includes overlapping ghost-node regions in FillBoundary metadata.

◆ setNGrowFilled()

void amrex::FabArrayBase::setNGrowFilled ( IntVect const &  ng)
inlinenoexcept

Update the bookkeeping on how many ghost cells are known to be valid.

Parameters
ngGrow-vector describing the currently up-to-date halo width.

◆ size()

int amrex::FabArrayBase::size ( ) const
inlinenoexcept

Return the number of FABs in the FabArray.

◆ TheCFinfo()

const FabArrayBase::CFinfo & amrex::FabArrayBase::TheCFinfo ( const FabArrayBase finefa,
const Geometry finegm,
const IntVect ng,
bool  include_periodic,
bool  include_physbndry 
)
static

◆ TheFPinfo()

const FabArrayBase::FPinfo & amrex::FabArrayBase::TheFPinfo ( const FabArrayBase srcfa,
const FabArrayBase dstfa,
const IntVect dstng,
const BoxConverter coarsener,
const Geometry fgeom,
const Geometry cgeom,
const EB2::IndexSpace index_space 
)
static

◆ updateBDKey()

void amrex::FabArrayBase::updateBDKey ( )

Refresh the cached BDKey after rebinding BoxArray or DistributionMapping data.

◆ updateMemUsage()

void amrex::FabArrayBase::updateMemUsage ( std::string const &  tag,
Long  nbytes,
Arena const *  ar 
)
static

Accumulate memory usage statistics for diagnostics.

Parameters
tagSubsystem identifier (e.g., "MultiFab scratch").
nbytesSigned byte change being accounted for.
arReserved for arena-specific accounting; currently unused.

Friends And Related Symbol Documentation

◆ FillBoundary

template<class FAB >
void FillBoundary ( Vector< FabArray< FAB > * > const &  mf,
const Periodicity period 
)
friend

◆ MFIter

friend class MFIter
friend

Member Data Documentation

◆ boxarray

BoxArray amrex::FabArrayBase::boxarray
mutable

◆ comm_tile_size

IntVect amrex::FabArrayBase::comm_tile_size
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.

◆ distributionMap

DistributionMapping amrex::FabArrayBase::distributionMap

◆ indexArray

Vector<int> amrex::FabArrayBase::indexArray

◆ m_alloc_single_chunk

bool amrex::FabArrayBase::m_alloc_single_chunk = false
static

◆ m_BD_count

std::map< FabArrayBase::BDKey, int > amrex::FabArrayBase::m_BD_count
static

Keep track of how many FabArrays are built with the same BDKey.

◆ m_bdkey

BDKey amrex::FabArrayBase::m_bdkey
mutable

◆ m_CFinfo_stats

FabArrayBase::CacheStats amrex::FabArrayBase::m_CFinfo_stats
static

◆ m_CPC_stats

FabArrayBase::CacheStats amrex::FabArrayBase::m_CPC_stats
static

◆ m_FA_stats

FabArrayBase::FabArrayStats amrex::FabArrayBase::m_FA_stats
static

◆ m_FBC_stats

FabArrayBase::CacheStats amrex::FabArrayBase::m_FBC_stats
static

◆ m_FPinfo_stats

FabArrayBase::CacheStats amrex::FabArrayBase::m_FPinfo_stats
static

◆ m_mem_usage

std::map< std::string, FabArrayBase::meminfo > amrex::FabArrayBase::m_mem_usage
static

◆ m_multi_ghost

bool amrex::FabArrayBase::m_multi_ghost = false

◆ m_region_tag

std::vector< std::string > amrex::FabArrayBase::m_region_tag
static

◆ m_TAC_stats

FabArrayBase::CacheStats amrex::FabArrayBase::m_TAC_stats
static

◆ m_TheCPCache

FabArrayBase::CPCache amrex::FabArrayBase::m_TheCPCache
static

◆ m_TheCrseFineCache

FabArrayBase::CFinfoCache amrex::FabArrayBase::m_TheCrseFineCache
static

◆ m_TheFBCache

FabArrayBase::FBCache amrex::FabArrayBase::m_TheFBCache
static

◆ m_TheFillPatchCache

FabArrayBase::FPinfoCache amrex::FabArrayBase::m_TheFillPatchCache
static

◆ m_TheParForCache

std::multimap< FabArrayBase::BDKey, FabArrayBase::ParForInfo * > amrex::FabArrayBase::m_TheParForCache
static

◆ m_ThePolarBCache

FabArrayBase::PolarBCache amrex::FabArrayBase::m_ThePolarBCache
static

◆ m_TheRB180Cache

FabArrayBase::RB180Cache amrex::FabArrayBase::m_TheRB180Cache
static

◆ m_TheRB90Cache

FabArrayBase::RB90Cache amrex::FabArrayBase::m_TheRB90Cache
static

◆ m_TheTileArrayCache

FabArrayBase::TACache amrex::FabArrayBase::m_TheTileArrayCache
static

◆ MaxComp

int amrex::FabArrayBase::MaxComp = 25
static

The maximum number of components to copy() at a time.

◆ mfiter_tile_size

IntVect amrex::FabArrayBase::mfiter_tile_size
static

Default tilesize in MFIter.

◆ n_comp

int amrex::FabArrayBase::n_comp

◆ n_filled

IntVect amrex::FabArrayBase::n_filled

◆ n_grow

IntVect amrex::FabArrayBase::n_grow

◆ ownership

std::vector<bool> amrex::FabArrayBase::ownership

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