Block-Structured AMR Software Framework
amrex::EBCellFlagFab Class Referencefinal

#include <AMReX_EBCellFlag.H>

Inheritance diagram for amrex::EBCellFlagFab:
amrex::BaseFab< EBCellFlag > amrex::DataAllocator

Classes

struct  NumCells
 

Public Member Functions

 EBCellFlagFab (Arena *ar) noexcept
 
 EBCellFlagFab (const Box &b, int ncomp, Arena *ar)
 
 EBCellFlagFab (const Box &b, int ncomp=1, bool alloc=true, bool shared=false, Arena *ar=nullptr)
 
 EBCellFlagFab (const EBCellFlagFab &rhs, MakeType make_type, int scomp, int ncomp)
 
 EBCellFlagFab ()=default
 
 EBCellFlagFab (EBCellFlagFab &&rhs)=default
 
 ~EBCellFlagFab () override=default
 
 EBCellFlagFab (const EBCellFlagFab &)=delete
 
EBCellFlagFaboperator= (const EBCellFlagFab &)=delete
 
EBCellFlagFaboperator= (EBCellFlagFab &&)=delete
 
FabType getType () const noexcept
 Returns FabType of the whole EBCellFlagFab. More...
 
FabType getType (const Box &bx) const noexcept
 Returns FabType in the given Box of this EBCellFlagFab. More...
 
void resetType (int ng)
 Reset FabType. More...
 
int getNumRegularCells (const Box &bx) const noexcept
 Returns the number of regular cells in the given Box. More...
 
int getNumCutCells (const Box &bx) const noexcept
 Returns the number of cut cells in the given Box. More...
 
int getNumCoveredCells (const Box &bx) const noexcept
 Returns the number of covered cells in the given Box. More...
 
void setType (FabType t) noexcept
 
- Public Member Functions inherited from amrex::BaseFab< EBCellFlag >
 BaseFab () noexcept=default
 Construct an empty BaseFab, which must be resized (see BaseFab::resize) before use. More...
 
 BaseFab (Arena *ar) noexcept
 
 BaseFab (const Box &bx, int n, Arena *ar)
 
 BaseFab (const Box &bx, int n=1, bool alloc=true, bool shared=false, Arena *ar=nullptr)
 Make BaseFab with desired domain (box) and number of components. More...
 
 BaseFab (const BaseFab< EBCellFlag > &rhs, MakeType make_type, int scomp, int ncomp)
 
 BaseFab (const Box &bx, int ncomp, EBCellFlag *p)
 Create an NON-OWNING BaseFab. Thus BaseFab is not responsible for memory management. And it's caller's responsibility that p points to a chunk of memory large enough. More...
 
 BaseFab (const Box &bx, int ncomp, EBCellFlag const *p)
 
 BaseFab (Array4< EBCellFlag > const &a) noexcept
 
 BaseFab (Array4< EBCellFlag > const &a, IndexType t) noexcept
 
 BaseFab (Array4< EBCellFlag const > const &a) noexcept
 
 BaseFab (Array4< EBCellFlag const > const &a, IndexType t) noexcept
 
 BaseFab (const BaseFab< EBCellFlag > &rhs)=delete
 
 BaseFab (BaseFab< EBCellFlag > &&rhs) noexcept
 
virtual ~BaseFab () noexcept
 The destructor deletes the array memory. More...
 
BaseFab< EBCellFlag > & operator= (const BaseFab< EBCellFlag > &rhs)=delete
 
BaseFab< EBCellFlag > & operator= (BaseFab< EBCellFlag > &&rhs) noexcept
 
BaseFaboperator= (EBCellFlag const &) noexcept
 
BaseFab< EBCellFlag > & operator= (EBCellFlag const &t) noexcept
 
void resize (const Box &b, int N=1, Arena *ar=nullptr)
 This function resizes a BaseFab so it covers the Box b with N components. More...
 
Elixir elixir () noexcept
 
void clear () noexcept
 The function returns the BaseFab to the invalid state. The memory is freed. More...
 
std::unique_ptr< EBCellFlag, DataDeleterrelease () noexcept
 Release ownership of memory. More...
 
std::size_t nBytes () const noexcept
 Returns how many bytes used. More...
 
std::size_t nBytes (const Box &bx, int ncomps) const noexcept
 Returns bytes used in the Box for those components. More...
 
std::size_t nBytesOwned () const noexcept
 
int nComp () const noexcept
 Returns the number of components. More...
 
const int * nCompPtr () const noexcept
 for calls to fortran. More...
 
Long numPts () const noexcept
 Returns the number of points. More...
 
Long size () const noexcept
 Returns the total number of points of all components. More...
 
const Boxbox () const noexcept
 Returns the domain (box) where the array is defined. More...
 
IntVect length () const noexcept
 Returns a pointer to an array of SPACEDIM integers giving the length of the domain in each direction. More...
 
const IntVectsmallEnd () const noexcept
 Returns the lower corner of the domain See class Box for analogue. More...
 
const IntVectbigEnd () const noexcept
 Returns the upper corner of the domain. See class Box for analogue. More...
 
const int * loVect () const noexcept
 Returns the lower corner of the domain. More...
 
const int * hiVect () const noexcept
 Returns the upper corner of the domain. More...
 
bool contains (const BaseFab< EBCellFlag > &fab) const noexcept
 Returns true if the domain of fab is totally contained within the domain of this BaseFab. More...
 
bool contains (const Box &bx) const noexcept
 Returns true if bx is totally contained within the domain of this BaseFab. More...
 
EBCellFlagdataPtr (int n=0) noexcept
 Returns a pointer to an object of type T that is the value of the Nth component associated with the cell at the low end of the domain. This is commonly used to get a pointer to data in the array which is then handed off to a Fortran subroutine. Remember that data is stored in Fortran array order, with the component index coming last. In other words, dataPtr returns a pointer to all the Nth components. More...
 
const EBCellFlagdataPtr (int n=0) const noexcept
 Same as above except works on const FABs. More...
 
EBCellFlagdataPtr (const IntVect &p, int n=0) noexcept
 
const EBCellFlagdataPtr (const IntVect &p, int n=0) const noexcept
 
void setPtr (EBCellFlag *p, Long sz) noexcept
 
void prefetchToHost () const noexcept
 
void prefetchToDevice () const noexcept
 
AMREX_FORCE_INLINE Array4< EBCellFlag const > array () const noexcept
 
AMREX_FORCE_INLINE Array4< EBCellFlag const > array (int start_comp) const noexcept
 
AMREX_FORCE_INLINE Array4< EBCellFlag const > array (int start_comp, int num_comps) const noexcept
 
AMREX_FORCE_INLINE Array4< EBCellFlagarray () noexcept
 
AMREX_FORCE_INLINE Array4< EBCellFlagarray (int start_comp) noexcept
 
AMREX_FORCE_INLINE Array4< EBCellFlagarray (int start_comp, int num_comps) noexcept
 
AMREX_FORCE_INLINE Array4< EBCellFlag const > const_array () const noexcept
 
AMREX_FORCE_INLINE Array4< EBCellFlag const > const_array (int start_comp) const noexcept
 
AMREX_FORCE_INLINE Array4< EBCellFlag const > const_array (int start_comp, int num_comps) const noexcept
 
bool isAllocated () const noexcept
 Returns true if the data for the FAB has been allocated. More...
 
EBCellFlagoperator() (const IntVect &p, int N) noexcept
 Returns a reference to the Nth component value defined at position p in the domain. This operator may be inefficient if the C++ compiler is unable to optimize the C++ code. More...
 
EBCellFlagoperator() (const IntVect &p) noexcept
 Same as above, except returns component 0. More...
 
const EBCellFlagoperator() (const IntVect &p, int N) const noexcept
 Same as above except works on const FABs. More...
 
const EBCellFlagoperator() (const IntVect &p) const noexcept
 Same as above, except returns component 0. More...
 
void getVal (EBCellFlag *data, const IntVect &pos, int N, int numcomp) const noexcept
 This function puts numcomp component values, starting at component N, from position pos in the domain into array data, that must be allocated by the user. More...
 
void getVal (EBCellFlag *data, const IntVect &pos) const noexcept
 Same as above, except that starts at component 0 and copies all comps. More...
 
void fill_snan () noexcept
 
void setVal (EBCellFlag const &x, const Box &bx, int dcomp, int ncomp) noexcept
 The setVal functions set sub-regions in the BaseFab to a constant value. This most general form specifies the sub-box, the starting component number, and the number of components to be set. More...
 
void setVal (EBCellFlag const &x, const Box &bx, int N=0) noexcept
 Same as above, except the number of modified components is one. N is the component to be modified. More...
 
void setVal (EBCellFlag const &x, int N) noexcept
 Same as above, except the sub-box defaults to the entire domain. More...
 
void setVal (EBCellFlag const &val) noexcept
 Set value on the whole domain and all components. More...
 
void setVal (EBCellFlag const &x, Box const &bx, DestComp dcomp, NumComps ncomp) noexcept
 Do nothing if bx is empty. More...
 
void setValIfNot (EBCellFlag const &val, const Box &bx, const BaseFab< int > &mask, int nstart, int num) noexcept
 
void setValIfNot (EBCellFlag const &val, const BaseFab< int > &mask) noexcept
 
void setValIfNot (EBCellFlag const &val, Box const &bx, const BaseFab< int > &mask, DestComp dcomp, NumComps ncomp) noexcept
 Do nothing if bx is empty. More...
 
void setComplement (EBCellFlag const &x, const Box &b, int ns, int num) noexcept
 This function is analogous to the fourth form of setVal above, except that instead of setting values on the Box b, values are set on the complement of b in the domain. More...
 
void setComplement (EBCellFlag const &x, Box const &bx, DestComp dcomp, NumComps ncomp) noexcept
 setVal on the complement of bx in the fab's domain More...
 
BaseFab< EBCellFlag > & copy (const BaseFab< EBCellFlag > &src, const Box &srcbox, int srccomp, const Box &destbox, int destcomp, int numcomp) noexcept
 The copy functions copy the contents of one BaseFab into another. The destination BaseFab is always the object which invokes the function. This, the most general form of copy, specifies the contents of any sub-box srcbox in BaseFab src may be copied into a (possibly different) destbox in the destination BaseFab. Note that although the srcbox and the destbox may be disjoint, they must be the same size and shape. If the sizes differ, the copy is undefined and a runtime error results. This copy function is the only one of the copy functions to allow a copy between differing boxes. The user also specifies how many components are copied, starting at component srccomp in src and stored starting at component destcomp. The results are UNDEFINED if the src and dest are the same and the srcbox and destbox overlap. More...
 
BaseFab< EBCellFlag > & copy (const BaseFab< EBCellFlag > &src, int srccomp, int destcomp, int numcomp=1) noexcept
 As above, except the destination Box and the source Box are taken to be the entire domain of the destination. A copy of the intersecting region is performed. class. More...
 
BaseFab< EBCellFlag > & copy (const BaseFab< EBCellFlag > &src, const Box &destbox) noexcept
 As above, except that the destination Box is specified, but the source Box is taken to the equal to the destination Box, and all components of the destination BaseFab are copied. More...
 
BaseFab< EBCellFlag > & copy (const BaseFab< EBCellFlag > &src) noexcept
 
BaseFab< EBCellFlag > & copy (const BaseFab< EBCellFlag > &src, Box bx, SrcComp scomp, DestComp dcomp, NumComps ncomp) noexcept
 Do nothing if bx does not intersect with src fab. More...
 
std::size_t copyToMem (const Box &srcbox, int srccomp, int numcomp, void *dst) const noexcept
 Copy from the srcbox of this Fab to raw memory and return the number of bytes copied. More...
 
std::size_t copyFromMem (const Box &dstbox, int dstcomp, int numcomp, const void *src) noexcept
 Copy from raw memory to the dstbox of this Fab and return the number of bytes copied. More...
 
std::size_t addFromMem (const Box &dstbox, int dstcomp, int numcomp, const void *src) noexcept
 Add from raw memory to the dstbox of this Fab and return the number of bytes copied. More...
 
BaseFab< EBCellFlag > & shift (const IntVect &v) noexcept
 Perform shifts upon the domain of the BaseFab. They are completely analogous to the corresponding Box functions. There is no effect upon the array memory. More...
 
BaseFab< EBCellFlag > & shift (int idir, int n_cell) noexcept
 Perform shifts upon the domain of the BaseFab. They are completely analogous to the corresponding Box functions. There is no effect upon the array memory. More...
 
BaseFab< EBCellFlag > & shiftHalf (int dir, int n_cell) noexcept
 Perform shifts upon the domain of the BaseFab. They are completely analogous to the corresponding Box functions. There is no effect upon the array memory. More...
 
BaseFab< EBCellFlag > & shiftHalf (const IntVect &v) noexcept
 Perform shifts upon the domain of the BaseFab. They are completely analogous to the corresponding Box functions. There is no effect upon the array memory. More...
 
Real norminfmask (const Box &subbox, const BaseFab< int > &mask, int scomp=0, int ncomp=1) const noexcept
 
Real norm (int p, int scomp=0, int numcomp=1) const noexcept
 Compute the Lp-norm of this FAB using components (scomp : scomp+ncomp-1). p < 0 -> ERROR p = 0 -> infinity norm (max norm) p = 1 -> sum of ABS(FAB) More...
 
Real norm (const Box &subbox, int p, int scomp=0, int numcomp=1) const noexcept
 Same as above except only on given subbox. More...
 
void abs () noexcept
 Compute absolute value for all components of this FAB. More...
 
void abs (int comp, int numcomp=1) noexcept
 Same as above except only for components (comp: comp+numcomp-1) More...
 
void abs (const Box &subbox, int comp=0, int numcomp=1) noexcept
 Calculate abs() on subbox for given component range. More...
 
EBCellFlag min (int comp=0) const noexcept
 
EBCellFlag min (const Box &subbox, int comp=0) const noexcept
 
EBCellFlag max (int comp=0) const noexcept
 
EBCellFlag max (const Box &subbox, int comp=0) const noexcept
 
std::pair< EBCellFlag, EBCellFlagminmax (int comp=0) const noexcept
 
std::pair< EBCellFlag, EBCellFlagminmax (const Box &subbox, int comp=0) const noexcept
 
EBCellFlag maxabs (int comp=0) const noexcept
 
EBCellFlag maxabs (const Box &subbox, int comp=0) const noexcept
 
IntVect indexFromValue (const Box &subbox, int comp, EBCellFlag const &value) const noexcept
 
IntVect minIndex (int comp=0) const noexcept
 
IntVect minIndex (const Box &subbox, int comp=0) const noexcept
 
void minIndex (const Box &subbox, Real &min_val, IntVect &min_idx, int comp=0) const noexcept
 
IntVect maxIndex (int comp=0) const noexcept
 
IntVect maxIndex (const Box &subbox, int comp=0) const noexcept
 
void maxIndex (const Box &subbox, Real &max_value, IntVect &max_idx, int comp=0) const noexcept
 
int maskLT (BaseFab< int > &mask, EBCellFlag const &val, int comp=0) const noexcept
 Compute mask array with value of 1 in cells where BaseFab has value less than val, 0 otherwise. mask is resized by this function. The number of cells marked with 1 returned. More...
 
int maskLE (BaseFab< int > &mask, EBCellFlag const &val, int comp=0) const noexcept
 Same as above except mark cells with value less than or equal to val. More...
 
int maskEQ (BaseFab< int > &mask, EBCellFlag const &val, int comp=0) const noexcept
 Same as above except mark cells with value equal to val. More...
 
int maskGT (BaseFab< int > &mask, EBCellFlag const &val, int comp=0) const noexcept
 Same as above except mark cells with value greater than val. More...
 
int maskGE (BaseFab< int > &mask, EBCellFlag const &val, int comp=0) const noexcept
 Same as above except mark cells with value greater than or equal to val. More...
 
EBCellFlag sum (int comp, int numcomp=1) const noexcept
 Returns sum of given component of FAB state vector. More...
 
EBCellFlag sum (const Box &subbox, int comp, int numcomp=1) const noexcept
 Compute sum of given component of FAB state vector in given subbox. More...
 
EBCellFlag sum (const Box &bx, DestComp dcomp, NumComps ncomp) const noexcept
 Sum. More...
 
BaseFab< EBCellFlag > & invert (EBCellFlag const &r, const Box &b, int comp=0, int numcomp=1) noexcept
 Most general version, specify subbox and which components. More...
 
BaseFab< EBCellFlag > & invert (EBCellFlag const &r, int comp, int numcomp=1) noexcept
 As above except on entire domain. More...
 
BaseFab< EBCellFlag > & invert (EBCellFlag const &r) noexcept
 Fab <- Fab/r on the whole domain and all components. More...
 
BaseFab< EBCellFlag > & invert (EBCellFlag const &r, const Box &bx, DestComp dcomp, NumComps ncomp) noexcept
 
BaseFab< EBCellFlag > & negate (const Box &b, int comp=0, int numcomp=1) noexcept
 Negate BaseFab, most general. More...
 
BaseFab< EBCellFlag > & negate (int comp, int numcomp=1) noexcept
 As above, except on entire domain. More...
 
BaseFab< EBCellFlag > & negate () noexcept
 on the whole domain and all components More...
 
BaseFab< EBCellFlag > & negate (const Box &bx, DestComp dcomp, NumComps ncomp) noexcept
 
BaseFab< EBCellFlag > & plus (EBCellFlag const &r, const Box &b, int comp=0, int numcomp=1) noexcept
 Scalar addition (a[i] <- a[i] + r), most general. More...
 
BaseFab< EBCellFlag > & plus (EBCellFlag const &r, int comp, int numcomp=1) noexcept
 As above, except on entire domain. More...
 
BaseFab< EBCellFlag > & plus (const BaseFab< EBCellFlag > &src, int srccomp, int destcomp, int numcomp=1) noexcept
 Add src components (srccomp:srccomp+numcomp-1) to this FABs components (destcomp:destcomp+numcomp-1) where the two FABs intersect. More...
 
BaseFab< EBCellFlag > & plus (const BaseFab< EBCellFlag > &src, const Box &subbox, int srccomp, int destcomp, int numcomp=1) noexcept
 Same as above except addition is restricted to intersection of subbox and src FAB. NOTE: subbox must be contained in this FAB. More...
 
BaseFab< EBCellFlag > & plus (const BaseFab< EBCellFlag > &src, const Box &srcbox, const Box &destbox, int srccomp, int destcomp, int numcomp=1) noexcept
 Add srcbox region of src FAB to destbox region of this FAB. The srcbox and destbox must be same size. More...
 
BaseFab< EBCellFlag > & plus (EBCellFlag const &val) noexcept
 Scalar addition on the whole domain and all components. More...
 
BaseFab< EBCellFlag > & plus (EBCellFlag const &val, Box const &bx, DestComp dcomp, NumComps ncomp) noexcept
 Do nothing if bx is empty. More...
 
BaseFab< EBCellFlag > & plus (const BaseFab< EBCellFlag > &src) noexcept
 
BaseFab< EBCellFlag > & plus (const BaseFab< EBCellFlag > &src, Box bx, SrcComp scomp, DestComp dcomp, NumComps ncomp) noexcept
 Do nothing if bx does not intersect with src fab. More...
 
BaseFab< EBCellFlag > & atomicAdd (const BaseFab< EBCellFlag > &x) noexcept
 Atomic FAB addition (a[i] <- a[i] + b[i]). More...
 
BaseFab< EBCellFlag > & atomicAdd (const BaseFab< EBCellFlag > &src, int srccomp, int destcomp, int numcomp=1) noexcept
 Atomically add src components (srccomp:srccomp+numcomp-1) to this FABs components (destcomp:destcomp+numcomp-1) where the two FABs intersect. More...
 
BaseFab< EBCellFlag > & atomicAdd (const BaseFab< EBCellFlag > &src, const Box &subbox, int srccomp, int destcomp, int numcomp=1) noexcept
 Same as above except addition is restricted to intersection of subbox and src FAB. NOTE: subbox must be contained in this FAB. More...
 
BaseFab< EBCellFlag > & atomicAdd (const BaseFab< EBCellFlag > &src, const Box &srcbox, const Box &destbox, int srccomp, int destcomp, int numcomp=1) noexcept
 Atomically add srcbox region of src FAB to destbox region of this FAB. The srcbox and destbox must be same size. More...
 
BaseFab< EBCellFlag > & lockAdd (const BaseFab< EBCellFlag > &src, const Box &srcbox, const Box &destbox, int srccomp, int destcomp, int numcomp) noexcept
 Atomically add srcbox region of src FAB to destbox region of this FAB. The srcbox and destbox must be same size. When OMP is on, this uses OMP locks in the implementation and it's usually faster than atomicAdd. More...
 
BaseFab< EBCellFlag > & saxpy (EBCellFlag a, const BaseFab< EBCellFlag > &x, const Box &srcbox, const Box &destbox, int srccomp, int destcomp, int numcomp=1) noexcept
 FAB SAXPY (y[i] <- y[i] + a * x[i]), in place. More...
 
BaseFab< EBCellFlag > & saxpy (EBCellFlag a, const BaseFab< EBCellFlag > &x) noexcept
 FAB SAXPY (y[i] <- y[i] + a * x[i]), in place. All components. More...
 
BaseFab< EBCellFlag > & xpay (EBCellFlag a, const BaseFab< EBCellFlag > &x, const Box &srcbox, const Box &destbox, int srccomp, int destcomp, int numcomp=1) noexcept
 FAB XPAY (y[i] <- x[i] + a * y[i]) More...
 
BaseFab< EBCellFlag > & addproduct (const Box &destbox, int destcomp, int numcomp, const BaseFab< EBCellFlag > &src1, int comp1, const BaseFab< EBCellFlag > &src2, int comp2) noexcept
 y[i] <- y[i] + x1[i] * x2[i]) More...
 
BaseFab< EBCellFlag > & minus (const BaseFab< EBCellFlag > &src, int srccomp, int destcomp, int numcomp=1) noexcept
 Subtract src components (srccomp:srccomp+numcomp-1) to this FABs components (destcomp:destcomp+numcomp-1) where the two FABs intersect. More...
 
BaseFab< EBCellFlag > & minus (const BaseFab< EBCellFlag > &src, const Box &subbox, int srccomp, int destcomp, int numcomp=1) noexcept
 Same as above except subtraction is restricted to intersection of subbox and src FAB. NOTE: subbox must be contained in this FAB. More...
 
BaseFab< EBCellFlag > & minus (const BaseFab< EBCellFlag > &src, const Box &srcbox, const Box &destbox, int srccomp, int destcomp, int numcomp=1) noexcept
 Subtract srcbox region of src FAB from destbox region of this FAB. srcbox and destbox must be same size. More...
 
BaseFab< EBCellFlag > & minus (EBCellFlag const &val) noexcept
 Scalar subtraction on the whole domain and all components. More...
 
BaseFab< EBCellFlag > & minus (EBCellFlag const &val, Box const &bx, DestComp dcomp, NumComps ncomp) noexcept
 Do nothing if bx is empty. More...
 
BaseFab< EBCellFlag > & minus (const BaseFab< EBCellFlag > &src) noexcept
 
BaseFab< EBCellFlag > & minus (const BaseFab< EBCellFlag > &src, Box bx, SrcComp scomp, DestComp dcomp, NumComps ncomp) noexcept
 Do nothing if bx does not intersect with src fab. More...
 
BaseFab< EBCellFlag > & mult (EBCellFlag const &r, int comp, int numcomp=1) noexcept
 Scalar multiplication, except control which components are multiplied. More...
 
BaseFab< EBCellFlag > & mult (EBCellFlag const &r, const Box &b, int comp=0, int numcomp=1) noexcept
 As above, except specify sub-box. More...
 
BaseFab< EBCellFlag > & mult (const BaseFab< EBCellFlag > &src, int srccomp, int destcomp, int numcomp=1) noexcept
 Multiply src components (srccomp:srccomp+numcomp-1) with this FABs components (destcomp:destcomp+numcomp-1) where the two FABs intersect. More...
 
BaseFab< EBCellFlag > & mult (const BaseFab< EBCellFlag > &src, const Box &subbox, int srccomp, int destcomp, int numcomp=1) noexcept
 Same as above except multiplication is restricted to intersection of subbox and src FAB. NOTE: subbox must be contained in this FAB. More...
 
BaseFab< EBCellFlag > & mult (const BaseFab< EBCellFlag > &src, const Box &srcbox, const Box &destbox, int srccomp, int destcomp, int numcomp=1) noexcept
 Multiply srcbox region of src FAB with destbox region of this FAB. The srcbox and destbox must be same size. More...
 
BaseFab< EBCellFlag > & mult (EBCellFlag const &val) noexcept
 Scalar multiplication on the whole domain and all components. More...
 
BaseFab< EBCellFlag > & mult (EBCellFlag const &val, Box const &bx, DestComp dcomp, NumComps ncomp) noexcept
 Do nothing if bx is empty. More...
 
BaseFab< EBCellFlag > & mult (const BaseFab< EBCellFlag > &src) noexcept
 
BaseFab< EBCellFlag > & mult (const BaseFab< EBCellFlag > &src, Box bx, SrcComp scomp, DestComp dcomp, NumComps ncomp) noexcept
 Do nothing if bx does not intersect with src fab. More...
 
BaseFab< EBCellFlag > & divide (EBCellFlag const &r, int comp, int numcomp=1) noexcept
 As above except specify which components. More...
 
BaseFab< EBCellFlag > & divide (EBCellFlag const &r, const Box &b, int comp=0, int numcomp=1) noexcept
 As above except specify sub-box. More...
 
BaseFab< EBCellFlag > & divide (const BaseFab< EBCellFlag > &src, int srccomp, int destcomp, int numcomp=1) noexcept
 This FAB is numerator, src FAB is denominator divide src components (srccomp:srccomp+numcomp-1) into this FABs components (destcomp:destcomp+numcomp-1) where the two FABs intersect. More...
 
BaseFab< EBCellFlag > & divide (const BaseFab< EBCellFlag > &src, const Box &subbox, int srccomp, int destcomp, int numcomp=1) noexcept
 Same as above except division is restricted to intersection of subbox and src FAB. NOTE: subbox must be contained in this FAB. More...
 
BaseFab< EBCellFlag > & divide (const BaseFab< EBCellFlag > &src, const Box &srcbox, const Box &destbox, int srccomp, int destcomp, int numcomp=1) noexcept
 destbox region of this FAB is numerator. srcbox regions of src FAB is denominator. srcbox and destbox must be same size. More...
 
BaseFab< EBCellFlag > & divide (EBCellFlag const &val) noexcept
 Scalar division on the whole domain and all components. More...
 
BaseFab< EBCellFlag > & divide (EBCellFlag const &val, Box const &bx, DestComp dcomp, NumComps ncomp) noexcept
 Do nothing if bx is empty. More...
 
BaseFab< EBCellFlag > & divide (const BaseFab< EBCellFlag > &src) noexcept
 
BaseFab< EBCellFlag > & divide (const BaseFab< EBCellFlag > &src, Box bx, SrcComp scomp, DestComp dcomp, NumComps ncomp) noexcept
 Do nothing if bx does not intersect with src fab. More...
 
BaseFab< EBCellFlag > & protected_divide (const BaseFab< EBCellFlag > &src) noexcept
 Divide wherever "src" is "true" or "non-zero". More...
 
BaseFab< EBCellFlag > & protected_divide (const BaseFab< EBCellFlag > &src, int srccomp, int destcomp, int numcomp=1) noexcept
 Divide wherever "src" is "true" or "non-zero". This FAB is numerator, src FAB is denominator divide src components (srccomp:srccomp+numcomp-1) into this FABs components (destcomp:destcomp+numcomp-1) where the two FABs intersect. More...
 
BaseFab< EBCellFlag > & protected_divide (const BaseFab< EBCellFlag > &src, const Box &subbox, int srccomp, int destcomp, int numcomp=1) noexcept
 Divide wherever "src" is "true" or "non-zero". Same as above except division is restricted to intersection of subbox and src FAB. NOTE: subbox must be contained in this FAB. More...
 
BaseFab< EBCellFlag > & protected_divide (const BaseFab< EBCellFlag > &src, const Box &srcbox, const Box &destbox, int srccomp, int destcomp, int numcomp=1) noexcept
 
BaseFab< EBCellFlag > & linInterp (const BaseFab< EBCellFlag > &f1, const Box &b1, int comp1, const BaseFab< EBCellFlag > &f2, const Box &b2, int comp2, Real t1, Real t2, Real t, const Box &b, int comp, int numcomp=1) noexcept
 Linear interpolation / extrapolation. Result is (t2-t)/(t2-t1)*f1 + (t-t1)/(t2-t1)*f2 Data is taken from b1 region of f1, b2 region of f2 and stored in b region of this FAB. Boxes b, b1 and b2 must be the same size. Data is taken from component comp1 of f1, comp2 of f2, and stored in component comp of this FAB. This FAB is returned as a reference for chaining. More...
 
BaseFab< EBCellFlag > & linInterp (const BaseFab< EBCellFlag > &f1, int comp1, const BaseFab< EBCellFlag > &f2, int comp2, Real t1, Real t2, Real t, const Box &b, int comp, int numcomp=1) noexcept
 Version of linInterp() in which b, b1, & b2 are the same. More...
 
BaseFab< EBCellFlag > & linComb (const BaseFab< EBCellFlag > &f1, const Box &b1, int comp1, const BaseFab< EBCellFlag > &f2, const Box &b2, int comp2, Real alpha, Real beta, const Box &b, int comp, int numcomp=1) noexcept
 Linear combination. Result is alpha*f1 + beta*f2. Data is taken from b1 region of f1, b2 region of f2 and stored in b region of this FAB. Boxes b, b1 and b2 must be the same size. Data is taken from component comp1 of f1, comp2 of f2, and stored in component comp of this FAB. This FAB is returned as a reference for chaining. More...
 
EBCellFlag dot (const Box &xbx, int xcomp, const BaseFab< EBCellFlag > &y, const Box &ybx, int ycomp, int numcomp=1) const noexcept
 Dot product of x (i.e.,this) and y. More...
 
EBCellFlag dot (const BaseFab< EBCellFlag > &src, const Box &bx, SrcComp scomp, DestComp dcomp, NumComps ncomp) const noexcept
 Dot product of two Fabs. More...
 
EBCellFlag dot (const Box &bx, int destcomp, int numcomp) const noexcept
 Int wrapper for dot. More...
 
EBCellFlag dot (const Box &bx, DestComp dcomp, NumComps ncomp) const noexcept
 Dot product. More...
 
EBCellFlag dotmask (const BaseFab< int > &mask, const Box &xbx, int xcomp, const BaseFab< EBCellFlag > &y, const Box &ybx, int ycomp, int numcomp) const noexcept
 
EBCellFlag dotmask (const BaseFab< EBCellFlag > &src, const Box &bx, const BaseFab< int > &mask, SrcComp scomp, DestComp dcomp, NumComps ncomp) const noexcept
 Dot product of two Fabs with mask. More...
 
void SetBoxType (const IndexType &typ) noexcept
 Change the Box type without change the length. More...
 
void setValIf (EBCellFlag const &val, const BaseFab< int > &mask) noexcept
 
void setValIf (EBCellFlag const &val, Box const &bx, const BaseFab< int > &mask, DestComp dcomp, NumComps ncomp) noexcept
 Do nothing if bx is empty. More...
 
BaseFab< EBCellFlag > & operator+= (EBCellFlag const &val) noexcept
 
BaseFab< EBCellFlag > & operator+= (const BaseFab< EBCellFlag > &src) noexcept
 
BaseFab< EBCellFlag > & operator-= (EBCellFlag const &val) noexcept
 
BaseFab< EBCellFlag > & operator-= (const BaseFab< EBCellFlag > &src) noexcept
 
BaseFab< EBCellFlag > & operator*= (EBCellFlag const &val) noexcept
 
BaseFab< EBCellFlag > & operator*= (const BaseFab< EBCellFlag > &src) noexcept
 
BaseFab< EBCellFlag > & operator/= (EBCellFlag const &val) noexcept
 
BaseFab< EBCellFlag > & operator/= (const BaseFab< EBCellFlag > &src) noexcept
 
- Public Member Functions inherited from amrex::DataAllocator
 DataAllocator () noexcept=default
 
 DataAllocator (Arena *ar) noexcept
 
void * alloc (std::size_t sz) const noexcept
 
void free (void *pt) const noexcept
 
Arenaarena () const noexcept
 

Private Attributes

FabType m_type = FabType::undefined
 
std::map< Box, NumCellsm_typemap
 

Additional Inherited Members

- Public Types inherited from amrex::BaseFab< EBCellFlag >
using value_type = EBCellFlag
 
- Static Public Member Functions inherited from amrex::BaseFab< EBCellFlag >
static void Initialize ()
 
static void Finalize ()
 
- Public Attributes inherited from amrex::DataAllocator
Arenam_arena = nullptr
 
- Protected Member Functions inherited from amrex::BaseFab< EBCellFlag >
void define ()
 Allocates memory for the BaseFab<T>. More...
 
- Protected Attributes inherited from amrex::BaseFab< EBCellFlag >
EBCellFlagdptr
 The data pointer. More...
 
Box domain
 My index space. More...
 
int nvar
 Number components. More...
 
Long truesize
 nvar*numpts that was allocated on heap. More...
 
bool ptr_owner
 Owner of T*? More...
 
bool shared_memory
 Is the memory allocated in shared memory? More...
 
gpuStream_t alloc_stream
 

Constructor & Destructor Documentation

◆ EBCellFlagFab() [1/7]

amrex::EBCellFlagFab::EBCellFlagFab ( Arena ar)
explicitnoexcept

◆ EBCellFlagFab() [2/7]

amrex::EBCellFlagFab::EBCellFlagFab ( const Box b,
int  ncomp,
Arena ar 
)
explicit

◆ EBCellFlagFab() [3/7]

amrex::EBCellFlagFab::EBCellFlagFab ( const Box b,
int  ncomp = 1,
bool  alloc = true,
bool  shared = false,
Arena ar = nullptr 
)
explicit

◆ EBCellFlagFab() [4/7]

amrex::EBCellFlagFab::EBCellFlagFab ( const EBCellFlagFab rhs,
MakeType  make_type,
int  scomp,
int  ncomp 
)

◆ EBCellFlagFab() [5/7]

amrex::EBCellFlagFab::EBCellFlagFab ( )
default

◆ EBCellFlagFab() [6/7]

amrex::EBCellFlagFab::EBCellFlagFab ( EBCellFlagFab &&  rhs)
default

◆ ~EBCellFlagFab()

amrex::EBCellFlagFab::~EBCellFlagFab ( )
overridedefault

◆ EBCellFlagFab() [7/7]

amrex::EBCellFlagFab::EBCellFlagFab ( const EBCellFlagFab )
delete

Member Function Documentation

◆ getNumCoveredCells()

int amrex::EBCellFlagFab::getNumCoveredCells ( const Box bx) const
noexcept

Returns the number of covered cells in the given Box.

◆ getNumCutCells()

int amrex::EBCellFlagFab::getNumCutCells ( const Box bx) const
noexcept

Returns the number of cut cells in the given Box.

◆ getNumRegularCells()

int amrex::EBCellFlagFab::getNumRegularCells ( const Box bx) const
noexcept

Returns the number of regular cells in the given Box.

◆ getType() [1/2]

FabType amrex::EBCellFlagFab::getType ( ) const
inlinenoexcept

Returns FabType of the whole EBCellFlagFab.

◆ getType() [2/2]

FabType amrex::EBCellFlagFab::getType ( const Box bx) const
noexcept

Returns FabType in the given Box of this EBCellFlagFab.

◆ operator=() [1/2]

EBCellFlagFab& amrex::EBCellFlagFab::operator= ( const EBCellFlagFab )
delete

◆ operator=() [2/2]

EBCellFlagFab& amrex::EBCellFlagFab::operator= ( EBCellFlagFab &&  )
delete

◆ resetType()

void amrex::EBCellFlagFab::resetType ( int  ng)

Reset FabType.

◆ setType()

void amrex::EBCellFlagFab::setType ( FabType  t)
inlinenoexcept

Member Data Documentation

◆ m_type

FabType amrex::EBCellFlagFab::m_type = FabType::undefined
private

◆ m_typemap

std::map<Box,NumCells> amrex::EBCellFlagFab::m_typemap
mutableprivate

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