|
IBAMR
IBAMR version 0.19.
|
#include <ArrayDataNormOpsComplex.h>
Private Member Functions | |
| ArrayDataNormOpsComplex (const ArrayDataNormOpsComplex< DIM > &) | |
| void | operator= (const 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>.
| SAMRAI::math::ArrayDataNormOpsComplex< DIM >::ArrayDataNormOpsComplex | ( | ) |
Empty constructor and destructor.
| SAMRAI::math::ArrayDataNormOpsComplex< DIM >::~ArrayDataNormOpsComplex | ( | ) |
|
private |
| 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 }\).
| 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.
| 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 )\).
| 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}} )\).
| 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 ) }\).
| 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} ) }\).
| 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 ) }\).
| 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 ) }\).
| 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\).
| 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}} )\).
| 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 )\).
| 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} )\).
| 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 )\).
|
private |
1.8.17