Chombo + EB
3.2
|
#include <CFArrayBox.H>
Public Member Functions | |
CFArrayBox () | |
CFArrayBox (const Box &a_box, int a_ncomp, Complex *a_alias=NULL) | |
CFArrayBox (const Interval &a_comps, CFArrayBox &a_original) | |
virtual void | define (const Box &a_box, int a_ncomp, Complex *a_alias=NULL) |
virtual | ~CFArrayBox () |
CFArrayBox (CFArrayBox &&a_in)=default | |
CFArrayBox & | operator= (CFArrayBox &&a_in)=default |
virtual void | define (const Interval &a_comps, CFArrayBox &a_original) |
virtual void | define (const Interval &a_comps, BaseFab< Complex > &a_original) |
CFArrayBox (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 Complex | sumPow (const Box &a_subbox, int a_p=2, int a_comp=0, int a_numcomp=1) const |
Complex | dotProduct (const CFArrayBox &a_fab2) const |
Return the dot product of this CFArrayBox with another. More... | |
Complex | dotProduct (const CFArrayBox &a_fab2, const Box &a_box) const |
Return the dot product of this CFArrayBox with another. More... | |
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) |
Complex | sum (int a_comp, int a_numcomp=1) const |
Complex | sum (const Box &a_subbox, int a_comp, int a_numcomp=1) const |
CFArrayBox & | invert (Complex a_r) |
CFArrayBox & | invert (Complex a_r, int a_comp, int a_numcomp=1) |
CFArrayBox & | invert (Complex a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1) |
CFArrayBox & | negate (const Box &a_subbox, int a_comp=0, int a_numcomp=1) |
CFArrayBox & | negate (int a_comp, int a_numcomp=1) |
CFArrayBox & | negate () |
CFArrayBox & | plus (Complex a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1) |
CFArrayBox & | plus (Complex a_r, int a_comp, int a_numcomp=1) |
CFArrayBox & | operator+= (Complex a_r) |
CFArrayBox & | operator+= (const CFArrayBox &a_x) |
CFArrayBox & | plus (Complex a_r) |
CFArrayBox & | plus (const CFArrayBox &a_x) |
CFArrayBox & | plus (const CFArrayBox &a_src, const Complex &a_scale) |
CFArrayBox & | plus (const CFArrayBox &a_src, const Complex &a_scale, int a_srccomp, int a_destcomp, int a_numcomp=1) |
CFArrayBox & | plus (const CFArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1) |
CFArrayBox & | plus (const CFArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1) |
CFArrayBox & | plus (const CFArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, int a_srccomp, int a_destcomp, int a_numcomp=1) |
CFArrayBox & | plus (const CFArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, const Complex &a_scale, int a_srccomp, int a_destcomp, int a_numcomp=1) |
CFArrayBox & | operator-= (Complex a_r) |
CFArrayBox & | operator-= (const CFArrayBox &a_x) |
CFArrayBox & | minus (const CFArrayBox &a_x) |
CFArrayBox & | minus (const CFArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1) |
CFArrayBox & | minus (const CFArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1) |
CFArrayBox & | minus (const CFArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, int a_srccomp, int a_destcomp, int a_numcomp=1) |
CFArrayBox & | operator*= (Complex a_r) |
CFArrayBox & | mult (Complex a_r) |
CFArrayBox & | mult (Complex a_r, int a_comp, int a_numcomp=1) |
CFArrayBox & | mult (Complex a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1) |
CFArrayBox & | operator*= (const CFArrayBox &a_x) |
CFArrayBox & | mult (const CFArrayBox &a_x) |
CFArrayBox & | mult (const CFArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1) |
CFArrayBox & | mult (const CFArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1) |
CFArrayBox & | mult (const CFArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, int a_srccomp, int a_destcomp, int a_numcomp=1) |
CFArrayBox & | mult (const BaseFab< Real > &a_r) |
CFArrayBox & | mult (const BaseFab< Real > &a_r, const Box &a_box) |
CFArrayBox & | operator/= (Complex a_r) |
CFArrayBox & | divide (Complex a_r) |
CFArrayBox & | divide (Complex a_r, int a_comp, int a_numcomp=1) |
CFArrayBox & | divide (Complex a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1) |
CFArrayBox & | operator/= (const CFArrayBox &a_x) |
CFArrayBox & | divide (const CFArrayBox &a_x) |
CFArrayBox & | divide (const CFArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1) |
CFArrayBox & | divide (const CFArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1) |
CFArrayBox & | divide (const CFArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, int a_srccomp, int a_destcomp, int a_numcomp=1) |
Complex | get (const IntVect &a_iv, int a_comp) const |
void | set (const IntVect &a_iv, int a_comp, Complex a_val) |
CFArrayBox & | axby (const CFArrayBox &a_X, const CFArrayBox &a_Y, Complex a_A, Complex a_B) |
Computes a_A * a_X + a_B * a_Y, placing the result in this CFArrayBox. More... | |
CFArrayBox & | axby (const CFArrayBox &a_X, const CFArrayBox &a_Y, Complex a_A, Complex a_B, int a_destComp, int a_xComp, int a_yComp) |
Public Member Functions inherited from BaseFab< Complex > | |
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, Complex *a_alias=NULL) | |
BaseFab (const Interval &a_comps, BaseFab< Complex > &a_original) | |
BaseFab (BaseFab< Complex > &&a_in) noexcept | |
move constructor More... | |
virtual | ~BaseFab () |
void | resize (const Box &a_b, int a_n=1, Complex *a_alias=NULL) |
void | clear () |
int | nComp () const |
{ accessors} More... | |
const Box & | box () const |
IntVect | size () const |
virtual size_t | size (const Box &a_box, const Interval &a_comps) const |
{ linearization functions} More... | |
const IntVect & | smallEnd () const |
const IntVect & | bigEnd () const |
Interval | interval () const |
BaseFab< Complex > & | operator= (BaseFab< Complex > &&) noexcept |
move assignment More... | |
Complex & | operator() (const IntVect &a_p, int a_N) |
Complex & | operator() (const IntVect &a_p) |
const Complex & | operator() (const IntVect &p, int N) const |
const Complex & | operator() (const IntVect &p) const |
void | getVal (Complex *a_data, const IntVect &a_pos, int a_N, int a_numcomp) const |
void | getVal (Complex *a_data, const IntVect &a_pos) const |
const int * | loVect () const |
{ Fortran interface functions} More... | |
const int * | hiVect () const |
const int * | nCompPtr () const |
Complex * | dataPtr (int a_n=0) |
const Complex * | dataPtr (int a_n=0) const |
bool | contains (const BaseFab< Complex > &a_fab) const |
{ comparison functions} More... | |
bool | contains (const Box &a_bx) const |
void | setVal (Complex a_x, const Box &a_bx, int a_nstart, int a_numcomp) |
{ data modification functions} More... | |
void | setVal (Complex a_x, const Box &a_bx, int a_n) |
void | setVal (Complex a_x, int a_n) |
void | setVal (Complex a_x) |
BaseFab< Complex > & | copy (const BaseFab< Complex > &a_src, const Box &a_srcbox, int a_srccomp, const Box &a_destbox, int a_destcomp, int a_numcomp) |
BaseFab< Complex > & | copy (const BaseFab< Complex > &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1) |
BaseFab< Complex > & | copy (const BaseFab< Complex > &a_src, const Box &a_destbox) |
BaseFab< Complex > & | copy (const BaseFab< Complex > &a_src) |
void | copy (const Box &a_RegionFrom, const Interval &a_Cdest, const Box &a_RegionTo, const BaseFab< Complex > &a_src, const Interval &a_Csrc) |
BaseFab< Complex > & | shift (const IntVect &a_v) |
{ domain modification functions} More... | |
BaseFab< Complex > & | shift (int a_idir, int a_ncells) |
BaseFab< Complex > & | shiftHalf (int a_dir, int a_numHalfs) |
BaseFab< Complex > & | shiftHalf (const IntVect &a_v) |
virtual void | linearOut (void *a_buf, const Box &a_R, const Interval &a_comps) const |
void | linearOut (void *a_buf) const |
These functions are required for broadcast & gather. More... | |
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) |
void | linearIn (const void *const a_buf) |
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... | |
int | linearSize (void) const |
void | degenerate (BaseFab< Complex > &a_slice, const SliceSpec &a_sliceSpec) const |
bool | isAliased () const |
bool | isUsable () const |
Protected Member Functions | |
virtual void | performCopy (const BaseFab< Complex > &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< Complex > | |
void | define () |
void | undefine () |
void | performSetVal (Complex a_x, const Box &a_bx, int a_nstart, int a_numcomp) |
Private Member Functions | |
CFArrayBox (const CFArrayBox &) | |
CFArrayBox & | operator= (const CFArrayBox &) |
Additional Inherited Members | |
Static Public Member Functions inherited from BaseFab< Complex > | |
static int | preAllocatable () |
static int | test () |
regression test More... | |
static int | testBoxAndComp () |
regression test More... | |
Static Protected Member Functions inherited from BaseFab< Complex > | |
static std::string | name () |
Protected Attributes inherited from BaseFab< Complex > | |
Box | m_domain |
int | m_nvar |
long | m_numpts |
long | m_truesize |
Complex *__restrict | m_dptr |
bool | m_aliased |
Static Protected Attributes inherited from BaseFab< Complex > | |
static Arena * | s_Arena |
Complex Fortran Array Boxes (generally called CFArrayBoxs) 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.
CFArrayBox is derived from BaseFab<Complex>. CFArrayBox adds additional useful capabilities which make sense for Complex 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 CFArrayBox objects is set by defining either `CH_USE_FLOAT' or `CH_USE_DOUBLE'
This class does NOT provide a copy constructor or assignment operator.
CFArrayBox::CFArrayBox | ( | ) |
Constructs an invalid CFArrayBox with no memory.
CFArrayBox::CFArrayBox | ( | const Box & | a_box, |
int | a_ncomp, | ||
Complex * | a_alias = NULL |
||
) |
Constructs an initial CFArrayBox with the data space allocated but not inititialized. a_ncomp is the number of components (variables) at each data point in the Box.
|
inline |
Construct an aliaed CFArrayBox. See BaseFab class for details.
|
virtual |
Defines CFArrayBox with the data space allocated but not inititialized. a_ncomp is the number of components (variables) at each data point in the Box. The (virtual) destructor.
Referenced by define().
|
default |
|
explicit |
Constructs CFArrayBox by reading it from istream.
|
private |
|
inlinevirtual |
Make BaseFab with desired domain and number of components. Existing data is lost. Data is in uninialized state.
Reimplemented from BaseFab< Complex >.
References CFArrayBox(), BaseFab< T >::define(), operator=(), and ~CFArrayBox().
|
default |
|
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().
|
inlinevirtual |
This is here only to make the Intel compiler stop warning about partial override.
Reimplemented from BaseFab< Complex >.
References abs(), CFArrayBox(), BaseFab< T >::define(), divide(), dotProduct(), invert(), minus(), mult(), negate(), norm(), operator*=(), operator+=(), operator-=(), operator/=(), plus(), sum(), and sumPow().
|
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 absolute value) a_p = 1 -> sum of ABS(FAB) a_p > 1 -> Lp-norm
Referenced by define().
|
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 absolute value) a_p = 1 -> sum of ABS(FAB) a_p > 1 -> Lp-norm
|
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().
Complex CFArrayBox::dotProduct | ( | const CFArrayBox & | a_fab2 | ) | const |
Return the dot product of this CFArrayBox with another.
Return the dot product of this CFArrayBox and "a_fab2" over their common box and all components.
Referenced by define().
Complex CFArrayBox::dotProduct | ( | const CFArrayBox & | a_fab2, |
const Box & | a_box | ||
) | const |
Return the dot product of this CFArrayBox with another.
Return the dot product of this CFArrayBox and "a_fab2" over the a_box box and all components.
void CFArrayBox::abs | ( | ) |
Modifies this CFArrayBox by replacing each value with its absolute value.
Referenced by define().
void CFArrayBox::abs | ( | int | a_comp, |
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by replacing each value with its absolute value, for components (a_comp : a_comp+a_numcomp-1).
void CFArrayBox::abs | ( | const Box & | a_subbox, |
int | a_comp = 0 , |
||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by replacing eahc value with its absolute value, for components (a_comp : a_comp+a_numcomp-1) and within the a_subbox.
Complex CFArrayBox::sum | ( | int | a_comp, |
int | a_numcomp = 1 |
||
) | const |
Returns sum of given component of CFArrayBox.
Referenced by define().
Complex CFArrayBox::sum | ( | const Box & | a_subbox, |
int | a_comp, | ||
int | a_numcomp = 1 |
||
) | const |
Returns sum of component of this CFArrayBox in given a_subbox.
CFArrayBox& CFArrayBox::invert | ( | Complex | a_r | ) |
Modifies this CFArrayBox by replacing each value x with a_r/x.
Referenced by define().
CFArrayBox& CFArrayBox::invert | ( | Complex | a_r, |
int | a_comp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by replacing each value x with a_r/x. For given range of components.
CFArrayBox& CFArrayBox::invert | ( | Complex | a_r, |
const Box & | a_subbox, | ||
int | a_comp = 0 , |
||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by replacing each value x with a_r/x. For given range of components and within given a_subbox.
CFArrayBox& CFArrayBox::negate | ( | const Box & | a_subbox, |
int | a_comp = 0 , |
||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by replacing each value with its additive inverse. For given range of components and within given a_subbox.
CFArrayBox& CFArrayBox::negate | ( | int | a_comp, |
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by replacing each value with its additive inverse. For given range of components.
CFArrayBox& CFArrayBox::negate | ( | ) |
Modifies this CFArrayBox by replacing each value with its additive inverse.
Referenced by define().
CFArrayBox& CFArrayBox::plus | ( | Complex | a_r, |
const Box & | a_subbox, | ||
int | a_comp = 0 , |
||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by adding the scalar Complex a_r to all values. For given range of components and within given a_subbox.
Referenced by define().
CFArrayBox& CFArrayBox::plus | ( | Complex | a_r, |
int | a_comp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by adding the scalar Complex a_r to all values. For given range of components.
CFArrayBox& CFArrayBox::operator+= | ( | Complex | a_r | ) |
Modifies this CFArrayBox by adding the scalar Complex a_r to all values.
Referenced by define().
CFArrayBox& CFArrayBox::operator+= | ( | const CFArrayBox & | a_x | ) |
Modifies this CFArrayBox by pointwise addition of the values of the argument CFArrayBox. You might come to grief if the domains of the CFArrayBoxes don't match.
CFArrayBox& CFArrayBox::plus | ( | Complex | a_r | ) |
Modifies this CFArrayBox by adding the scalar Complex a_r to all values.
CFArrayBox& CFArrayBox::plus | ( | const CFArrayBox & | a_x | ) |
Modifies this CFArrayBox by pointwise addition of the values of the argument CFArrayBox. You might come to grief if the domains of the CFArrayBoxes don't match. The same as += operator.
CFArrayBox& CFArrayBox::plus | ( | const CFArrayBox & | a_src, |
const Complex & | a_scale | ||
) |
Modifies this CFArrayBox by pointwise scaled addition of the argument CFArrayBox (a[i] <- a[i] + a_scale * a_src[i]). Uses domain of the intersection of these two CFArrayBoxes.
CFArrayBox& CFArrayBox::plus | ( | const CFArrayBox & | a_src, |
const Complex & | a_scale, | ||
int | a_srccomp, | ||
int | a_destcomp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by pointwise scaled addition of the argument CFArrayBox (a[i] <- a[i] + a_scale * a_src[i]). Uses domain of the intersection of these two CFArrayBoxes.
CFArrayBox& CFArrayBox::plus | ( | const CFArrayBox & | a_src, |
int | a_srccomp, | ||
int | a_destcomp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by pointwise addition of values in the argument CFArrayBox. Adds src's components (a_srccomp : a_srccomp+a_numcomp-1) to this CFArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) where the domains of the two CFArrayBoxes intersect.
CFArrayBox& CFArrayBox::plus | ( | const CFArrayBox & | a_src, |
const Box & | a_subbox, | ||
int | a_srccomp, | ||
int | a_destcomp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by pointwise addition of values in the argument CFArrayBox. Adds src's components (a_srccomp : a_srccomp+a_numcomp-1) to this CFArrayBox's components (a_destcomp : a_destcomp+numcomp-1) where the domain of this CFArrayBox intersects the a_subbox. NOTE: a_subbox must be contained in this FAB.
CFArrayBox& CFArrayBox::plus | ( | const CFArrayBox & | a_src, |
const Box & | a_srcbox, | ||
const Box & | a_destbox, | ||
int | a_srccomp, | ||
int | a_destcomp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by pointwise addition of values in the argument CFArrayBox. Adds src's components (a_srccomp : a_srccomp+a_numcomp-1) in the Box a_srcbox to this CFArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) in the Box a_destbox. Corresponding locations within the two CFArrayBoxes 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 CFArrayBoxes are the same and the a_srcbox and a_destbox overlap.
CFArrayBox& CFArrayBox::plus | ( | const CFArrayBox & | a_src, |
const Box & | a_srcbox, | ||
const Box & | a_destbox, | ||
const Complex & | a_scale, | ||
int | a_srccomp, | ||
int | a_destcomp, | ||
int | a_numcomp = 1 |
||
) |
CFArrayBox& CFArrayBox::operator-= | ( | Complex | a_r | ) |
Modifies this CFArrayBox by subtracting the scalar Complex a_r to all values. Note: use plus(-a_r) for more general operations.
Referenced by define().
CFArrayBox& CFArrayBox::operator-= | ( | const CFArrayBox & | a_x | ) |
Modifies this CFArrayBox by pointwise subtraction of the values of the argument CFArrayBox. You might come to grief if the domains of the CFArrayBoxes don't match.
CFArrayBox& CFArrayBox::minus | ( | const CFArrayBox & | a_x | ) |
Modifies this CFArrayBox by pointwise subtraction of the values of the argument CFArrayBox. You might come to grief if the domains of the CFArrayBoxes don't match. The same as -= operator.
Referenced by define().
CFArrayBox& CFArrayBox::minus | ( | const CFArrayBox & | a_src, |
int | a_srccomp, | ||
int | a_destcomp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by pointwise subtraction of values in the argument CFArrayBox. Subtracts a_src's components (a_srccomp : a_srccomp+a_numcomp-1) from this CFArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) where the domains of the two CFArrayBoxes intersect.
CFArrayBox& CFArrayBox::minus | ( | const CFArrayBox & | a_src, |
const Box & | a_subbox, | ||
int | a_srccomp, | ||
int | a_destcomp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by pointwise subtraction of values in the argument CFArrayBox. Subtracts a_src's components (a_srccomp : a_srccomp+a_numcomp-1) from this CFArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) where the domain of this CFArrayBox intersects the a_subbox. NOTE: a_subbox must be contained in this FAB.
CFArrayBox& CFArrayBox::minus | ( | const CFArrayBox & | a_src, |
const Box & | a_srcbox, | ||
const Box & | a_destbox, | ||
int | a_srccomp, | ||
int | a_destcomp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by pointwise subtraction of values in the argument CFArrayBox. Subtracts a_src's components (a_srccomp : a_srccomp+a_numcomp-1) in the Box a_srcbox from this CFArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) in the Box a_destbox. Corresponding locations within the two CFArrayBoxes 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 CFArrayBoxes are the same and the a_srcbox and a_destbox overlap.
CFArrayBox& CFArrayBox::operator*= | ( | Complex | a_r | ) |
Modifies this CFArrayBox by multiplying all values by the scalar Complex a_r.
Referenced by define().
CFArrayBox& CFArrayBox::mult | ( | Complex | a_r | ) |
Modifies this CFArrayBox by multiplying all values by the scalar Complex a_r.
Referenced by define().
CFArrayBox& CFArrayBox::mult | ( | Complex | a_r, |
int | a_comp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by multiplying all values by the scalar Complex a_r. For given range of components.
CFArrayBox& CFArrayBox::mult | ( | Complex | a_r, |
const Box & | a_subbox, | ||
int | a_comp = 0 , |
||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by multiplying all values by the scalar Complex a_r. For given range of components and within given a_subbox.
CFArrayBox& CFArrayBox::operator*= | ( | const CFArrayBox & | a_x | ) |
Modifies this CFArrayBox by pointwise multiplication of the values by the argument CFArrayBox. You might come to grief if the domains of the CFArrayBoxes don't match.
CFArrayBox& CFArrayBox::mult | ( | const CFArrayBox & | a_x | ) |
Modifies this CFArrayBox by pointwise multiplication by the values in the argument CFArrayBox. You might come to grief if the domains of the CFArrayBoxes don't match. The same as the *= operator.
CFArrayBox& CFArrayBox::mult | ( | const CFArrayBox & | a_src, |
int | a_srccomp, | ||
int | a_destcomp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by pointwise multiplication by values in the argument CFArrayBox. Multiplies a_src's components (a_srccomp : a_srccomp+a_numcomp-1) by this CFArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) where the domains of the two CFArrayBoxes intersect.
CFArrayBox& CFArrayBox::mult | ( | const CFArrayBox & | a_src, |
const Box & | a_subbox, | ||
int | a_srccomp, | ||
int | a_destcomp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by pointwise multiplication by values in the argument CFArrayBox. Multiplies a_src's components (a_srccomp : a_srccomp+a_numcomp-1) by this CFArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) where the domain of this CFArrayBox intersects the a_subbox. NOTE: a_subbox must be contained in this FAB.
CFArrayBox& CFArrayBox::mult | ( | const CFArrayBox & | a_src, |
const Box & | a_srcbox, | ||
const Box & | a_destbox, | ||
int | a_srccomp, | ||
int | a_destcomp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by pointwise multiplication by values in the argument CFArrayBox. Multiplies a_src's components (a_srccomp : a_srccomp+a_numcomp-1) in the Box a_srcbox by this CFArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) in the Box a_destbox. Corresponding locations within the two CFArrayBoxes 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 CFArrayBoxes are the same and the a_srcbox and a_destbox overlap.
CFArrayBox& CFArrayBox::mult | ( | const BaseFab< Real > & | a_r | ) |
Modify this CFArrayBox by multiplying each element by the Real value in a_r
CFArrayBox& CFArrayBox::mult | ( | const BaseFab< Real > & | a_r, |
const Box & | a_box | ||
) |
Modify this CFArrayBox by multiplying each element by the Real value in a_r in the region defined by a_box
CFArrayBox& CFArrayBox::operator/= | ( | Complex | a_r | ) |
Modifies this CFArrayBox by dividing all values by the scalar Complex a_r.
Referenced by define().
CFArrayBox& CFArrayBox::divide | ( | Complex | a_r | ) |
Modifies this CFArrayBox by dividing all values by the scalar Complex a_r.
Referenced by define().
CFArrayBox& CFArrayBox::divide | ( | Complex | a_r, |
int | a_comp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by dividing all values by the scalar Complex a_r. For given range of components.
CFArrayBox& CFArrayBox::divide | ( | Complex | a_r, |
const Box & | a_subbox, | ||
int | a_comp = 0 , |
||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by dividing all values by the scalar Complex a_r. For given range of components and within given a_subbox.
CFArrayBox& CFArrayBox::operator/= | ( | const CFArrayBox & | a_x | ) |
Modifies this CFArrayBox by pointwise division of the values by the argument CFArrayBox. You might come to grief if the domains of the CFArrayBoxes don't match.
CFArrayBox& CFArrayBox::divide | ( | const CFArrayBox & | a_x | ) |
Modifies this CFArrayBox by pointwise division by the values in the argument CFArrayBox. You might come to grief if the domains of the CFArrayBoxes don't match. The same as the /= operator.
CFArrayBox& CFArrayBox::divide | ( | const CFArrayBox & | a_src, |
int | a_srccomp, | ||
int | a_destcomp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by pointwise division by values in the argument CFArrayBox. Divides this CFArrayBox'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 CFArrayBoxes intersect.
CFArrayBox& CFArrayBox::divide | ( | const CFArrayBox & | a_src, |
const Box & | a_subbox, | ||
int | a_srccomp, | ||
int | a_destcomp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by pointwise division by values in the argument CFArrayBox. Divides this CFArrayBox'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 CFArrayBox intersects the a_subbox. NOTE: a_subbox must be contained in this FAB.
CFArrayBox& CFArrayBox::divide | ( | const CFArrayBox & | a_src, |
const Box & | a_srcbox, | ||
const Box & | a_destbox, | ||
int | a_srccomp, | ||
int | a_destcomp, | ||
int | a_numcomp = 1 |
||
) |
Modifies this CFArrayBox by pointwise division by values in the argument CFArrayBox. Divides this CFArrayBox'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 CFArrayBoxes 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 CFArrayBoxes are the same and the a_srcbox and a_destbox overlap.
|
inline |
References BaseFab< Complex >::operator()().
|
inline |
References axby(), CFArrayBox(), BaseFab< Complex >::operator()(), operator=(), and performCopy().
CFArrayBox& CFArrayBox::axby | ( | const CFArrayBox & | a_X, |
const CFArrayBox & | a_Y, | ||
Complex | a_A, | ||
Complex | a_B | ||
) |
Computes a_A * a_X + a_B * a_Y, placing the result in this CFArrayBox.
Referenced by set().
CFArrayBox& CFArrayBox::axby | ( | const CFArrayBox & | a_X, |
const CFArrayBox & | a_Y, | ||
Complex | a_A, | ||
Complex | 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 CFArrayBox. This version performs this operation only for the given component in each CFArrayBox.
|
protectedvirtual |
Reimplemented from BaseFab< Complex >.
Referenced by set().
|
private |