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

An array of TagBoxes. More...

#include <AMReX_TagBox.H>

Inheritance diagram for amrex::TagBoxArray:
amrex::FabArray< TagBox > amrex::FabArrayBase

Public Types

using TagType = TagBox::TagType
 The type of each tag.
Public Types inherited from amrex::FabArray< TagBox >
using value_type
using fab_type
Public Types inherited from amrex::FabArrayBase
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

 TagBoxArray (const BoxArray &ba, const DistributionMapping &dm, int _ngrow=0)
 Construct a TagBoxArray on BoxArray ba / DistributionMapping dm with grow vector _ngrow.
 TagBoxArray (const BoxArray &ba, const DistributionMapping &dm, const IntVect &_ngrow)
 ~TagBoxArray ()=default
 TagBoxArray (TagBoxArray &&rhs) noexcept=default
TagBoxArray & operator= (TagBoxArray &&rhs) noexcept=default
 TagBoxArray (const TagBoxArray &rhs)=delete
TagBoxArray & operator= (const TagBoxArray &rhs)=delete
void buffer (const IntVect &nbuf)
 Call TagBox::buffer() on every FAB in the array with grow vector nbuf.
void mapPeriodicRemoveDuplicates (const Geometry &geom)
 Map tags across periodic boundaries and remove duplicates using geom.
void setVal (const BoxArray &ba, TagBox::TagVal val)
 Set all tags inside BoxArray ba to value val.
void coarsen (const IntVect &ratio)
 Calls TagBox::coarsen() on every FAB using ratio ratio.
void coarsenMayOverlap (const IntVect &ratio, bool may_overlap)
 Coarsen tags, allowing overlapping valid regions when may_overlap is true. In that case, mapPeriodicRemoveDuplicates() may add a ghost cell.
void collate (Gpu::PinnedVector< IntVect > &TheGlobalCollateSpace) const
 Calls TagBox::collate() across all FABs, storing indices in TheGlobalCollateSpace.
bool hasTags (Box const &bx) const
 Return true if any cells inside bx are tagged (SET or BUF), false otherwise.
void local_collate_cpu (Gpu::PinnedVector< IntVect > &v) const
void local_collate_gpu (Gpu::PinnedVector< IntVect > &v) const
Public Member Functions inherited from amrex::FabArray< TagBox >
auto get_send_copy_tag_vector (Vector< char * > const &send_data, Vector< std::size_t > const &send_size, Vector< CopyComTagsContainer const * > const &send_cctc, int ncomp, std::uint64_t id) const -> TagVector< CommSendBufTag< value_type > > const *
void pack_send_buffer_gpu (FabArray< TagBox > const &src, int scomp, int ncomp, Vector< char * > const &send_data, Vector< std::size_t > const &send_size, Vector< CopyComTagsContainer const * > const &send_cctc, std::uint64_t id)
auto get_recv_copy_tag_vector (Vector< char * > const &recv_data, Vector< std::size_t > const &recv_size, Vector< CopyComTagsContainer const * > const &recv_cctc, int ncomp, std::uint64_t id) -> TagVector< CommRecvBufTag< value_type > > const *
void unpack_recv_buffer_gpu (FabArray< TagBox > &dst, int dcomp, int ncomp, Vector< char * > const &recv_data, Vector< std::size_t > const &recv_size, Vector< CopyComTagsContainer const * > const &recv_cctc, CpOp op, bool is_thread_safe, std::uint64_t id, bool deterministic)
void pack_send_buffer_cpu (FabArray< TagBox > const &src, int scomp, int ncomp, Vector< char * > const &send_data, Vector< std::size_t > const &send_size, Vector< CopyComTagsContainer const * > const &send_cctc)
void unpack_recv_buffer_cpu (FabArray< TagBox > &dst, int dcomp, int ncomp, Vector< char * > const &recv_data, Vector< std::size_t > const &recv_size, Vector< CopyComTagsContainer const * > const &recv_cctc, CpOp op, bool is_thread_safe)
 FabArray () noexcept
 Constructs an empty FabArray<FAB>.
 ~FabArray ()
 The destructor – deletes all FABs in the array.
FabArray< TagBox > & operator= (FabArray< TagBox > &&rhs) noexcept
void define (const BoxArray &bxs, const DistributionMapping &dm, int nvar, int ngrow, const MFInfo &info=MFInfo(), const FabFactory< TagBox > &factory=DefaultFabFactory< TagBox >())
 Define this FabArray identically to that performed by the constructor having an analogous function signature. This is only valid if this FabArray was defined using the default constructor.
const FabFactory< TagBox > & Factory () const noexcept
 Factory used to create FAB instances for this FabArray.
Arena * arena () const noexcept
 Arena configured for allocations by this FabArray.
const Vector< std::string > & tags () const noexcept
 Memory-usage tags recorded for this FabArray's allocations.
bool hasEBFabFactory () const noexcept
 Return whether this FabArray uses an EBFArrayBoxFactory.
value_type * singleChunkPtr () noexcept
std::size_t singleChunkSize () const noexcept
bool isAllRegular () const noexcept
 Return the EB factory's all-regular status, or true for other factories.
bool ok () const
 Return true if the FabArray is well-defined. That is, the FabArray has a BoxArray and DistributionMapping, the FABs are allocated for each Box in the BoxArray and the sizes of the FABs and the number of components are consistent with the definition of the FabArray.
bool isDefined () const
const TagBox & operator[] (const MFIter &mfi) const noexcept
 Return a constant reference to the FAB associated with mfi.
const TagBox & get (const MFIter &mfi) const noexcept
 Return a constant reference to the FAB associated with mfi.
TagBox & atLocalIdx (int L) noexcept
 Return a reference to the FAB associated with local index L.
TagBox * fabPtr (const MFIter &mfi) noexcept
 Return pointer to FAB.
void prefetchToHost (const MFIter &mfi) const noexcept
 Request that the FAB selected by iterator mfi be prefetched to host memory, where supported.
void prefetchToDevice (const MFIter &mfi) const noexcept
 Request that the FAB selected by iterator mfi be prefetched to device memory, where supported.
Array4< typename FabArray< TagBox >::value_type const > array (const MFIter &mfi) const noexcept
 Read-only Array4 view for the FAB referenced by iterator mfi.
Array4< typename FabArray< TagBox >::value_type const > const_array (const MFIter &mfi) const noexcept
 Synonym for array(const MFIter&) that highlights read-only semantics.
MultiArray4< typename FabArray< TagBox >::value_type > arrays () noexcept
 Build, if needed, and return mutable Array4 views for local FABs.
MultiArray4< typename FabArray< TagBox >::value_type const > const_arrays () const noexcept
 Read-only convenience wrapper equivalent to arrays() const.
void setFab (int boxno, std::unique_ptr< TagBox > elem)
 Explicitly set the Kth FAB in the FabArray to point to elem.
TagBox * release (int K)
 Release ownership of the FAB. This function is not thread safe.
void clear ()
 Releases FAB memory in the FabArray.
void LocalCopy (FabArray< SFAB > const &src, int scomp, int dcomp, int ncomp, IntVect const &nghost)
 Perform local copy of FabArray data.
void LocalAdd (FabArray< TagBox > const &src, int scomp, int dcomp, int ncomp, IntVect const &nghost)
 Perform local addition of FabArray data.
void setVal (value_type val)
 Set all components in the entire region of each FAB to val.
void abs (int comp, int ncomp, int nghost=0)
void plus (value_type val, int comp, int num_comp, int nghost=0)
void mult (value_type val, int comp, int num_comp, int nghost=0)
void invert (value_type numerator, int comp, int num_comp, int nghost=0)
void setBndry (value_type val)
 Set all values in the boundary region to val.
void setDomainBndry (value_type val, const Geometry &geom)
 Set all values outside the Geometry domain described by geom to val.
void capacityOfFabs (LayoutData< Int > &mem) const
 Accumulate the per-FAB allocation sizes.
F::value_type sum (int comp, IntVect const &nghost, bool local=false) const
 Returns the sum of component "comp".
void ParallelAdd (const FabArray< TagBox > &src, const Periodicity &period=Periodicity::NonPeriodic())
 This function copies data from src to this FabArray. Each FAB in fa is intersected with all FABs in this FabArray and a copy is performed on the region of intersection. The intersection is restricted to the valid regions.
void ParallelCopy (const FabArray< TagBox > &src, const Periodicity &period=Periodicity::NonPeriodic(), CpOp op=FabArrayBase::COPY)
void copy (const FabArray< TagBox > &src, const Periodicity &period=Periodicity::NonPeriodic(), CpOp op=FabArrayBase::COPY)
void ParallelAdd_nowait (const FabArray< TagBox > &src, const Periodicity &period=Periodicity::NonPeriodic())
 Start an asynchronous ParallelAdd over all components.
void ParallelCopy_nowait (const FabArray< TagBox > &src, const Periodicity &period=Periodicity::NonPeriodic(), CpOp op=FabArrayBase::COPY)
 Start an asynchronous ParallelCopy that copies every component.
void ParallelCopy_finish ()
 Finish the current nowait ParallelCopy or ParallelAdd operation.
void ParallelCopyToGhost (const FabArray< TagBox > &src, int scomp, int dcomp, int ncomp, const IntVect &snghost, const IntVect &dnghost, const Periodicity &period=Periodicity::NonPeriodic())
 Copy source data to destination ghost cells only.
void ParallelCopyToGhost_nowait (const FabArray< TagBox > &src, int scomp, int dcomp, int ncomp, const IntVect &snghost, const IntVect &dnghost, const Periodicity &period=Periodicity::NonPeriodic())
 Start an asynchronous version of ParallelCopyToGhost().
void ParallelCopyToGhost_finish ()
 Finish the current ParallelCopyToGhost_nowait() operation.
void Redistribute (const FabArray< TagBox > &src, int scomp, int dcomp, int ncomp, const IntVect &nghost)
 Copy from src to this. this and src have the same BoxArray, but different DistributionMapping.
void copyTo (TagBox &dest, int nghost=0) const
 Copy the values contained in the intersection of the valid + nghost region of this FabArray with the FAB dest into dest. Note that FAB dest is assumed to be identical on each process.
void shift (const IntVect &v)
 Shift the boxarray by vector v.
bool defined (int K) const noexcept
void FillBoundary (bool cross=false)
 Copy on intersection within a FabArray.
void FillBoundary_nowait (bool cross=false)
void FillBoundary_finish ()
void FillBoundary_test ()
void FillBoundaryAndSync (const Periodicity &period=Periodicity::NonPeriodic())
 Fill ghost cells and synchronize nodal data.
void FillBoundaryAndSync_nowait (const Periodicity &period=Periodicity::NonPeriodic())
void FillBoundaryAndSync_finish ()
void OverrideSync (const Periodicity &period=Periodicity::NonPeriodic())
 Synchronize nodal data.
void OverrideSync_nowait (const Periodicity &period=Periodicity::NonPeriodic())
 Split-phase version of OverrideSync.
void OverrideSync_finish ()
void SumBoundary (const Periodicity &period=Periodicity::NonPeriodic(), bool deterministic=false)
 Sum values in overlapped cells.
void SumBoundary_nowait (const Periodicity &period=Periodicity::NonPeriodic(), bool deterministic=false)
void SumBoundary_finish ()
void EnforcePeriodicity (const Periodicity &period)
 Fill ghost cells with values from their corresponding cells across periodic boundaries, regardless of whether the corresponding cells are valid.
void BuildMask (const Box &phys_domain, const Periodicity &period, value_type covered, value_type notcovered, value_type physbnd, value_type interior)
void FBEP_nowait (int scomp, int ncomp, const IntVect &nghost, const Periodicity &period, bool cross, bool enforce_periodicity_only=false, bool override_sync=false, IntVect const &sumboundary_src_nghost=IntVect(-1), bool deterministic=false)
void FB_local_copy_cpu (const FB &TheFB, int scomp, int ncomp)
void FB_local_add_cpu (const FB &TheFB, int scomp, int ncomp)
void PC_local_cpu (const CPC &thecpc, FabArray< TagBox > const &src, int scomp, int dcomp, int ncomp, CpOp op)
LayoutData< int > RecvLayoutMask (const CommMetaData &thecmd)
TagVector< Array4CopyTag< value_type > > const * FB_get_local_copy_tag_vector (const FB &TheFB)
void FB_local_copy_gpu (const FB &TheFB, int scomp, int ncomp)
void FB_local_add_gpu (const FB &TheFB, int scomp, int ncomp, bool deterministic)
void PC_local_gpu (const CPC &thecpc, FabArray< TagBox > const &src, int scomp, int dcomp, int ncomp, CpOp op, bool deterministic)
void CMD_local_setVal_gpu (value_type x, const CommMetaData &thecmd, int scomp, int ncomp)
void CMD_remote_setVal_gpu (value_type x, const CommMetaData &thecmd, int scomp, int ncomp)
F::value_type norminf (int comp, int ncomp, IntVect const &nghost, bool local=false, bool ignore_covered=false) const
 Return infinity norm. A NaN counts as infinity.
Public Member Functions inherited from amrex::FabArrayBase
 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)
 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 TileArray * getTileArray (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 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
 Retrieve (and cache) the FillBoundary metadata for the requested halo.
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
 Retrieve (and cache) the ParallelCopy metadata between two FabArrays.
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
 Obtain metadata describing how to launch device ParallelFor over this FabArray.
ParForInfo const & getParForInfo (const IntVect &stride, const IntVect &offset) const
 Obtain metadata for launching device ParallelFor over the valid points whose index equals offset modulo stride.
ParForInfo const & getParForInfoRedBlack () const
 Obtain metadata for a red-black ParallelFor over the valid region.
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

Additional Inherited Members

Static Public Member Functions inherited from amrex::FabArray< TagBox >
static void Saxpy (FabArray< TagBox > &y, value_type a, FabArray< TagBox > const &x, int xcomp, int ycomp, int ncomp, IntVect const &nghost)
 y += a*x
static void Xpay (FabArray< TagBox > &y, value_type a, FabArray< TagBox > const &x, int xcomp, int ycomp, int ncomp, IntVect const &nghost)
 y = x + a*y
static void LinComb (FabArray< TagBox > &dst, value_type a, const FabArray< TagBox > &x, int xcomp, value_type b, const FabArray< TagBox > &y, int ycomp, int dstcomp, int numcomp, const IntVect &nghost)
 dst = a*x + b*y
static void Saxpy_Xpay (FabArray< TagBox > &y, value_type a1, FabArray< TagBox > const &x1, value_type a2, FabArray< TagBox > const &x2, int xcomp, int ycomp, int ncomp, IntVect const &nghost)
 y = x2+a2*(y+a1*x1)
static void Saxpy_Saxpy (FabArray< TagBox > &y1, value_type a1, FabArray< TagBox > const &x1, FabArray< TagBox > &y2, value_type a2, FabArray< TagBox > const &x2, int xcomp, int ycomp, int ncomp, IntVect const &nghost)
 y1 += a1*x1; y2 += a2*x2;
static void Saypy_Saxpy (FabArray< TagBox > &y1, value_type a1, FabArray< TagBox > &y2, value_type a2, FabArray< TagBox > const &x, int xcomp, int ycomp, int ncomp, IntVect const &nghost)
 y1 += a1*y2; y2 += a2*x;
Static Public Member Functions inherited from amrex::FabArrayBase
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 void flushFPinfo (const EB2::IndexSpace *ispace)
 Erase all FillPatch cache entries built with the given EB index space.
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)
 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 inherited from amrex::FabArray< TagBox >
std::unique_ptr< FBData< TagBox > > fbd
std::unique_ptr< PCData< TagBox > > pcd
std::unique_ptr< FabArray< TagBox > > os_temp
Public Attributes inherited from amrex::FabArrayBase
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 inherited from amrex::FabArrayBase
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
Protected Member Functions inherited from amrex::FabArray< TagBox >
void clear_arrays ()
 Free the cached Array4s so that they are rebuilt by the next arrays() call.
bool SharedMemory () const noexcept
Protected Attributes inherited from amrex::FabArray< TagBox >
std::unique_ptr< FabFactory< TagBox > > m_factory
DataAllocator m_dallocator
std::unique_ptr< detail::SingleChunkArena > m_single_chunk_arena
Long m_single_chunk_size
bool define_function_called
 has define() been called?
std::vector< TagBox * > m_fabs_v
 The data.
void * m_dp_arrays
void * m_hp_arrays
MultiArray4< value_type > m_arrays
MultiArray4< value_type const > m_const_arrays
Vector< std::string > m_tags
ShMem shmem

Detailed Description

An array of TagBoxes.

A container class for TagBoxes.

Member Typedef Documentation

◆ TagType

The type of each tag.

Constructor & Destructor Documentation

◆ TagBoxArray() [1/4]

amrex::TagBoxArray::TagBoxArray ( const BoxArray & ba,
const DistributionMapping & dm,
int _ngrow = 0 )

Construct a TagBoxArray on BoxArray ba / DistributionMapping dm with grow vector _ngrow.

◆ TagBoxArray() [2/4]

amrex::TagBoxArray::TagBoxArray ( const BoxArray & ba,
const DistributionMapping & dm,
const IntVect & _ngrow )

◆ ~TagBoxArray()

amrex::TagBoxArray::~TagBoxArray ( )
default

◆ TagBoxArray() [3/4]

amrex::TagBoxArray::TagBoxArray ( TagBoxArray && rhs)
defaultnoexcept

◆ TagBoxArray() [4/4]

amrex::TagBoxArray::TagBoxArray ( const TagBoxArray & rhs)
delete

Member Function Documentation

◆ buffer()

void amrex::TagBoxArray::buffer ( const IntVect & nbuf)

Call TagBox::buffer() on every FAB in the array with grow vector nbuf.

◆ coarsen()

void amrex::TagBoxArray::coarsen ( const IntVect & ratio)

Calls TagBox::coarsen() on every FAB using ratio ratio.

Assumes the coarsened valid regions do not overlap. Use coarsenMayOverlap() to handle grids with overlapping coarsened regions.

Parameters
ratioRefinement ratio to apply when coarsening the tag layout.

◆ coarsenMayOverlap()

void amrex::TagBoxArray::coarsenMayOverlap ( const IntVect & ratio,
bool may_overlap )

Coarsen tags, allowing overlapping valid regions when may_overlap is true. In that case, mapPeriodicRemoveDuplicates() may add a ghost cell.

◆ collate()

void amrex::TagBoxArray::collate ( Gpu::PinnedVector< IntVect > & TheGlobalCollateSpace) const

Calls TagBox::collate() across all FABs, storing indices in TheGlobalCollateSpace.

Parameters
TheGlobalCollateSpaceOutput pinned vector that receives the global list of tag locations.

◆ hasTags()

bool amrex::TagBoxArray::hasTags ( Box const & bx) const

Return true if any cells inside bx are tagged (SET or BUF), false otherwise.

◆ local_collate_cpu()

void amrex::TagBoxArray::local_collate_cpu ( Gpu::PinnedVector< IntVect > & v) const

◆ local_collate_gpu()

void amrex::TagBoxArray::local_collate_gpu ( Gpu::PinnedVector< IntVect > & v) const

◆ mapPeriodicRemoveDuplicates()

void amrex::TagBoxArray::mapPeriodicRemoveDuplicates ( const Geometry & geom)

Map tags across periodic boundaries and remove duplicates using geom.

◆ operator=() [1/2]

TagBoxArray & amrex::TagBoxArray::operator= ( const TagBoxArray & rhs)
delete

◆ operator=() [2/2]

TagBoxArray & amrex::TagBoxArray::operator= ( TagBoxArray && rhs)
defaultnoexcept

◆ setVal()

void amrex::TagBoxArray::setVal ( const BoxArray & ba,
TagBox::TagVal val )

Set all tags inside BoxArray ba to value val.


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