NodeFArrayBox Class Reference

#include <NodeFArrayBox.H>

List of all members.


Detailed Description

A wrapper for an FArrayBox to contain NODE-centered data.

This is a class to contain NODE-centered data on a box.
Question: Why not just use NODE-centered FArrayBox?
Answer: We want to use LevelData<NodeFArrayBox>, which requires that the underlying BoxLayout be a DisjointBoxLayout. Adjacent NODE-centered boxes intersect, but adjacent CELL-centered boxes do not.
The underlying DisjointBoxLayout will be CELL-centered.

In a LevelData<NodeFArrayBox>, some of the grids may share nodes. The data on shared nodes must be the same.

Example: A four-grid layout is shown on the left. As shown on the right, the nodes marked "2" are shared by two grids, and those marked "3" are shared by three grids.

:                                   :                                   :
:                +-----+            :                YYYY--+            :
:                |     |            :                |     |            :
:                |  A  |            :                |  A  |            :
:                |     |            :                |     |            :
:            +---+--+--+---+        :            +---2223222---+        :
:            |      |      |        :            |      2      |        :
:            |  B   |  C   |        :            |  B   2  C   |        :
:            |      |      |        :            |      2      |        :
:        +---+------+------+        :        X---22222223------X        :
:        |          |               :        |          |               :
:        |    D     |               :        |    D     |               :
:        |          |               :        |          |               :
:        +----------+               :        +-------YYYY               :
:                                   :                                   :
    
Additional nodes may be shared if the boxes extend to the faces of a domain that is periodic in one or more directions. In the example above, these nodes are marked "X" and "Y".
Horizontally periodic domain: node "X" shared by two grids, C and D.
Vertically periodic domain: nodes "Y" shared by two grids, A and D.

Using copyTo:

One of the most useful features of LevelData<NodeFArrayBox> is the copyTo() function. THE copyTo() FUNCTION MUST BE USED WITH CAUTION if the source and destination have different layouts.

Consider an example where A and B are on layouts of one box each, and these two boxes abut:

    +-------+
    |       |
    |   A   |
    |       |
    =========
    |       |
    |   B   |
    |       |
    +-------+
    
If we do A.copyTo(B), then the data on the nodes of the interface (marked "=") are NOT copied, because the underlying CELL-centered DisjointBoxLayouts of the LevelDatas do not intersect.

In general, doing src.copyTo(dest): if LevelData<NodeFArrayBox> src and LevelData<NodeFArrayBox> dest do NOT have identical underlying boxes in their layouts, then src.copyTo(dest) will NOT copy the interface nodes.

Here are two different ways to make sure the interface nodes are copied:

1. Do copyTo to a BoxLayoutData<NodeFArrayBox> defined on the BoxLayout of dest with each box expanded by 1 in each dimension. That is:

    BoxLayout destExpandedLayout;
    destExpandedLayout.deepCopy(dest.disjointBoxLayout());
    destExpandedLayout.grow(1);
    destExpandedLayout.closeNoSort();
    src.copyTo(destExpanded);
    for (DataIterator dit = dest.dataIterator(); dit.ok(); ++dit)
      {
        dest[dit].copy(destExpanded[dit]);
      }

2. Define src with ghost vector IntVect::Unit, and in copyTo, use a Copier with ghost vector IntVect::Unit. That is:

    Copier myCopier;
    myCopier.ghostDefine(src.disjointBoxLayout(),
                         dest.disjointBoxLayout(),
                         src.disjointBoxLayout().physDomain(),
                         IntVect::Unit);
    src.copyTo(dest, myCopier);
For this to work, src must have been defined with ghost vector IntVect::Unit (at least).

Linearization functions

size_t size (const Box &a_R, const Interval &a_comps) const
void linearOut (void *a_buf, const Box &a_R, const Interval &a_comps) const
void linearIn (void *a_buf, const Box &a_R, const Interval &a_comps)
void linearOut (void *a_buf) const
 These functions are required for broadcast & gather.
void linearIn (const void *const a_buf)
int linearSize (void) const
static int preAllocatable ()

Public Member Functions

void setVal (Real a_x)
void setVal (Real a_x, const Box &a_bx, int a_nstart, int a_numcomp)
Real norm (const Box &a_subbox, int a_p=2, int a_comp=0, int a_numcomp=1) const
Real norm (int a_p=2, int a_comp=0, int a_numcomp=1) const
Real sumPow (const Box &a_subbox, int a_p=2, int a_comp=0, int a_numcomp=1) const
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 ()
int nComp () const
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
NodeFArrayBoxinvert (Real a_r)
NodeFArrayBoxinvert (Real a_r, int a_comp, int a_numcomp=1)
NodeFArrayBoxinvert (Real a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1)
NodeFArrayBoxnegate (const Box &a_subbox, int a_comp=0, int a_numcomp=1)
NodeFArrayBoxnegate (int a_comp, int a_numcomp=1)
NodeFArrayBoxnegate ()
NodeFArrayBoxplus (Real a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1)
NodeFArrayBoxplus (Real a_r, int a_comp, int a_numcomp=1)
Realoperator() (const IntVect &a_p, int N=0)
const Realoperator() (const IntVect &a_p, int N=0) const
NodeFArrayBoxoperator+= (Real a_r)
NodeFArrayBoxoperator+= (const NodeFArrayBox &a_x)
NodeFArrayBoxplus (Real a_r)
NodeFArrayBoxplus_real (Real a_r)
NodeFArrayBoxplus (const NodeFArrayBox &a_x)
NodeFArrayBoxplus (const NodeFArrayBox &a_src, const Real &a_scale)
NodeFArrayBoxplus (const NodeFArrayBox &a_src, const Real &a_scale, int a_srccomp, int a_destcomp, int a_numcomp=1)
NodeFArrayBoxplus (const NodeFArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1)
NodeFArrayBoxplus (const NodeFArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
NodeFArrayBoxplus (const NodeFArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
NodeFArrayBoxplus (const NodeFArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, const Real &a_scale, int a_srccomp, int a_destcomp, int a_numcomp=1)
NodeFArrayBoxoperator-= (Real a_r)
NodeFArrayBoxoperator-= (const NodeFArrayBox &a_x)
NodeFArrayBoxminus (const NodeFArrayBox &a_x)
NodeFArrayBoxminus (const NodeFArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1)
NodeFArrayBoxminus (const NodeFArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
NodeFArrayBoxminus (const NodeFArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
NodeFArrayBoxoperator*= (Real a_r)
NodeFArrayBoxmult (Real a_r)
NodeFArrayBoxmult (Real a_r, int a_comp, int a_numcomp=1)
NodeFArrayBoxmult (Real a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1)
NodeFArrayBoxoperator*= (const NodeFArrayBox &a_x)
NodeFArrayBoxmult (const NodeFArrayBox &a_x)
NodeFArrayBoxmult (const NodeFArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1)
NodeFArrayBoxmult (const NodeFArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
NodeFArrayBoxmult (const NodeFArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
NodeFArrayBoxoperator/= (Real a_r)
NodeFArrayBoxdivide (Real a_r)
NodeFArrayBoxdivide (Real a_r, int a_comp, int a_numcomp=1)
NodeFArrayBoxdivide (Real a_r, const Box &a_subbox, int a_comp=0, int a_numcomp=1)
NodeFArrayBoxoperator/= (const NodeFArrayBox &a_x)
NodeFArrayBoxdivide (const NodeFArrayBox &a_x)
NodeFArrayBoxdivide (const NodeFArrayBox &a_src, int a_srccomp, int a_destcomp, int a_numcomp=1)
NodeFArrayBoxdivide (const NodeFArrayBox &a_src, const Box &a_subbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
NodeFArrayBoxdivide (const NodeFArrayBox &a_src, const Box &a_srcbox, const Box &a_destbox, int a_srccomp, int a_destcomp, int a_numcomp=1)
const int * loVect () const
const int * hiVect () const
const int * nCompPtr () const
RealdataPtr (int a_n=0)
const RealdataPtr (int a_n=0) const
void shift (const IntVect &iv)
Constructors, destructor and defines
 NodeFArrayBox ()
 NodeFArrayBox (const Box &a_bx, int a_nComp, Real *a_alias=NULL)
 NodeFArrayBox (const Box &a_bx)
 NodeFArrayBox (const Interval &a_comps, NodeFArrayBox &a_original)
 NodeFArrayBox (NodeFArrayBox &&a_in)
NodeFArrayBoxoperator= (NodeFArrayBox &&a_in)
 ~NodeFArrayBox ()
void define (const Box &a_bx, int a_nComp=1)
void define (const Box &a_bx, int a_nComp, Real *a_dataPtr)
Accessors
Change this NodeFArrayBox so it covers the Box a_bx with a_nComps components. If a_alias is not NULL, it is used as the data memory (and is assumed to be large enough).

const Boxbox () const
FArrayBoxgetFab ()
const FArrayBoxgetFab () const
Real dotProduct (const NodeFArrayBox &a_fab2) const
Real dotProduct (const NodeFArrayBox &a_fab2, const Box &box) const
Data modification functions
void copy (const NodeFArrayBox &a_src)
void copy (const Box &a_regionFrom, const Interval &a_Cdest, const Box &a_regionTo, const NodeFArrayBox &a_src, const Interval &a_Csrc)

Protected Attributes

Box m_box
FArrayBox m_fab

Constructor & Destructor Documentation

NodeFArrayBox::NodeFArrayBox (  ) 

Default constructor. User must subsequently call define().

NodeFArrayBox::NodeFArrayBox ( const Box a_bx,
int  a_nComp,
Real a_alias = NULL 
)

Constructs NodeFArrayBox on CELL-centered box a_bx with a_nComp. If a_alias is not null this oject does not delete it in the destructor.

NodeFArrayBox::NodeFArrayBox ( const Box a_bx  )  [inline]

Constructs NodeFArrayBox on CELL-centered box a_bx for just a scalar.

References define().

NodeFArrayBox::NodeFArrayBox ( const Interval a_comps,
NodeFArrayBox a_original 
)

Constructs an aliased NodeFArrayBox.

NodeFArrayBox::NodeFArrayBox ( NodeFArrayBox &&  a_in  ) 

NodeFArrayBox::~NodeFArrayBox (  ) 

Destructor.


Member Function Documentation

NodeFArrayBox& NodeFArrayBox::operator= ( NodeFArrayBox &&  a_in  ) 

void NodeFArrayBox::define ( const Box a_bx,
int  a_nComp = 1 
)

Defines NodeFArrayBox on CELL-centered box a_bx with a_nComp components. If called more than once on the same instance, the box and FAB will be resize()d.

Referenced by NodeFArrayBox().

void NodeFArrayBox::define ( const Box a_bx,
int  a_nComp,
Real a_dataPtr 
)

alias Defines NodeFArrayBox on CELL-centered box a_bx with a_nComp components. If called more than once on the same instance, the box and FAB will be resize()d. Class is not responsible for data pointed to by a_dataPtr

const Box& NodeFArrayBox::box (  )  const

Returns the CELL-centered domain where the array is defined.

FArrayBox& NodeFArrayBox::getFab (  ) 

Returns a modifiable reference to the NODE-centered FArrayBox containing the data.

const FArrayBox& NodeFArrayBox::getFab (  )  const

Returns a constant reference to the NODE-centered FArrayBox containing the data.

Real NodeFArrayBox::dotProduct ( const NodeFArrayBox a_fab2  )  const [inline]

References FArrayBox::dotProduct(), and m_fab.

Real NodeFArrayBox::dotProduct ( const NodeFArrayBox a_fab2,
const Box box 
) const [inline]

References FArrayBox::dotProduct(), and m_fab.

void NodeFArrayBox::copy ( const NodeFArrayBox a_src  ) 

Modifies the data in this NodeFArrayBox by copying data from a_src into it, over the nodes that they have in common.
If this NodeFArrayBox and a_src have abutting grids, as shown:

      +--------+
      |        |
      |  this  |
      |        |
      ==========   <- data copied here from a_src to this
      |        |
      |  a_src |
      |        |
      +--------+
      
then the data in this NodeFArrayBox WILL be modified along the edge nodes where they abut -- even though this.box() and a_src.box(), being CELL-centered, do NOT intersect.

All components are copied.

void NodeFArrayBox::copy ( const Box a_regionFrom,
const Interval a_Cdest,
const Box a_regionTo,
const NodeFArrayBox a_src,
const Interval a_Csrc 
)

Modifies the data in this NodeFArrayBox by copying the data from a_src into it, over the intersection of:

  • the nodes surrounding the CELL-centered box a_regionFrom;
  • the nodes surrounding the CELL-centered box a_regionTo;
  • the nodes containing data in this NodeFArrayBox;
  • the nodes containing data in a_src.

The components in the interval a_Csrc in a_src are copied to the components in the interval a_Cdest in this NodeFArrayBox.

This function is required in order to have BoxLayoutData<NodeFArrayBox>.

size_t NodeFArrayBox::size ( const Box a_R,
const Interval a_comps 
) const

Returns size, in number of bytes, of a flat linear representation of the data in this object in the area defined by the nodes in CELL-centered box a_R and the component Interval a_comps.

This function is required in order to have BoxLayoutData<NodeFArrayBox>.

void NodeFArrayBox::linearOut ( void *  a_buf,
const Box a_R,
const Interval a_comps 
) const

Writes into a_buf a linear representation of the internal data for the nodes surrounding CELL-centered box a_R, over the component Interval a_comps.

Assumes that sufficient memory for the buffer has already been allocated by the caller.

This function is required in order to have BoxLayoutData<NodeFArrayBox>.

void NodeFArrayBox::linearIn ( void *  a_buf,
const Box a_R,
const Interval a_comps 
)

void NodeFArrayBox::linearOut ( void *  a_buf  )  const

These functions are required for broadcast & gather.

void NodeFArrayBox::linearIn ( const void *const   a_buf  ) 

int NodeFArrayBox::linearSize ( void   )  const

static int NodeFArrayBox::preAllocatable (  )  [inline, static]

void NodeFArrayBox::setVal ( Real  a_x  ) 

Modifies this NodeFArrayBox so that all values of all components are set to the given value, a_x. (FArrayBox inherits such a function from BaseFab.)

void NodeFArrayBox::setVal ( Real  a_x,
const Box a_bx,
int  a_nstart,
int  a_numcomp 
)

The setVal functions set subregions in the `BaseFab' to a constant value. This most general form specifies the subbox, the starting component number, and the number of components to be set.

Real NodeFArrayBox::norm ( const Box a_subbox,
int  a_p = 2,
int  a_comp = 0,
int  a_numcomp = 1 
) const [inline]

HERE 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

References m_fab, and FArrayBox::norm().

Real NodeFArrayBox::norm ( int  a_p = 2,
int  a_comp = 0,
int  a_numcomp = 1 
) const [inline]

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

References m_fab, and FArrayBox::norm().

Real NodeFArrayBox::sumPow ( const Box a_subbox,
int  a_p = 2,
int  a_comp = 0,
int  a_numcomp = 1 
) const [inline]

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

References m_fab, and FArrayBox::sumPow().

Real NodeFArrayBox::min ( int  a_comp = 0  )  const [inline]

Returns the minimum value of given component of this NodeFArrayBox.

References m_fab, and FArrayBox::min().

Real NodeFArrayBox::min ( const Box a_subbox,
int  a_comp = 0 
) const [inline]

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

References m_fab, and FArrayBox::min().

Real NodeFArrayBox::max ( int  a_comp = 0  )  const [inline]

Returns the maximum value of given component of this NodeFArrayBox.

References m_fab, and FArrayBox::max().

Real NodeFArrayBox::max ( const Box a_subbox,
int  a_comp = 0 
) const [inline]

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

References m_fab, and FArrayBox::max().

IntVect NodeFArrayBox::minIndex ( int  a_comp = 0  )  const [inline]

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

References m_fab, and FArrayBox::minIndex().

IntVect NodeFArrayBox::minIndex ( const Box a_subbox,
int  a_comp = 0 
) const [inline]

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

References m_fab, and FArrayBox::minIndex().

IntVect NodeFArrayBox::maxIndex ( int  a_comp = 0  )  const [inline]

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

References m_fab, and FArrayBox::maxIndex().

IntVect NodeFArrayBox::maxIndex ( const Box a_subbox,
int  a_comp = 0 
) const [inline]

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

References m_fab, and FArrayBox::maxIndex().

int NodeFArrayBox::maskLT ( BaseFab< int > &  a_mask,
Real  a_val,
int  a_comp = 0 
) const [inline]

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

References m_fab, and FArrayBox::maskLT().

int NodeFArrayBox::maskLE ( BaseFab< int > &  a_mask,
Real  a_val,
int  a_comp = 0 
) const [inline]

Computes a_mask array with value of 1 in cells where this NodeFArrayBox 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.

References m_fab, and FArrayBox::maskLE().

int NodeFArrayBox::maskEQ ( BaseFab< int > &  a_mask,
Real  a_val,
int  a_comp = 0 
) const [inline]

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

References m_fab, and FArrayBox::maskEQ().

int NodeFArrayBox::maskGT ( BaseFab< int > &  a_mask,
Real  a_val,
int  a_comp = 0 
) const [inline]

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

References m_fab, and FArrayBox::maskGT().

int NodeFArrayBox::maskGE ( BaseFab< int > &  a_mask,
Real  a_val,
int  a_comp = 0 
) const [inline]

Computes a_mask array with value of 1 in cells where this NodeFArrayBox 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.

References m_fab, and FArrayBox::maskGE().

void NodeFArrayBox::abs (  )  [inline]

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

References FArrayBox::abs(), and m_fab.

int NodeFArrayBox::nComp (  )  const [inline]

References m_fab, and BaseFab< T >::nComp().

void NodeFArrayBox::abs ( int  a_comp,
int  a_numcomp = 1 
) [inline]

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

References FArrayBox::abs(), and m_fab.

void NodeFArrayBox::abs ( const Box a_subbox,
int  a_comp = 0,
int  a_numcomp = 1 
) [inline]

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

References FArrayBox::abs(), and m_fab.

Real NodeFArrayBox::sum ( int  a_comp,
int  a_numcomp = 1 
) const [inline]

Returns sum of given component of NodeFArrayBox.

References m_fab, and FArrayBox::sum().

Real NodeFArrayBox::sum ( const Box a_subbox,
int  a_comp,
int  a_numcomp = 1 
) const [inline]

Returns sum of component of this NodeFArrayBox in given a_subbox.

References m_fab, and FArrayBox::sum().

NodeFArrayBox& NodeFArrayBox::invert ( Real  a_r  )  [inline]

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

References FArrayBox::invert(), and m_fab.

NodeFArrayBox& NodeFArrayBox::invert ( Real  a_r,
int  a_comp,
int  a_numcomp = 1 
) [inline]

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

References FArrayBox::invert(), and m_fab.

NodeFArrayBox& NodeFArrayBox::invert ( Real  a_r,
const Box a_subbox,
int  a_comp = 0,
int  a_numcomp = 1 
) [inline]

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

References FArrayBox::invert(), and m_fab.

NodeFArrayBox& NodeFArrayBox::negate ( const Box a_subbox,
int  a_comp = 0,
int  a_numcomp = 1 
) [inline]

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

References m_fab, and FArrayBox::negate().

NodeFArrayBox& NodeFArrayBox::negate ( int  a_comp,
int  a_numcomp = 1 
) [inline]

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

References m_fab, and FArrayBox::negate().

NodeFArrayBox& NodeFArrayBox::negate (  )  [inline]

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

References m_fab, and FArrayBox::negate().

NodeFArrayBox& NodeFArrayBox::plus ( Real  a_r,
const Box a_subbox,
int  a_comp = 0,
int  a_numcomp = 1 
) [inline]

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

References m_fab, and FArrayBox::plus().

Referenced by plus_real().

NodeFArrayBox& NodeFArrayBox::plus ( Real  a_r,
int  a_comp,
int  a_numcomp = 1 
) [inline]

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

References m_fab, and FArrayBox::plus().

Real& NodeFArrayBox::operator() ( const IntVect a_p,
int  N = 0 
) [inline]

References m_fab, and N.

const Real& NodeFArrayBox::operator() ( const IntVect a_p,
int  N = 0 
) const [inline]

References m_fab, and N.

NodeFArrayBox& NodeFArrayBox::operator+= ( Real  a_r  )  [inline]

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

References m_fab.

NodeFArrayBox& NodeFArrayBox::operator+= ( const NodeFArrayBox a_x  )  [inline]

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

References m_fab.

NodeFArrayBox& NodeFArrayBox::plus ( Real  a_r  )  [inline]

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

References m_fab.

NodeFArrayBox& NodeFArrayBox::plus_real ( Real  a_r  )  [inline]

References plus().

NodeFArrayBox& NodeFArrayBox::plus ( const NodeFArrayBox a_x  )  [inline]

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

References m_fab.

NodeFArrayBox& NodeFArrayBox::plus ( const NodeFArrayBox a_src,
const Real a_scale 
) [inline]

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

References m_fab, and FArrayBox::plus().

NodeFArrayBox& NodeFArrayBox::plus ( const NodeFArrayBox a_src,
const Real a_scale,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
) [inline]

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

References m_fab, and FArrayBox::plus().

NodeFArrayBox& NodeFArrayBox::plus ( const NodeFArrayBox a_src,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
) [inline]

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

References m_fab, and FArrayBox::plus().

NodeFArrayBox& NodeFArrayBox::plus ( const NodeFArrayBox a_src,
const Box a_subbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
) [inline]

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

References m_fab, and FArrayBox::plus().

NodeFArrayBox& NodeFArrayBox::plus ( const NodeFArrayBox a_src,
const Box a_srcbox,
const Box a_destbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
) [inline]

Modifies this NodeFArrayBox by pointwise addition of values in the argument NodeFArrayBox. Adds src's components (a_srccomp : a_srccomp+a_numcomp-1) in the Box a_srcbox to this NodeFArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) in the Box a_destbox. Corresponding locations within the two NodeFArrayBoxes 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 NodeFArrayBoxes are the same and the a_srcbox and a_destbox overlap.

References m_fab, and FArrayBox::plus().

NodeFArrayBox& NodeFArrayBox::plus ( const NodeFArrayBox a_src,
const Box a_srcbox,
const Box a_destbox,
const Real a_scale,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
) [inline]

References m_fab, and FArrayBox::plus().

NodeFArrayBox& NodeFArrayBox::operator-= ( Real  a_r  )  [inline]

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

References m_fab.

NodeFArrayBox& NodeFArrayBox::operator-= ( const NodeFArrayBox a_x  )  [inline]

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

References m_fab.

NodeFArrayBox& NodeFArrayBox::minus ( const NodeFArrayBox a_x  )  [inline]

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

References m_fab.

NodeFArrayBox& NodeFArrayBox::minus ( const NodeFArrayBox a_src,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
) [inline]

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

References m_fab, and FArrayBox::minus().

NodeFArrayBox& NodeFArrayBox::minus ( const NodeFArrayBox a_src,
const Box a_subbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
) [inline]

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

References m_fab, and FArrayBox::minus().

NodeFArrayBox& NodeFArrayBox::minus ( const NodeFArrayBox a_src,
const Box a_srcbox,
const Box a_destbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
) [inline]

Modifies this NodeFArrayBox by pointwise subtraction of values in the argument NodeFArrayBox. Subtracts a_src's components (a_srccomp : a_srccomp+a_numcomp-1) in the Box a_srcbox from this NodeFArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) in the Box a_destbox. Corresponding locations within the two NodeFArrayBoxes 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 NodeFArrayBoxes are the same and the a_srcbox and a_destbox overlap.

References m_fab, and FArrayBox::minus().

NodeFArrayBox& NodeFArrayBox::operator*= ( Real  a_r  )  [inline]

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

References m_fab.

NodeFArrayBox& NodeFArrayBox::mult ( Real  a_r  )  [inline]

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

References m_fab.

NodeFArrayBox& NodeFArrayBox::mult ( Real  a_r,
int  a_comp,
int  a_numcomp = 1 
) [inline]

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

References m_fab, and FArrayBox::mult().

NodeFArrayBox& NodeFArrayBox::mult ( Real  a_r,
const Box a_subbox,
int  a_comp = 0,
int  a_numcomp = 1 
) [inline]

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

References m_fab, and FArrayBox::mult().

NodeFArrayBox& NodeFArrayBox::operator*= ( const NodeFArrayBox a_x  )  [inline]

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

References m_fab.

NodeFArrayBox& NodeFArrayBox::mult ( const NodeFArrayBox a_x  )  [inline]

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

References m_fab.

NodeFArrayBox& NodeFArrayBox::mult ( const NodeFArrayBox a_src,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
) [inline]

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

References m_fab, and FArrayBox::mult().

NodeFArrayBox& NodeFArrayBox::mult ( const NodeFArrayBox a_src,
const Box a_subbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
) [inline]

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

References m_fab, and FArrayBox::mult().

NodeFArrayBox& NodeFArrayBox::mult ( const NodeFArrayBox a_src,
const Box a_srcbox,
const Box a_destbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
) [inline]

Modifies this NodeFArrayBox by pointwise multiplication by values in the argument NodeFArrayBox. Multiplies a_src's components (a_srccomp : a_srccomp+a_numcomp-1) in the Box a_srcbox by this NodeFArrayBox's components (a_destcomp : a_destcomp+a_numcomp-1) in the Box a_destbox. Corresponding locations within the two NodeFArrayBoxes 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 NodeFArrayBoxes are the same and the a_srcbox and a_destbox overlap.

References m_fab, and FArrayBox::mult().

NodeFArrayBox& NodeFArrayBox::operator/= ( Real  a_r  )  [inline]

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

References m_fab.

NodeFArrayBox& NodeFArrayBox::divide ( Real  a_r  )  [inline]

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

References m_fab.

NodeFArrayBox& NodeFArrayBox::divide ( Real  a_r,
int  a_comp,
int  a_numcomp = 1 
) [inline]

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

References FArrayBox::divide(), and m_fab.

NodeFArrayBox& NodeFArrayBox::divide ( Real  a_r,
const Box a_subbox,
int  a_comp = 0,
int  a_numcomp = 1 
) [inline]

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

References FArrayBox::divide(), and m_fab.

NodeFArrayBox& NodeFArrayBox::operator/= ( const NodeFArrayBox a_x  )  [inline]

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

References m_fab.

NodeFArrayBox& NodeFArrayBox::divide ( const NodeFArrayBox a_x  )  [inline]

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

References m_fab.

NodeFArrayBox& NodeFArrayBox::divide ( const NodeFArrayBox a_src,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
) [inline]

Modifies this NodeFArrayBox by pointwise division by values in the argument NodeFArrayBox. Divides this NodeFArrayBox'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 NodeFArrayBoxes intersect.

References FArrayBox::divide(), and m_fab.

NodeFArrayBox& NodeFArrayBox::divide ( const NodeFArrayBox a_src,
const Box a_subbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
) [inline]

Modifies this NodeFArrayBox by pointwise division by values in the argument NodeFArrayBox. Divides this NodeFArrayBox'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 NodeFArrayBox intersects the a_subbox. NOTE: a_subbox must be contained in this FAB.

References FArrayBox::divide(), and m_fab.

NodeFArrayBox& NodeFArrayBox::divide ( const NodeFArrayBox a_src,
const Box a_srcbox,
const Box a_destbox,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp = 1 
) [inline]

Modifies this NodeFArrayBox by pointwise division by values in the argument NodeFArrayBox. Divides this NodeFArrayBox'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 NodeFArrayBoxes 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 NodeFArrayBoxes are the same and the a_srcbox and a_destbox overlap.

References FArrayBox::divide(), and m_fab.

const int* NodeFArrayBox::loVect (  )  const [inline]

Returns the lower corner of the domain. Instead of returning them in the form of IntVects, as in smallEnd and bigEnd, it returns the values as a pointer to an array of constant integers. This is useful when interfacing to Fortran subroutines. It should not be used in any other context!!!

References BaseFab< T >::loVect(), and m_fab.

const int* NodeFArrayBox::hiVect (  )  const [inline]

Returns the upper corner of the domain. Instead of returning them in the form of IntVects, as in smallEnd and bigEnd, it returns the values as a pointer to an array of constant integers. This is useful when interfacing to Fortran subroutines. It should not be used in any other context!!!

References BaseFab< T >::hiVect(), and m_fab.

const int* NodeFArrayBox::nCompPtr (  )  const [inline]

Returns a pointer to an integer that contains the number of components in the BaseFab. This is useful when interfacing to Fortran subroutines. It should not be used in any other context!!!

References m_fab, and BaseFab< T >::nCompPtr().

Real* NodeFArrayBox::dataPtr ( int  a_n = 0  )  [inline]

Returns a pointer to an object of type T that is the value of the a_nth component associated with the cell at the low end of the domain. This is commonly used to get a pointer to data in the array which is then handed off to a Fortran subroutine. It should not be used in any other context!!! Remember that data is stored in Fortran array order, with the component index coming last. In other words, `dataPtr' returns a pointer to all the a_nth components.

References BaseFab< T >::dataPtr(), and m_fab.

const Real* NodeFArrayBox::dataPtr ( int  a_n = 0  )  const [inline]

Returns a constant pointer to an object of type T that is the value of the a_nth component associated with the cell at the low end of the domain. This is commonly used to get a pointer to data in the array which is then handed off to a Fortran subroutine. It should not be used in any other context!!! Remember that data is stored in Fortran array order, with the component index coming last. In other words, `dataPtr' returns a pointer to all the a_nth components.

References BaseFab< T >::dataPtr(), and m_fab.

void NodeFArrayBox::shift ( const IntVect iv  )  [inline]


Member Data Documentation

Referenced by shift().


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

Generated on Fri Apr 5 04:25:13 2019 for Chombo + EB by  doxygen 1.5.5