#include <FArrayBox.H>
Inheritance diagram for FArrayBox:
Public Member Functions | |
FArrayBox () | |
FArrayBox (const Box &b, int ncomp, Real *alias=NULL) | |
void | define (const Box &b, int ncomp, Real *alias=NULL) |
FArrayBox (const Interval &a_comps, FArrayBox &a_original) | |
void | define (const Interval &a_comps, FArrayBox &a_original) |
FArrayBox (std::istream &is) | |
virtual | ~FArrayBox () |
virtual Real | norm (int p=2, int comp=0, int numcomp=1) const |
virtual Real | norm (const Box &subbox, int p=2, int comp=0, int numcomp=1) const |
virtual Real | sumPow (const Box &subbox, int p=2, int comp=0, int numcomp=1) const |
Real | dotProduct (const FArrayBox &fab2) const |
Return the dot product of this FArrayBox with another. | |
Real | min (int comp=0) const |
Real | min (const Box &subbox, int comp=0) const |
Real | max (int comp=0) const |
Real | max (const Box &subbox, int comp=0) const |
IntVect | minIndex (int comp=0) const |
IntVect | minIndex (const Box &subbox, int comp=0) const |
IntVect | maxIndex (int comp=0) const |
IntVect | maxIndex (const Box &subbox, int comp=0) const |
int | maskLT (BaseFab< int > &mask, Real val, int comp=0) const |
int | maskLE (BaseFab< int > &mask, Real val, int comp=0) const |
int | maskEQ (BaseFab< int > &mask, Real val, int comp=0) const |
int | maskGT (BaseFab< int > &mask, Real val, int comp=0) const |
int | maskGE (BaseFab< int > &mask, Real val, int comp=0) const |
void | abs () |
void | abs (int comp, int numcomp=1) |
void | abs (const Box &subbox, int comp=0, int numcomp=1) |
Real | sum (int comp, int numcomp=1) const |
Real | sum (const Box &subbox, int comp, int numcomp=1) const |
FArrayBox & | invert (Real v) |
FArrayBox & | invert (Real v, const Box &subbox, int comp=0, int numcomp=1) |
FArrayBox & | invert (Real v, int comp, int numcomp=1) |
FArrayBox & | negate (const Box &subbox, int comp=0, int numcomp=1) |
FArrayBox & | negate (int comp, int numcomp=1) |
FArrayBox & | negate () |
FArrayBox & | plus (Real r, const Box &b, int comp=0, int numcomp=1) |
FArrayBox & | plus (Real r, int comp, int numcomp=1) |
FArrayBox & | operator+= (Real r) |
FArrayBox & | operator+= (const FArrayBox &f) |
FArrayBox & | plus (const FArrayBox &src) |
FArrayBox & | plus (Real r) |
FArrayBox & | plus_real (Real r) |
FArrayBox & | plus (const FArrayBox &src, const Real &scale) |
FArrayBox & | plus (const FArrayBox &src, const Real &scale, int srccomp, int destcomp, int numcomp=1) |
FArrayBox & | plus (const FArrayBox &src, int srccomp, int destcomp, int numcomp=1) |
FArrayBox & | plus (const FArrayBox &src, const Box &subbox, int srccomp, int destcomp, int numcomp=1) |
FArrayBox & | plus (const FArrayBox &src, const Box &srcbox, const Box &destbox, int srccomp, int destcomp, int numcomp=1) |
FArrayBox & | plus (const FArrayBox &src, const Box &srcbox, const Box &destbox, const Real &scale, int srccomp, int destcomp, int numcomp=1) |
FArrayBox & | operator-= (Real r) |
FArrayBox & | operator-= (const FArrayBox &f) |
FArrayBox & | minus (const FArrayBox &src) |
FArrayBox & | minus (const FArrayBox &src, int srccomp, int destcomp, int numcomp=1) |
FArrayBox & | minus (const FArrayBox &src, const Box &subbox, int srccomp, int destcomp, int numcomp=1) |
FArrayBox & | minus (const FArrayBox &src, const Box &srcbox, const Box &destbox, int srccomp, int destcomp, int numcomp=1) |
FArrayBox & | operator *= (Real r) |
FArrayBox & | mult (Real r) |
FArrayBox & | mult (Real r, int comp, int numcomp=1) |
FArrayBox & | mult (Real r, const Box &b, int comp=0, int numcomp=1) |
FArrayBox & | operator *= (const FArrayBox &f) |
FArrayBox & | mult (const FArrayBox &src) |
FArrayBox & | mult (const FArrayBox &src, int srccomp, int destcomp, int numcomp=1) |
FArrayBox & | mult (const FArrayBox &src, const Box &subbox, int srccomp, int destcomp, int numcomp=1) |
FArrayBox & | mult (const FArrayBox &src, const Box &srcbox, const Box &destbox, int srccomp, int destcomp, int numcomp=1) |
FArrayBox & | operator/= (Real r) |
FArrayBox & | divide (Real r) |
FArrayBox & | divide (Real r, int comp, int numcomp=1) |
FArrayBox & | divide (Real r, const Box &b, int comp=0, int numcomp=1) |
FArrayBox & | operator/= (const FArrayBox &src) |
FArrayBox & | divide (const FArrayBox &src) |
FArrayBox & | divide (const FArrayBox &src, int srccomp, int destcomp, int numcomp=1) |
FArrayBox & | divide (const FArrayBox &src, const Box &subbox, int srccomp, int destcomp, int numcomp=1) |
FArrayBox & | divide (const FArrayBox &src, const Box &srcbox, const Box &destbox, int srccomp, int destcomp, int numcomp=1) |
Real | get (const IntVect &iv, int comp) const |
void | set (const IntVect &iv, int comp, Real val) |
Protected Member Functions | |
virtual void | performCopy (const BaseFab< Real > &src, const Box &srcbox, int srccomp, const Box &destbox, int destcomp, int 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' must be defined to use this class. The internal precision of FArrayBox objects is set by defining either `CH' or `CH'
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. ncomp is the number of components (variables) at each data point in the Box. |
|
Construct an aliaed FArrayBox. See BaseFab class for details. |
|
Constructs FArrayBox by reading it from istream. |
|
The (virtual) destructor. |
|
Modifies this FArrayBox by replacing eahc value with its absolute value, for components (comp: comp+numcomp-1) and within the subbox. |
|
Modifies this FArrayBox by replacing eahc value with its absolute value, for components (comp: comp+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 (destcomp:destcomp+numcomp-1) in the Box destbox by src's components (srccomp:srccomp+numcomp-1) in the Box srcbox. Corresponding locations within the two FArrayBoxes are indexed relative to srcbox and destbox, and will in general not be the same. The srcbox and destbox must be same size. The results are UNDEFINED if the src and dest FArrayBoxes are the same and the srcbox and destbox overlap. |
|
: Modifies this FArrayBox by pointwise division by values in the argument FArrayBox. Divides this FArrayBox's components (destcomp:destcomp+numcomp-1) by src's components (srccomp:srccomp+numcomp-1) where the domain of this FArrayBox intersects the subbox. NOTE: subbox must be contained in this FAB. |
|
: Modifies this FArrayBox by pointwise division by values in the argument FArrayBox. Divides this FArrayBox's components (destcomp:destcomp+numcomp-1) by src's components (srccomp:srccomp+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 r. For given range of components and within given subbox. |
|
Modifies this FArrayBox by dividing all values by the scalar Real r. For given range of components. |
|
Modifies this FArrayBox by dividing all values by the scalar Real r. |
|
Return the dot product of this FArrayBox with another. Return the dot product of this FArrayBox and "fab2" over their common box and all components. |
|
|
|
Modifies this FArrayBox by replacing each value x with v/x. For given range of components. |
|
Modifies this FArrayBox by replacing each value x with v/x. For given range of components and within given subbox. |
|
Modifies this FArrayBox by replacing each value x with v/x. |
|
Computes mask array with value of 1 in cells where this FArrayBox has value equal to val, 0 otherwise. mask is resized by this function. The number of cells marked with 1 returned. |
|
Computes mask array with value of 1 in cells where this FArrayBox has value greater than or equal to val, 0 otherwise. mask is resized by this function. The number of cells marked with 1 returned. |
|
Computes mask array with value of 1 in cells where this FArrayBox has value greater than val, 0 otherwise. mask is resized by this function. The number of cells marked with 1 returned. |
|
Computes mask array with value of 1 in cells where this FArrayBox has value less than or equal to val, 0 otherwise. mask is resized by this function. The number of cells marked with 1 returned. |
|
Computes mask array with value of 1 in cells where this FArrayBox has value less than val, 0 otherwise. 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 subbox. |
|
Returns the maximum value of given component of this FArrayBox. |
|
: Returns location of maximum value in given component of this FArrayBox in given subbox. |
|
Returns location of maximum value in given component of this FArrayBox. |
|
Returns the minimum value of given component of this FArrayBox in given subbox. |
|
Returns the minimum value of given component of this FArrayBox. |
|
: Returns location of minimum value in given component of this FArrayBox in given 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 src's components (srccomp:srccomp+numcomp-1) in the Box srcbox from this FArrayBox's components (destcomp:destcomp+numcomp-1) in the Box destbox. Corresponding locations within the two FArrayBoxes are indexed relative to srcbox and destbox, and will in general not be the same. The srcbox and destbox must be same size. The results are UNDEFINED if the src and dest FArrayBoxes are the same and the srcbox and destbox overlap. |
|
: Modifies this FArrayBox by pointwise subtraction of values in the argument FArrayBox. Subtracts src's components (srccomp:srccomp+numcomp-1) from this FArrayBox's components (destcomp:destcomp+numcomp-1) where the domain of this FArrayBox intersects the subbox. NOTE: subbox must be contained in this FAB. |
|
: Modifies this FArrayBox by pointwise subtraction of values in the argument FArrayBox. Subtracts src's components (srccomp:srccomp+numcomp-1) from this FArrayBox's components (destcomp:destcomp+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 src's components (srccomp:srccomp+numcomp-1) in the Box srcbox by this FArrayBox's components (destcomp:destcomp+numcomp-1) in the Box destbox. Corresponding locations within the two FArrayBoxes are indexed relative to srcbox and destbox, and will in general not be the same. The srcbox and destbox must be same size. The results are UNDEFINED if the src and dest FArrayBoxes are the same and the srcbox and destbox overlap. |
|
: Modifies this FArrayBox by pointwise multiplication by values in the argument FArrayBox. Multiplies src's components (srccomp:srccomp+numcomp-1) by this FArrayBox's components (destcomp:destcomp+numcomp-1) where the domain of this FArrayBox intersects the subbox. NOTE: subbox must be contained in this FAB. |
|
: Modifies this FArrayBox by pointwise multiplication by values in the argument FArrayBox. Multiplies src's components (srccomp:srccomp+numcomp-1) by this FArrayBox's components (destcomp:destcomp+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 r. For given range of components and within given subbox. |
|
Modifies this FArrayBox by multiplying all values by the scalar Real r. For given range of components. |
|
Modifies this FArrayBox by multiplying all values by the scalar Real 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 subbox. |
|
: Returns the Lp-norm of this FAB using components (comp : comp+numcomp-1) and within the subbox. p < 0 -> ERROR. p = 0 -> infinity norm (max norm). p = 1 -> sum of ABS(FAB) p > 1 -> Lp-norm |
|
: Returns the Lp-norm of this FAB using components (comp : comp+numcomp-1). p < 0 -> ERROR. p = 0 -> infinity norm (max norm). p = 1 -> sum of ABS(FAB) 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 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 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 r to all values. Note: use plus(-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 r. |
|
Reimplemented from BaseFab< Real >. |
|
|
|
: Modifies this FArrayBox by pointwise addition of values in the argument FArrayBox. Adds src's components (srccomp:srccomp+numcomp-1) in the Box srcbox to this FArrayBox's components (destcomp:destcomp+numcomp-1) in the Box destbox. Corresponding locations within the two FArrayBoxes are indexed relative to srcbox and destbox, and will in general not be the same. The srcbox and destbox must be same size. The results are UNDEFINED if the src and dest FArrayBoxes are the same and the srcbox and destbox overlap. |
|
: Modifies this FArrayBox by pointwise addition of values in the argument FArrayBox. Adds src's components (srccomp:srccomp+numcomp-1) to this FArrayBox's components (destcomp:destcomp+numcomp-1) where the domain of this FArrayBox intersects the subbox. NOTE: subbox must be contained in this FAB. |
|
: Modifies this FArrayBox by pointwise addition of values in the argument FArrayBox. Adds src's components (srccomp:srccomp+numcomp-1) to this FArrayBox's components (destcomp:destcomp+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] + scale * 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] + scale * src[i]). Uses domain of the intersection of these two FArrayBoxes. |
|
Modifies this FArrayBox by adding the scalar Real r to all values. |
|
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 r to all values. For given range of components. |
|
Modifies this FArrayBox by adding the scalar Real r to all values. For given range of components and within given subbox. |
|
|
|
|
|
: Returns sum of component of this FArrayBox in given subbox. |
|
Returns sum of given component of FArrayBox. |
|
Returns sum of pow(fab[i,c],p): i in subbox, comp<=c<comp+numcomp p>=2 only |