SAMRAI::math::ArrayDataNormOpsComplex< DIM > Class Template Reference

#include <source/mathops/array/ArrayDataNormOpsComplex.h>

List of all members.

Public Member Functions

 ArrayDataNormOpsComplex ()
 ~ArrayDataNormOpsComplex ()
void abs (pdat::ArrayData< DIM, double > &dst, const pdat::ArrayData< DIM, dcomplex > &src, const hier::Box< DIM > &box) const
double sumControlVolumes (const pdat::ArrayData< DIM, dcomplex > &data, const pdat::ArrayData< DIM, double > &cvol, const hier::Box< DIM > &box) const
double L1NormWithControlVolume (const pdat::ArrayData< DIM, dcomplex > &data, const pdat::ArrayData< DIM, double > &cvol, const hier::Box< DIM > &box) const
double L1Norm (const pdat::ArrayData< DIM, dcomplex > &data, const hier::Box< DIM > &box) const
double L2NormWithControlVolume (const pdat::ArrayData< DIM, dcomplex > &data, const pdat::ArrayData< DIM, double > &cvol, const hier::Box< DIM > &box) const
double L2Norm (const pdat::ArrayData< DIM, dcomplex > &data, const hier::Box< DIM > &box) const
double weightedL2NormWithControlVolume (const pdat::ArrayData< DIM, dcomplex > &data, const pdat::ArrayData< DIM, dcomplex > &wgt, const pdat::ArrayData< DIM, double > &cvol, const hier::Box< DIM > &box) const
double weightedL2Norm (const pdat::ArrayData< DIM, dcomplex > &data, const pdat::ArrayData< DIM, dcomplex > &wgt, const hier::Box< DIM > &box) const
double maxNormWithControlVolume (const pdat::ArrayData< DIM, dcomplex > &data, const pdat::ArrayData< DIM, double > &cvol, const hier::Box< DIM > &box) const
double maxNorm (const pdat::ArrayData< DIM, dcomplex > &data, const hier::Box< DIM > &box) const
dcomplex dotWithControlVolume (const pdat::ArrayData< DIM, dcomplex > &data1, const pdat::ArrayData< DIM, dcomplex > &data2, const pdat::ArrayData< DIM, double > &cvol, const hier::Box< DIM > &box) const
dcomplex dot (const pdat::ArrayData< DIM, dcomplex > &data1, const pdat::ArrayData< DIM, dcomplex > &data2, const hier::Box< DIM > &box) const
dcomplex integral (const pdat::ArrayData< DIM, dcomplex > &data, const pdat::ArrayData< DIM, double > &vol, const hier::Box< DIM > &box) const


Detailed Description

template<int DIM>
class SAMRAI::math::ArrayDataNormOpsComplex< DIM >

Class ArrayDataNormOpsComplex<DIM> provides a set of common norm operations that may be applied to arrays of complex data values maintained as pdat::ArrayData<DIM> objects. The intent of this class is to provide a single implementation of these operations as they are needed by objects that perform these operations on the standard array-based patch data types (i.e., cell-centered, face-centered, node-centered). Each of the norm operations is implemented in two different ways. The choice of operation is based on whether control volume information is to be used to weight the contribution of each data entry to the norm calculation. The use of control volumes is important when these operations are used in vector kernels where the data resides over multiple levels in an AMR hierarchy. Note also that each operation will be performed on the intersection of the box in the function argument list and the boxes associated with all pdat::ArrayData<DIM> objects.

Note that a similar set of norm operations is implemented for real array data (double and float) in the class ArrayDataNormOpsReal<DIM>.

See also:
pdat::ArrayData


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::math::ArrayDataNormOpsComplex< DIM >::ArrayDataNormOpsComplex (  ) 

Empty constructor and destructor.

template<int DIM>
SAMRAI::math::ArrayDataNormOpsComplex< DIM >::~ArrayDataNormOpsComplex (  ) 


Member Function Documentation

template<int DIM>
void SAMRAI::math::ArrayDataNormOpsComplex< DIM >::abs ( pdat::ArrayData< DIM, double > &  dst,
const pdat::ArrayData< DIM, dcomplex > &  src,
const hier::Box< DIM > &  box 
) const

Set destination component to norm of source component. That is, each destination entry is set to $d_i = \sqrt{ {real(s_i)}^2 + {imag(s_i)}^2 }$.

template<int DIM>
double SAMRAI::math::ArrayDataNormOpsComplex< DIM >::sumControlVolumes ( const pdat::ArrayData< DIM, dcomplex > &  data,
const pdat::ArrayData< DIM, double > &  cvol,
const hier::Box< DIM > &  box 
) const

Return sum of entries in control volume array.

template<int DIM>
double SAMRAI::math::ArrayDataNormOpsComplex< DIM >::L1NormWithControlVolume ( const pdat::ArrayData< DIM, dcomplex > &  data,
const pdat::ArrayData< DIM, double > &  cvol,
const hier::Box< DIM > &  box 
) const

Return discrete $L_1$-norm of the data using the control volume to weight the contribution of each data entry to the sum. That is, the return value is the sum $\sum_i ( \sqrt{data_i * \bar{data_i}} cvol_i )$.

template<int DIM>
double SAMRAI::math::ArrayDataNormOpsComplex< DIM >::L1Norm ( const pdat::ArrayData< DIM, dcomplex > &  data,
const hier::Box< DIM > &  box 
) const

Return discrete $L_1$-norm of the data. That is, the return value is the sum $\sum_i ( \sqrt{data_i * \bar{data_i}} )$.

template<int DIM>
double SAMRAI::math::ArrayDataNormOpsComplex< DIM >::L2NormWithControlVolume ( const pdat::ArrayData< DIM, dcomplex > &  data,
const pdat::ArrayData< DIM, double > &  cvol,
const hier::Box< DIM > &  box 
) const

Return discrete $L_2$-norm of the data using the control volume to weight the contribution of each data entry to the sum. That is, the return value is the sum $\sqrt{ \sum_i ( data_i * \bar{data_i} cvol_i ) }$.

template<int DIM>
double SAMRAI::math::ArrayDataNormOpsComplex< DIM >::L2Norm ( const pdat::ArrayData< DIM, dcomplex > &  data,
const hier::Box< DIM > &  box 
) const

Return discrete $L_2$-norm of the data using the control volume to weight the contribution of each data entry to the sum. That is, the return value is the sum $\sqrt{ \sum_i ( data_i * \bar{data_i} ) }$.

template<int DIM>
double SAMRAI::math::ArrayDataNormOpsComplex< DIM >::weightedL2NormWithControlVolume ( const pdat::ArrayData< DIM, dcomplex > &  data,
const pdat::ArrayData< DIM, dcomplex > &  wgt,
const pdat::ArrayData< DIM, double > &  cvol,
const hier::Box< DIM > &  box 
) const

Return discrete weighted $L_2$-norm of the data using the control volume to weight the contribution of the data and weight entries to the sum. That is, the return value is the sum $\sqrt{ \sum_i ( (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }$.

template<int DIM>
double SAMRAI::math::ArrayDataNormOpsComplex< DIM >::weightedL2Norm ( const pdat::ArrayData< DIM, dcomplex > &  data,
const pdat::ArrayData< DIM, dcomplex > &  wgt,
const hier::Box< DIM > &  box 
) const

Return discrete weighted $L_2$-norm of the data. That is, the return value is the sum $\sqrt{ \sum_i ( (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }$.

template<int DIM>
double SAMRAI::math::ArrayDataNormOpsComplex< DIM >::maxNormWithControlVolume ( const pdat::ArrayData< DIM, dcomplex > &  data,
const pdat::ArrayData< DIM, double > &  cvol,
const hier::Box< DIM > &  box 
) const

Return the $\max$-norm of the data using the control volume to weight the contribution of each data entry to the maximum. That is, the return value is $\max_i ( \sqrt{data_i * \bar{data_i}} )$, where the max is over the data elements where $cvol_i > 0$.

template<int DIM>
double SAMRAI::math::ArrayDataNormOpsComplex< DIM >::maxNorm ( const pdat::ArrayData< DIM, dcomplex > &  data,
const hier::Box< DIM > &  box 
) const

Return the $\max$-norm of the data. That is, the return value is $\max_i ( \sqrt{data_i * \bar{data_i}} )$.

template<int DIM>
dcomplex SAMRAI::math::ArrayDataNormOpsComplex< DIM >::dotWithControlVolume ( const pdat::ArrayData< DIM, dcomplex > &  data1,
const pdat::ArrayData< DIM, dcomplex > &  data2,
const pdat::ArrayData< DIM, double > &  cvol,
const hier::Box< DIM > &  box 
) const

Return the dot product of the two data arrays using the control volume to weight the contribution of each product to the sum. That is, the return value is the sum $\sum_i ( data1_i * \bar{data2_i} * cvol_i )$.

template<int DIM>
dcomplex SAMRAI::math::ArrayDataNormOpsComplex< DIM >::dot ( const pdat::ArrayData< DIM, dcomplex > &  data1,
const pdat::ArrayData< DIM, dcomplex > &  data2,
const hier::Box< DIM > &  box 
) const

Return the dot product of the two data arrays. That is, the return value is the sum $\sum_i ( data1_i * \bar{data2_i} )$.

template<int DIM>
dcomplex SAMRAI::math::ArrayDataNormOpsComplex< DIM >::integral ( const pdat::ArrayData< DIM, dcomplex > &  data,
const pdat::ArrayData< DIM, double > &  vol,
const hier::Box< DIM > &  box 
) const

Return the integral of the function based on the data array. The return value is the sum $\sum_i ( data_i * vol_i )$.


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