#include <FArrayBox.H>
Inheritance diagram for FArrayBox:
Public Methods | |
FArrayBox () | |
FArrayBox (const Box &a_box, int a_ncomp, Real *a_alias=NULL) | |
FArrayBox (const Interval &a_comps, FArrayBox &a_original) | |
void | define (const Box &a_box, int a_ncomp, Real *a_alias=NULL) |
virtual | ~FArrayBox () |
void | define (const Interval &a_comps, FArrayBox &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. | |
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 |
FArrayBox & | invert (Real a_r) |
FArrayBox & | invert (Real a_r, int a_comp, int a_numcomp=1) |
FArrayBox & | invert (Real a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1) |
FArrayBox & | negate (const Box &a_subbox, int a_comp=0, int a_numcomp=1) |
FArrayBox & | negate (int a_comp, int a_numcomp=1) |
FArrayBox & | negate () |
FArrayBox & | plus (Real a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1) |
FArrayBox & | plus (Real a_r, int a_comp, int a_numcomp=1) |
FArrayBox & | operator+= (Real a_r) |
FArrayBox & | operator+= (const FArrayBox &a_x) |
FArrayBox & | plus (Real a_r) |
FArrayBox & | plus_real (Real a_r) |
FArrayBox & | plus (const FArrayBox &a_x) |
FArrayBox & | plus (const FArrayBox &a_src, const Real &a_scale) |
FArrayBox & | plus (const FArrayBox &a_src, const Real &a_scale, int a_srccomp, int a_destcomp, int a_numcomp=1) |
FArrayBox & | plus (const FArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1) |
FArrayBox & | plus (const FArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1) |
FArrayBox & | plus (const FArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, int a_srccomp, int a_destcomp, int a_numcomp=1) |
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) |
FArrayBox & | operator-= (Real a_r) |
FArrayBox & | operator-= (const FArrayBox &a_x) |
FArrayBox & | minus (const FArrayBox &a_x) |
FArrayBox & | minus (const FArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1) |
FArrayBox & | minus (const FArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1) |
FArrayBox & | minus (const FArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, int a_srccomp, int a_destcomp, int a_numcomp=1) |
FArrayBox & | operator *= (Real a_r) |
FArrayBox & | mult (Real a_r) |
FArrayBox & | mult (Real a_r, int a_comp, int a_numcomp=1) |
FArrayBox & | mult (Real a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1) |
FArrayBox & | operator *= (const FArrayBox &a_x) |
FArrayBox & | mult (const FArrayBox &a_x) |
FArrayBox & | mult (const FArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1) |
FArrayBox & | mult (const FArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1) |
FArrayBox & | mult (const FArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, int a_srccomp, int a_destcomp, int a_numcomp=1) |
FArrayBox & | operator/= (Real a_r) |
FArrayBox & | divide (Real a_r) |
FArrayBox & | divide (Real a_r, int a_comp, int a_numcomp=1) |
FArrayBox & | divide (Real a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1) |
FArrayBox & | operator/= (const FArrayBox &a_x) |
FArrayBox & | divide (const FArrayBox &a_x) |
FArrayBox & | divide (const FArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1) |
FArrayBox & | divide (const FArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1) |
FArrayBox & | divide (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) |
Protected Methods | |
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) |
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.
|
Constructs an invalid FArrayBox with no memory. |
|
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. |
|
Construct an aliaed FArrayBox. See BaseFab class for details. |
|
The (virtual) destructor. |
|
Constructs FArrayBox by reading it from istream. |
|
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. |
|
Modifies this FArrayBox by replacing each value with its absolute value, for components (a_comp : a_comp+a_numcomp-1). |
|
Modifies this FArrayBox by replacing each value with its absolute value. |
|
|
|
Make BaseFab with desired domain and number of components. Existing data is lost. Data is in uninialized state. Reimplemented from BaseFab< Real >. |
|
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. |
|
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. |
|
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. |
|
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. |
|
Modifies this FArrayBox by dividing all values by the scalar Real a_r. For given range of components and within given a_subbox. |
|
Modifies this FArrayBox by dividing all values by the scalar Real a_r. For given range of components. |
|
Modifies this FArrayBox by dividing all values by the scalar Real a_r. |
|
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. |
|
|
|
Modifies this FArrayBox by replacing each value x with a_r/x. For given range of components and within given a_subbox. |
|
Modifies this FArrayBox by replacing each value x with a_r/x. For given range of components. |
|
Modifies this FArrayBox by replacing each value x with a_r/x. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
Returns the maximum value of given component of this FArrayBox in given a_subbox. |
|
Returns the maximum value of given component of this FArrayBox. |
|
Returns location of maximum value in given component of this FArrayBox in given a_subbox. |
|
Returns location of maximum value in given component of this FArrayBox. |
|
Returns the minimum value of given component of this FArrayBox in given a_subbox. |
|
Returns the minimum value of given component of this FArrayBox. |
|
Returns location of minimum value in given component of this FArrayBox in given a_subbox. |
|
Finds location of minimum value in given component of this FArrayBox. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
Modifies this FArrayBox by multiplying all values by the scalar Real a_r. For given range of components and within given a_subbox. |
|
Modifies this FArrayBox by multiplying all values by the scalar Real a_r. For given range of components. |
|
Modifies this FArrayBox by multiplying all values by the scalar Real a_r. |
|
Modifies this FArrayBox by replacing each value with its additive inverse. |
|
Modifies this FArrayBox by replacing each value with its additive inverse. For given range of components. |
|
Modifies this FArrayBox by replacing each value with its additive inverse. For given range of components and within given a_subbox. |
|
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 |
|
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 |
|
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. |
|
Modifies this FArrayBox by multiplying all values by the scalar Real a_r. |
|
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. |
|
Modifies this FArrayBox by adding the scalar Real a_r to all values. |
|
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. |
|
Modifies this FArrayBox by subtracting the scalar Real a_r to all values. Note: use plus(-a_r) for more general operations. |
|
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. |
|
Modifies this FArrayBox by dividing all values by the scalar Real a_r. |
|
Reimplemented from BaseFab< Real >. |
|
|
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
Modifies this FArrayBox by adding the scalar Real a_r to all values. |
|
Modifies this FArrayBox by adding the scalar Real a_r to all values. For given range of components. |
|
Modifies this FArrayBox by adding the scalar Real a_r to all values. For given range of components and within given a_subbox. |
|
|
|
|
|
Returns sum of component of this FArrayBox in given a_subbox. |
|
Returns sum of given component of FArrayBox. |
|
Returns sum of pow(fab[i,c],p): i in a_subbox, a_comp <= c < a_comp+a_numcomp, a_p >= 2 only |