SAMRAI::pdat::ArrayDataOperationUtilities< DIM, TYPE, OP > Class Template Reference

Struct ArrayDataOperationUtilities<DIM, TYPE, OP> provides generic looping operations for all array-based patch data types. The operations are templated on spatial dimension, data type, and the operation that will be performed on individual array elements in the innermost loop. More...

#include <source/patchdata/array/ArrayDataOperationUtilities.h>

List of all members.

Static Public Member Functions

static void doArrayDataOperationOnBox (ArrayData< DIM, TYPE > &dst, const ArrayData< DIM, TYPE > &src, const hier::Box< DIM > &opbox, const hier::IntVector< DIM > &src_shift, int dst_start_depth, int src_start_depth, int num_depth, const OP &op)
static void doArrayDataBufferOperationOnBox (const ArrayData< DIM, TYPE > &arraydata, const TYPE *buffer, const hier::Box< DIM > &opbox, bool src_is_buffer, const OP &op)


Detailed Description

template<int DIM, class TYPE, class OP>
class SAMRAI::pdat::ArrayDataOperationUtilities< DIM, TYPE, OP >

Struct ArrayDataOperationUtilities<DIM, TYPE, OP> provides generic looping operations for all array-based patch data types. The operations are templated on spatial dimension, data type, and the operation that will be performed on individual array elements in the innermost loop.

See also:
ArrayData


Member Function Documentation

template<int DIM, class TYPE, class OP>
void SAMRAI::pdat::ArrayDataOperationUtilities< DIM, TYPE, OP >::doArrayDataOperationOnBox ( ArrayData< DIM, TYPE > &  dst,
const ArrayData< DIM, TYPE > &  src,
const hier::Box< DIM > &  opbox,
const hier::IntVector< DIM > &  src_shift,
int  dst_start_depth,
int  src_start_depth,
int  num_depth,
const OP &  op 
) [static]

Perform operation on a subset of data components of source and destination array data objects and put results in destination array data object.

Parameters:
dst Reference to destination array data object.
src Const reference to source array data object.
opbox Const reference to Box indicating index space region of operation.
src_shift Const reference to IntVector indicating shift required to put source index space region into destination index space region.
dst_start_depth Integer specifying starting depth component of operation in destination array.
src_start_depth Integer specifying starting depth component of operation in source array.
num_depth Integer number of depth components on which to perform operation.
op Const reference to object that performs operations on individual data array elements.
When assertion checking is active, assertion will result when any of the depth-related arguments are out-of-bounds for the given array data objects.

template<int DIM, class TYPE, class OP>
void SAMRAI::pdat::ArrayDataOperationUtilities< DIM, TYPE, OP >::doArrayDataBufferOperationOnBox ( const ArrayData< DIM, TYPE > &  arraydata,
const TYPE *  buffer,
const hier::Box< DIM > &  opbox,
bool  src_is_buffer,
const OP &  op 
) [static]

Perform operation on all data components of array data object and corresponding buffer data, putting results in either the array data object or buffer.

Parameters:
arraydata Const reference to array data object.
buffer Const pointer to first element in buffer.
opbox Const reference to Box indicating operation region in index space of array data object.
src_is_buffer Boolean value indicating whether buffer is source data for operation; if true results will be placed in array data object, otherwise results will go in buffer.
op Const reference to object that performs operations on individual data array elements.
When assertion checking is active, assertion will result when buffer pointer is null or operation box is not the same as the array data box.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:28:42 2009 for SAMRAI by  doxygen 1.5.1