Chombo + EB  3.0
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
FArrayBox Class Reference

#include <FArrayBox.H>

Inheritance diagram for FArrayBox:
Inheritance graph
[legend]

Public Member Functions

 FArrayBox ()
 
 FArrayBox (const Box &a_box, int a_ncomp, Real *a_alias=NULL)
 
 FArrayBox (const Interval &a_comps, FArrayBox &a_original)
 
virtual void define (const Box &a_box, int a_ncomp, Real *a_alias=NULL)
 
virtual ~FArrayBox ()
 
virtual void define (const Interval &a_comps, FArrayBox &a_original)
 
virtual void define (const Interval &a_comps, BaseFab< Real > &a_original)
 
 FArrayBox (std::istream &a_is)
 
virtual Real norm (const Box &a_subbox, int a_p=2, int a_comp=0, int a_numcomp=1) const
 
virtual Real norm (int a_p=2, int a_comp=0, int a_numcomp=1) const
 
virtual Real sumPow (const Box &a_subbox, int a_p=2, int a_comp=0, int a_numcomp=1) const
 
Real dotProduct (const FArrayBox &a_fab2) const
 Return the dot product of this FArrayBox with another. More...
 
Real dotProduct (const FArrayBox &a_fab2, const Box &a_box) const
 Return the dot product of this FArrayBox with another. More...
 
Real min (int a_comp=0) const
 
Real min (const Box &a_subbox, int a_comp=0) const
 
Real max (int a_comp=0) const
 
Real max (const Box &a_subbox, int a_comp=0) const
 
IntVect minIndex (int a_comp=0) const
 
IntVect minIndex (const Box &a_subbox, int a_comp=0) const
 
IntVect maxIndex (int a_comp=0) const
 
IntVect maxIndex (const Box &a_subbox, int a_comp=0) const
 
int maskLT (BaseFab< int > &a_mask, Real a_val, int a_comp=0) const
 
int maskLE (BaseFab< int > &a_mask, Real a_val, int a_comp=0) const
 
int maskEQ (BaseFab< int > &a_mask, Real a_val, int a_comp=0) const
 
int maskGT (BaseFab< int > &a_mask, Real a_val, int a_comp=0) const
 
int maskGE (BaseFab< int > &a_mask, Real a_val, int a_comp=0) const
 
void abs ()
 
void abs (int a_comp, int a_numcomp=1)
 
void abs (const Box &a_subbox, int a_comp=0, int a_numcomp=1)
 
Real sum (int a_comp, int a_numcomp=1) const
 
Real sum (const Box &a_subbox, int a_comp, int a_numcomp=1) const
 
FArrayBoxinvert (Real a_r)
 
FArrayBoxinvert (Real a_r, int a_comp, int a_numcomp=1)
 
FArrayBoxinvert (Real a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1)
 
FArrayBoxnegate (const Box &a_subbox, int a_comp=0, int a_numcomp=1)
 
FArrayBoxnegate (int a_comp, int a_numcomp=1)
 
FArrayBoxnegate ()
 
FArrayBoxplus (Real a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1)
 
FArrayBoxplus (Real a_r, int a_comp, int a_numcomp=1)
 
FArrayBoxoperator+= (Real a_r)
 
FArrayBoxoperator+= (const FArrayBox &a_x)
 
FArrayBoxplus (Real a_r)
 
FArrayBoxplus_real (Real a_r)
 
FArrayBoxplus (const FArrayBox &a_x)
 
FArrayBoxplus (const FArrayBox &a_src, const Real &a_scale)
 
FArrayBoxplus (const FArrayBox &a_src, const Real &a_scale, int a_srccomp, int a_destcomp, int a_numcomp=1)
 
FArrayBoxplus (const FArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1)
 
FArrayBoxplus (const FArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
 
FArrayBoxplus (const FArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
 
FArrayBoxplus (const FArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, const Real &a_scale, int a_srccomp, int a_destcomp, int a_numcomp=1)
 
FArrayBoxoperator-= (Real a_r)
 
FArrayBoxoperator-= (const FArrayBox &a_x)
 
FArrayBoxminus (const FArrayBox &a_x)
 
FArrayBoxminus (const FArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1)
 
FArrayBoxminus (const FArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
 
FArrayBoxminus (const FArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
 
FArrayBoxoperator*= (Real a_r)
 
FArrayBoxmult (Real a_r)
 
FArrayBoxmult (Real a_r, int a_comp, int a_numcomp=1)
 
FArrayBoxmult (Real a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1)
 
FArrayBoxoperator*= (const FArrayBox &a_x)
 
FArrayBoxmult (const FArrayBox &a_x)
 
FArrayBoxmult (const FArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1)
 
FArrayBoxmult (const FArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
 
FArrayBoxmult (const FArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
 
FArrayBoxoperator/= (Real a_r)
 
FArrayBoxdivide (Real a_r)
 
FArrayBoxdivide (Real a_r, int a_comp, int a_numcomp=1)
 
FArrayBoxdivide (Real a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1)
 
FArrayBoxoperator/= (const FArrayBox &a_x)
 
FArrayBoxdivide (const FArrayBox &a_x)
 
FArrayBoxdivide (const FArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1)
 
FArrayBoxdivide (const FArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
 
FArrayBoxdivide (const FArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
 
Real get (const IntVect &a_iv, int a_comp) const
 
void set (const IntVect &a_iv, int a_comp, Real a_val)
 
FArrayBoxaxby (const FArrayBox &a_X, const FArrayBox &a_Y, Real a_A, Real a_B)
 Computes a_A * a_X + a_B * a_Y, placing the result in this FArrayBox. More...
 
FArrayBoxaxby (const FArrayBox &a_X, const FArrayBox &a_Y, Real a_A, Real a_B, int a_destComp, int a_xComp, int a_yComp)
 
- Public Member Functions inherited from BaseFab< Real >
virtual long offset (const IntVect &a_iv, const int &a_ivar) const
 { constructors, destructor and defines} More...
 
 BaseFab ()
 
 BaseFab (const Box &a_bx, int a_n, Real *a_alias=NULL)
 
 BaseFab (const Interval &a_comps, BaseFab< Real > &a_original)
 
virtual ~BaseFab ()
 
void resize (const Box &a_b, int a_n=1, Real *a_alias=NULL)
 
void clear ()
 
int nComp () const
 { accessors} More...
 
const Boxbox () const
 
IntVect size () const
 
virtual int size (const Box &a_box, const Interval &a_comps) const
 { linearization functions} More...
 
const IntVectsmallEnd () const
 
const IntVectbigEnd () const
 
Interval interval () const
 
Realoperator() (const IntVect &a_p, int a_N)
 
Realoperator() (const IntVect &a_p)
 
const Realoperator() (const IntVect &p, int N) const
 
const Realoperator() (const IntVect &p) const
 
void getVal (Real *a_data, const IntVect &a_pos, int a_N, int a_numcomp) const
 
void getVal (Real *a_data, const IntVect &a_pos) const
 
const int * loVect () const
 { Fortran interface functions} More...
 
const int * hiVect () const
 
const int * nCompPtr () const
 
RealdataPtr (int a_n=0)
 
const RealdataPtr (int a_n=0) const
 
bool contains (const BaseFab< Real > &a_fab) const
 { comparison functions} More...
 
bool contains (const Box &a_bx) const
 
void setVal (Real a_x, const Box &a_bx, int a_nstart, int a_numcomp)
 { data modification functions} More...
 
void setVal (Real a_x, const Box &a_bx, int a_n)
 
void setVal (Real a_x, int a_n)
 
void setVal (Real a_x)
 
BaseFab< Real > & copy (const BaseFab< Real > &a_src, const Box &a_srcbox, int a_srccomp, const Box &a_destbox, int a_destcomp, int a_numcomp)
 
BaseFab< Real > & copy (const BaseFab< Real > &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1)
 
BaseFab< Real > & copy (const BaseFab< Real > &a_src, const Box &a_destbox)
 
BaseFab< Real > & copy (const BaseFab< Real > &a_src)
 
void copy (const Box &a_RegionFrom, const Interval &a_Cdest, const Box &a_RegionTo, const BaseFab< Real > &a_src, const Interval &a_Csrc)
 
BaseFab< Real > & shift (const IntVect &a_v)
 { domain modification functions} More...
 
BaseFab< Real > & shift (int a_idir, int a_ncells)
 
BaseFab< Real > & shiftHalf (int a_dir, int a_numHalfs)
 
BaseFab< Real > & shiftHalf (const IntVect &a_v)
 
virtual void linearOut (void *a_buf, const Box &a_R, const Interval &a_comps) const
 
virtual void * linearOut2 (void *a_buf, const Box &a_R, const Interval &a_comps) const
 Same as linearOut, but returns the current location in the buffer. More...
 
virtual void linearIn (void *a_buf, const Box &a_R, const Interval &a_comps)
 
virtual void * linearIn2 (void *a_buf, const Box &a_R, const Interval &a_comps)
 same as linearIn, but returns the current location in the buffer More...
 
void degenerate (BaseFab< Real > &a_slice, const SliceSpec &a_sliceSpec) const
 
bool isAliased () const
 

Protected Member Functions

virtual void performCopy (const BaseFab< Real > &a_src, const Box &a_srcbox, int a_srccomp, const Box &a_destbox, int a_destcomp, int a_numcomp)
 
- Protected Member Functions inherited from BaseFab< Real >
void define ()
 
void undefine ()
 
void performSetVal (Real a_x, const Box &a_bx, int a_nstart, int a_numcomp)
 

Private Member Functions

 FArrayBox (const FArrayBox &)
 
FArrayBoxoperator= (const FArrayBox &)
 

Additional Inherited Members

- Static Public Member Functions inherited from BaseFab< Real >
static int preAllocatable ()
 
static int test ()
 regression test More...
 
static int testBoxAndComp ()
 regression test More...
 
- Static Protected Member Functions inherited from BaseFab< Real >
static std::string name ()
 
- Protected Attributes inherited from BaseFab< Real >
Box m_domain
 
int m_nvar
 
long m_numpts
 
long m_truesize
 
Realm_dptr
 
bool m_aliased
 
- Static Protected Attributes inherited from BaseFab< Real >
static Arenas_Arena
 

Detailed Description

Fortran Array Boxes (generally called FABs) are objects constructed to interface with arrays in Fortran. Useful operations can be performed upon FABs in C++, and they provide a convenient interface to Fortran when it is necessary to retreat into that language for doing arithmetic operations when performance matters.

FArrayBox is derived from BaseFab<Real>. FArrayBox adds additional useful capabilities which make sense for Real types, such as I/O and L**p norms.

The C pre-processor macro `CH_SPACEDIM' must be defined to use this class. The internal precision of FArrayBox objects is set by defining either `CH_USE_FLOAT' or `CH_USE_DOUBLE'

This class does NOT provide a copy constructor or assignment operator.

Constructor & Destructor Documentation

◆ FArrayBox() [1/5]

FArrayBox::FArrayBox ( )

Constructs an invalid FArrayBox with no memory.

Referenced by define(), and set().

◆ FArrayBox() [2/5]

FArrayBox::FArrayBox ( const Box a_box,
int  a_ncomp,
Real a_alias = NULL 
)

Constructs an initial FArrayBox with the data space allocated but not inititialized. a_ncomp is the number of components (variables) at each data point in the Box.

◆ FArrayBox() [3/5]

FArrayBox::FArrayBox ( const Interval a_comps,
FArrayBox a_original 
)
inline

Construct an aliaed FArrayBox. See BaseFab class for details.

◆ ~FArrayBox()

virtual FArrayBox::~FArrayBox ( )
virtual

The (virtual) destructor.

Referenced by define().

◆ FArrayBox() [4/5]

FArrayBox::FArrayBox ( std::istream &  a_is)
explicit

Constructs FArrayBox by reading it from istream.

◆ FArrayBox() [5/5]

FArrayBox::FArrayBox ( const FArrayBox )
private

Member Function Documentation

◆ define() [1/3]

virtual void FArrayBox::define ( const Box a_box,
int  a_ncomp,
Real a_alias = NULL 
)
inlinevirtual

Defines FArrayBox with the data space allocated but not inititialized. a_ncomp is the number of components (variables) at each data point in the Box.

Reimplemented from BaseFab< Real >.

References BaseFab< Real >::resize(), and ~FArrayBox().

◆ define() [2/3]

virtual void FArrayBox::define ( const Interval a_comps,
FArrayBox a_original 
)
inlinevirtual

Constructs an 'aliased' BaseFab of the requested interval of the argument BaseFab. This BaseFab does not allocate any memory, but sets its data pointer into the memory pointed to by the argument BaseFab. It is the users responsiblity to ensure this aliased BaseFab is not used after the original BaseFab has deleted its data ptr (resize, define(..) called, or destruction, etc.).

This aliased BaseFab will also generate side effects (modifying the values of data in one will modify the other's data).

This aliased BaseFab will have a_comps.size() components, starting at zero.

References BaseFab< T >::define().

◆ define() [3/3]

virtual void FArrayBox::define ( const Interval a_comps,
BaseFab< Real > &  a_original 
)
inlinevirtual

This is here only to make the Intel compiler stop warning about partial override.

Reimplemented from BaseFab< Real >.

References abs(), BaseFab< T >::define(), dotProduct(), FArrayBox(), invert(), maskEQ(), maskGE(), maskGT(), maskLE(), maskLT(), max(), maxIndex(), min(), minIndex(), negate(), norm(), operator+=(), plus(), sum(), and sumPow().

◆ norm() [1/2]

virtual Real FArrayBox::norm ( const Box a_subbox,
int  a_p = 2,
int  a_comp = 0,
int  a_numcomp = 1 
) const
virtual

Returns the Lp-norm of this FAB using components (a_comp : a_comp+a_numcomp-1) and within the a_subbox. a_p < 0 -> ERROR a_p = 0 -> infinity norm (max norm) a_p = 1 -> sum of ABS(FAB) a_p > 1 -> Lp-norm

Referenced by define(), and NodeFArrayBox::norm().

◆ norm() [2/2]

virtual Real FArrayBox::norm ( int  a_p = 2,
int  a_comp = 0,
int  a_numcomp = 1 
) const
virtual

Returns the Lp-norm of this FAB using components (a_comp : a_comp+a_numcomp-1). a_p < 0 -> ERROR a_p = 0 -> infinity norm (max norm) a_p = 1 -> sum of ABS(FAB) a_p > 1 -> Lp-norm

◆ sumPow()

virtual Real FArrayBox::sumPow ( const Box a_subbox,
int  a_p = 2,
int  a_comp = 0,
int  a_numcomp = 1 
) const
virtual

Returns sum of pow(fab[i,c],p): i in a_subbox, a_comp <= c < a_comp+a_numcomp, a_p >= 2 only

Referenced by define(), and NodeFArrayBox::sumPow().

◆ dotProduct() [1/2]

Real FArrayBox::dotProduct ( const FArrayBox a_fab2) const

Return the dot product of this FArrayBox with another.

Return the dot product of this FArrayBox and "a_fab2" over their common box and all components.

Referenced by define(), and NodeFArrayBox::dotProduct().

◆ dotProduct() [2/2]

Real FArrayBox::dotProduct ( const FArrayBox a_fab2,
const Box a_box 
) const

Return the dot product of this FArrayBox with another.

Return the dot product of this FArrayBox and "a_fab2" over the a_box box and all components.

◆ min() [1/2]

Real FArrayBox::min ( int  a_comp = 0) const

Returns the minimum value of given component of this FArrayBox.

Referenced by define(), and NodeFArrayBox::min().

◆ min() [2/2]

Real FArrayBox::min ( const Box a_subbox,
int  a_comp = 0 
) const

Returns the minimum value of given component of this FArrayBox in given a_subbox.

◆ max() [1/2]

Real FArrayBox::max ( int  a_comp = 0) const

Returns the maximum value of given component of this FArrayBox.

Referenced by define(), and NodeFArrayBox::max().

◆ max() [2/2]

Real FArrayBox::max ( const Box a_subbox,
int  a_comp = 0 
) const

Returns the maximum value of given component of this FArrayBox in given a_subbox.

◆ minIndex() [1/2]

IntVect FArrayBox::minIndex ( int  a_comp = 0) const

Finds location of minimum value in given component of this FArrayBox.

Referenced by define(), and NodeFArrayBox::minIndex().

◆ minIndex() [2/2]

IntVect FArrayBox::minIndex ( const Box a_subbox,
int  a_comp = 0 
) const

Returns location of minimum value in given component of this FArrayBox in given a_subbox.

◆ maxIndex() [1/2]

IntVect FArrayBox::maxIndex ( int  a_comp = 0) const

Returns location of maximum value in given component of this FArrayBox.

Referenced by define(), and NodeFArrayBox::maxIndex().

◆ maxIndex() [2/2]

IntVect FArrayBox::maxIndex ( const Box a_subbox,
int  a_comp = 0 
) const

Returns location of maximum value in given component of this FArrayBox in given a_subbox.

◆ maskLT()

int FArrayBox::maskLT ( BaseFab< int > &  a_mask,
Real  a_val,
int  a_comp = 0 
) const

Computes a_mask array with value of 1 in cells where this FArrayBox has value less than a_val, 0 otherwise. a_mask is resized by this function. The number of cells marked with 1 returned.

Referenced by define(), and NodeFArrayBox::maskLT().

◆ maskLE()

int FArrayBox::maskLE ( BaseFab< int > &  a_mask,
Real  a_val,
int  a_comp = 0 
) const

Computes a_mask array with value of 1 in cells where this FArrayBox has value less than or equal to a_val, 0 otherwise. a_mask is resized by this function. The number of cells marked with 1 returned.

Referenced by define(), and NodeFArrayBox::maskLE().

◆ maskEQ()

int FArrayBox::maskEQ ( BaseFab< int > &  a_mask,
Real  a_val,
int  a_comp = 0 
) const

Computes a_mask array with value of 1 in cells where this FArrayBox has value equal to a_val, 0 otherwise. a_mask is resized by this function. The number of cells marked with 1 returned.

Referenced by define(), and NodeFArrayBox::maskEQ().

◆ maskGT()

int FArrayBox::maskGT ( BaseFab< int > &  a_mask,
Real  a_val,
int  a_comp = 0 
) const

Computes a_mask array with value of 1 in cells where this FArrayBox has value greater than a_val, 0 otherwise. a_mask is resized by this function. The number of cells marked with 1 returned.

Referenced by define(), and NodeFArrayBox::maskGT().

◆ maskGE()

int FArrayBox::maskGE ( BaseFab< int > &  a_mask,
Real  a_val,
int  a_comp = 0 
) const

Computes a_mask array with value of 1 in cells where this FArrayBox has value greater than or equal to a_val, 0 otherwise. a_mask is resized by this function. The number of cells marked with 1 returned.

Referenced by define(), and NodeFArrayBox::maskGE().

◆ abs() [1/3]

void FArrayBox::abs ( )

Modifies this FArrayBox by replacing each value with its absolute value.

Referenced by NodeFArrayBox::abs(), and define().

◆ abs() [2/3]

void FArrayBox::abs ( int  a_comp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by replacing each value with its absolute value, for components (a_comp : a_comp+a_numcomp-1).

◆ abs() [3/3]

void FArrayBox::abs ( const Box a_subbox,
int  a_comp = 0,
int  a_numcomp = 1 
)

Modifies this FArrayBox by replacing eahc value with its absolute value, for components (a_comp : a_comp+a_numcomp-1) and within the a_subbox.

◆ sum() [1/2]

Real FArrayBox::sum ( int  a_comp,
int  a_numcomp = 1 
) const

Returns sum of given component of FArrayBox.

Referenced by define(), and NodeFArrayBox::sum().

◆ sum() [2/2]

Real FArrayBox::sum ( const Box a_subbox,
int  a_comp,
int  a_numcomp = 1 
) const

Returns sum of component of this FArrayBox in given a_subbox.

◆ invert() [1/3]

FArrayBox& FArrayBox::invert ( Real  a_r)

Modifies this FArrayBox by replacing each value x with a_r/x.

Referenced by define(), and NodeFArrayBox::invert().

◆ invert() [2/3]

FArrayBox& FArrayBox::invert ( Real  a_r,
int  a_comp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by replacing each value x with a_r/x. For given range of components.

◆ invert() [3/3]

FArrayBox& FArrayBox::invert ( Real  a_r,
const Box a_subbox,
int  a_comp = 0,
int  a_numcomp = 1 
)

Modifies this FArrayBox by replacing each value x with a_r/x. For given range of components and within given a_subbox.

◆ negate() [1/3]

FArrayBox& FArrayBox::negate ( const Box a_subbox,
int  a_comp = 0,
int  a_numcomp = 1 
)

Modifies this FArrayBox by replacing each value with its additive inverse. For given range of components and within given a_subbox.

Referenced by NodeFArrayBox::negate().

◆ negate() [2/3]

FArrayBox& FArrayBox::negate ( int  a_comp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by replacing each value with its additive inverse. For given range of components.

◆ negate() [3/3]

FArrayBox& FArrayBox::negate ( )

Modifies this FArrayBox by replacing each value with its additive inverse.

Referenced by define().

◆ plus() [1/10]

FArrayBox& FArrayBox::plus ( Real  a_r,
const Box a_subbox,
int  a_comp = 0,
int  a_numcomp = 1 
)

Modifies this FArrayBox by adding the scalar Real a_r to all values. For given range of components and within given a_subbox.

Referenced by define(), NodeFArrayBox::plus(), and plus_real().

◆ plus() [2/10]

FArrayBox& FArrayBox::plus ( Real  a_r,
int  a_comp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by adding the scalar Real a_r to all values. For given range of components.

◆ operator+=() [1/2]

FArrayBox& FArrayBox::operator+= ( Real  a_r)

Modifies this FArrayBox by adding the scalar Real a_r to all values.

Referenced by define().

◆ operator+=() [2/2]

FArrayBox& FArrayBox::operator+= ( const FArrayBox a_x)

Modifies this FArrayBox by pointwise addition of the values of the argument FArrayBox. You might come to grief if the domains of the FArrayBoxes don't match.

◆ plus() [3/10]

FArrayBox& FArrayBox::plus ( Real  a_r)

Modifies this FArrayBox by adding the scalar Real a_r to all values.

◆ plus_real()

FArrayBox& FArrayBox::plus_real ( Real  a_r)
inline

◆ plus() [4/10]

FArrayBox& FArrayBox::plus ( const FArrayBox a_x)

Modifies this FArrayBox by pointwise addition of the values of the argument FArrayBox. You might come to grief if the domains of the FArrayBoxes don't match. The same as += operator.

◆ plus() [5/10]

FArrayBox& FArrayBox::plus ( const FArrayBox a_src,
const Real a_scale 
)

Modifies this FArrayBox by pointwise scaled addition of the argument FArrayBox (a[i] <- a[i] + a_scale * a_src[i]). Uses domain of the intersection of these two FArrayBoxes.

◆ plus() [6/10]

FArrayBox& FArrayBox::plus ( const FArrayBox a_src,
const Real a_scale,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by pointwise scaled addition of the argument FArrayBox (a[i] <- a[i] + a_scale * a_src[i]). Uses domain of the intersection of these two FArrayBoxes.

◆ plus() [7/10]

FArrayBox& FArrayBox::plus ( const FArrayBox a_src,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by pointwise addition of values in the argument FArrayBox. Adds src's components (a_srccomp : a_srccomp+a_numcomp-1) to this FArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) where the domains of the two FArrayBoxes intersect.

◆ plus() [8/10]

FArrayBox& FArrayBox::plus ( const FArrayBox a_src,
const Box a_subbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by pointwise addition of values in the argument FArrayBox. Adds src's components (a_srccomp : a_srccomp+a_numcomp-1) to this FArrayBox's components (a_destcomp : a_destcomp+numcomp-1) where the domain of this FArrayBox intersects the a_subbox. NOTE: a_subbox must be contained in this FAB.

◆ plus() [9/10]

FArrayBox& FArrayBox::plus ( const FArrayBox a_src,
const Box a_srcbox,
const Box a_destbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by pointwise addition of values in the argument FArrayBox. Adds src's components (a_srccomp : a_srccomp+a_numcomp-1) in the Box a_srcbox to this FArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) in the Box a_destbox. Corresponding locations within the two FArrayBoxes are indexed relative to a_srcbox and a_destbox, and will in general not be the same. The a_srcbox and a_destbox must be same size. The results are UNDEFINED if the a_src and dest FArrayBoxes are the same and the a_srcbox and a_destbox overlap.

◆ plus() [10/10]

FArrayBox& FArrayBox::plus ( const FArrayBox a_src,
const Box a_srcbox,
const Box a_destbox,
const Real a_scale,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
)

◆ operator-=() [1/2]

FArrayBox& FArrayBox::operator-= ( Real  a_r)

Modifies this FArrayBox by subtracting the scalar Real a_r to all values. Note: use plus(-a_r) for more general operations.

Referenced by plus_real().

◆ operator-=() [2/2]

FArrayBox& FArrayBox::operator-= ( const FArrayBox a_x)

Modifies this FArrayBox by pointwise subtraction of the values of the argument FArrayBox. You might come to grief if the domains of the FArrayBoxes don't match.

◆ minus() [1/4]

FArrayBox& FArrayBox::minus ( const FArrayBox a_x)

Modifies this FArrayBox by pointwise subtraction of the values of the argument FArrayBox. You might come to grief if the domains of the FArrayBoxes don't match. The same as -= operator.

Referenced by NodeFArrayBox::minus(), and plus_real().

◆ minus() [2/4]

FArrayBox& FArrayBox::minus ( const FArrayBox a_src,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by pointwise subtraction of values in the argument FArrayBox. Subtracts a_src's components (a_srccomp : a_srccomp+a_numcomp-1) from this FArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) where the domains of the two FArrayBoxes intersect.

◆ minus() [3/4]

FArrayBox& FArrayBox::minus ( const FArrayBox a_src,
const Box a_subbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by pointwise subtraction of values in the argument FArrayBox. Subtracts a_src's components (a_srccomp : a_srccomp+a_numcomp-1) from this FArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) where the domain of this FArrayBox intersects the a_subbox. NOTE: a_subbox must be contained in this FAB.

◆ minus() [4/4]

FArrayBox& FArrayBox::minus ( const FArrayBox a_src,
const Box a_srcbox,
const Box a_destbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by pointwise subtraction of values in the argument FArrayBox. Subtracts a_src's components (a_srccomp : a_srccomp+a_numcomp-1) in the Box a_srcbox from this FArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) in the Box a_destbox. Corresponding locations within the two FArrayBoxes are indexed relative to a_srcbox and a_destbox, and will in general not be the same. The a_srcbox and a_destbox must be same size. The results are UNDEFINED if the a_src and dest FArrayBoxes are the same and the a_srcbox and a_destbox overlap.

◆ operator*=() [1/2]

FArrayBox& FArrayBox::operator*= ( Real  a_r)

Modifies this FArrayBox by multiplying all values by the scalar Real a_r.

Referenced by plus_real().

◆ mult() [1/7]

FArrayBox& FArrayBox::mult ( Real  a_r)

Modifies this FArrayBox by multiplying all values by the scalar Real a_r.

Referenced by NodeFArrayBox::mult(), and plus_real().

◆ mult() [2/7]

FArrayBox& FArrayBox::mult ( Real  a_r,
int  a_comp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by multiplying all values by the scalar Real a_r. For given range of components.

◆ mult() [3/7]

FArrayBox& FArrayBox::mult ( Real  a_r,
const Box a_subbox,
int  a_comp = 0,
int  a_numcomp = 1 
)

Modifies this FArrayBox by multiplying all values by the scalar Real a_r. For given range of components and within given a_subbox.

◆ operator*=() [2/2]

FArrayBox& FArrayBox::operator*= ( const FArrayBox a_x)

Modifies this FArrayBox by pointwise multiplication of the values by the argument FArrayBox. You might come to grief if the domains of the FArrayBoxes don't match.

◆ mult() [4/7]

FArrayBox& FArrayBox::mult ( const FArrayBox a_x)

Modifies this FArrayBox by pointwise multiplication by the values in the argument FArrayBox. You might come to grief if the domains of the FArrayBoxes don't match. The same as the *= operator.

◆ mult() [5/7]

FArrayBox& FArrayBox::mult ( const FArrayBox a_src,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by pointwise multiplication by values in the argument FArrayBox. Multiplies a_src's components (a_srccomp : a_srccomp+a_numcomp-1) by this FArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) where the domains of the two FArrayBoxes intersect.

◆ mult() [6/7]

FArrayBox& FArrayBox::mult ( const FArrayBox a_src,
const Box a_subbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by pointwise multiplication by values in the argument FArrayBox. Multiplies a_src's components (a_srccomp : a_srccomp+a_numcomp-1) by this FArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) where the domain of this FArrayBox intersects the a_subbox. NOTE: a_subbox must be contained in this FAB.

◆ mult() [7/7]

FArrayBox& FArrayBox::mult ( const FArrayBox a_src,
const Box a_srcbox,
const Box a_destbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by pointwise multiplication by values in the argument FArrayBox. Multiplies a_src's components (a_srccomp : a_srccomp+a_numcomp-1) in the Box a_srcbox by this FArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) in the Box a_destbox. Corresponding locations within the two FArrayBoxes are indexed relative to a_srcbox and a_destbox, and will in general not be the same. The a_srcbox and a_destbox must be same size. The results are UNDEFINED if the a_src and dest FArrayBoxes are the same and the a_srcbox and a_destbox overlap.

◆ operator/=() [1/2]

FArrayBox& FArrayBox::operator/= ( Real  a_r)

Modifies this FArrayBox by dividing all values by the scalar Real a_r.

Referenced by plus_real().

◆ divide() [1/7]

FArrayBox& FArrayBox::divide ( Real  a_r)

Modifies this FArrayBox by dividing all values by the scalar Real a_r.

Referenced by NodeFArrayBox::divide(), and plus_real().

◆ divide() [2/7]

FArrayBox& FArrayBox::divide ( Real  a_r,
int  a_comp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by dividing all values by the scalar Real a_r. For given range of components.

◆ divide() [3/7]

FArrayBox& FArrayBox::divide ( Real  a_r,
const Box a_subbox,
int  a_comp = 0,
int  a_numcomp = 1 
)

Modifies this FArrayBox by dividing all values by the scalar Real a_r. For given range of components and within given a_subbox.

◆ operator/=() [2/2]

FArrayBox& FArrayBox::operator/= ( const FArrayBox a_x)

Modifies this FArrayBox by pointwise division of the values by the argument FArrayBox. You might come to grief if the domains of the FArrayBoxes don't match.

◆ divide() [4/7]

FArrayBox& FArrayBox::divide ( const FArrayBox a_x)

Modifies this FArrayBox by pointwise division by the values in the argument FArrayBox. You might come to grief if the domains of the FArrayBoxes don't match. The same as the /= operator.

◆ divide() [5/7]

FArrayBox& FArrayBox::divide ( const FArrayBox a_src,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by pointwise division by values in the argument FArrayBox. Divides this FArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) by a_src's components (a_srccomp : a_srccomp+a_numcomp-1) where the domains of the two FArrayBoxes intersect.

◆ divide() [6/7]

FArrayBox& FArrayBox::divide ( const FArrayBox a_src,
const Box a_subbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by pointwise division by values in the argument FArrayBox. Divides this FArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) by a_src's components (a_srccomp : a_srccomp+a_numcomp-1) where the domain of this FArrayBox intersects the a_subbox. NOTE: a_subbox must be contained in this FAB.

◆ divide() [7/7]

FArrayBox& FArrayBox::divide ( const FArrayBox a_src,
const Box a_srcbox,
const Box a_destbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
)

Modifies this FArrayBox by pointwise division by values in the argument FArrayBox. Divides this FArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) in the Box a_destbox by a_src's components (a_srccomp : a_srccomp+a_numcomp-1) in the Box a_srcbox. Corresponding locations within the two FArrayBoxes are indexed relative to a_srcbox and a_destbox, and will in general not be the same. The a_srcbox and a_destbox must be same size. The results are UNDEFINED if the a_src and dest FArrayBoxes are the same and the a_srcbox and a_destbox overlap.

◆ get()

Real FArrayBox::get ( const IntVect a_iv,
int  a_comp 
) const
inline

◆ set()

void FArrayBox::set ( const IntVect a_iv,
int  a_comp,
Real  a_val 
)
inline

◆ axby() [1/2]

FArrayBox& FArrayBox::axby ( const FArrayBox a_X,
const FArrayBox a_Y,
Real  a_A,
Real  a_B 
)

Computes a_A * a_X + a_B * a_Y, placing the result in this FArrayBox.

Referenced by set().

◆ axby() [2/2]

FArrayBox& FArrayBox::axby ( const FArrayBox a_X,
const FArrayBox a_Y,
Real  a_A,
Real  a_B,
int  a_destComp,
int  a_xComp,
int  a_yComp 
)

Computes a_A * a_X + a_B * a_Y, placing the result in this FArrayBox. This version performs this operation only for the given component in each FArrayBox.

◆ performCopy()

virtual void FArrayBox::performCopy ( const BaseFab< Real > &  a_src,
const Box a_srcbox,
int  a_srccomp,
const Box a_destbox,
int  a_destcomp,
int  a_numcomp 
)
protectedvirtual

Reimplemented from BaseFab< Real >.

Referenced by set().

◆ operator=()

FArrayBox& FArrayBox::operator= ( const FArrayBox )
private

Referenced by set().


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