#include <source/mathops/cell/PatchCellDataMiscellaneousOpsReal.h>
Inheritance diagram for SAMRAI::math::PatchCellDataMiscellaneousOpsReal< DIM, TYPE >:
Public Member Functions | |
PatchCellDataMiscellaneousOpsReal () | |
virtual | ~PatchCellDataMiscellaneousOpsReal () |
int | computeConstrProdPos (const tbox::Pointer< pdat::CellData< DIM, TYPE > > &data1, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &data2, const hier::Box< DIM > &box, const tbox::Pointer< pdat::CellData< DIM, double > > cvol=((pdat::CellData< DIM, double > *)(0))) const |
void | compareToScalar (tbox::Pointer< pdat::CellData< DIM, TYPE > > &dst, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src, const TYPE &alpha, const hier::Box< DIM > &box, const tbox::Pointer< pdat::CellData< DIM, double > > cvol=((pdat::CellData< DIM, double > *)(0))) const |
int | testReciprocal (tbox::Pointer< pdat::CellData< DIM, TYPE > > &dst, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src, const hier::Box< DIM > &box, const tbox::Pointer< pdat::CellData< DIM, double > > cvol=((pdat::CellData< DIM, double > *)(0))) const |
TYPE | maxPointwiseDivide (const tbox::Pointer< pdat::CellData< DIM, TYPE > > &numer, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &denom, const hier::Box< DIM > &box) const |
Compute max of "conditional" quotients of two arrays. | |
TYPE | minPointwiseDivide (const tbox::Pointer< pdat::CellData< DIM, TYPE > > &numer, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &denom, const hier::Box< DIM > &box) const |
Compute min of quotients of two arrays. |
Since these operations are used only by the vector kernels for the KINSOL and CVODE solver packages at this time, they are intended to be instantiated for the standard built-in types double and float (since those solvers only treat double and float data). To extend this class to other data types or to include other operations, the member functions must be specialized or the new operations must be added.
SAMRAI::math::PatchCellDataMiscellaneousOpsReal< DIM, TYPE >::PatchCellDataMiscellaneousOpsReal | ( | ) |
Empty constructor and destructor.
SAMRAI::math::PatchCellDataMiscellaneousOpsReal< DIM, TYPE >::~PatchCellDataMiscellaneousOpsReal | ( | ) | [virtual] |
int SAMRAI::math::PatchCellDataMiscellaneousOpsReal< DIM, TYPE >::computeConstrProdPos | ( | const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | data1, | |
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | data2, | |||
const hier::Box< DIM > & | box, | |||
const tbox::Pointer< pdat::CellData< DIM, double > > | cvol = ((pdat::CellData< DIM, double > *)(0)) | |||
) | const |
Return 1 if and , for any in the index region, where . Otherwise return 0. If the control volume is NULL, all values in the index set are used.
void SAMRAI::math::PatchCellDataMiscellaneousOpsReal< DIM, TYPE >::compareToScalar | ( | tbox::Pointer< pdat::CellData< DIM, TYPE > > & | dst, | |
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src, | |||
const TYPE & | alpha, | |||
const hier::Box< DIM > & | box, | |||
const tbox::Pointer< pdat::CellData< DIM, double > > | cvol = ((pdat::CellData< DIM, double > *)(0)) | |||
) | const |
Wherever in the index region, set if , and otherwise. If the control volume is NULL, all values in the index set are considered.
int SAMRAI::math::PatchCellDataMiscellaneousOpsReal< DIM, TYPE >::testReciprocal | ( | tbox::Pointer< pdat::CellData< DIM, TYPE > > & | dst, | |
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src, | |||
const hier::Box< DIM > & | box, | |||
const tbox::Pointer< pdat::CellData< DIM, double > > | cvol = ((pdat::CellData< DIM, double > *)(0)) | |||
) | const |
Wherever in the index region, set if , and otherwise. If anywhere, 0 is the return value. Otherwise 1 is returned. If the control volume all values in the index set are considered.
TYPE SAMRAI::math::PatchCellDataMiscellaneousOpsReal< DIM, TYPE >::maxPointwiseDivide | ( | const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | numer, | |
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | denom, | |||
const hier::Box< DIM > & | box | |||
) | const |
Compute max of "conditional" quotients of two arrays.
Return the maximum of pointwise "conditional" quotients of the numerator and denominator.
The "conditional" quotient is defined as |numerator/denominator| where the denominator is nonzero. Otherwise, it is defined as |numerator|.
Note: This method is currently intended to support the PETSc-2.1.6 vector wrapper only. Please do not use it!
TYPE SAMRAI::math::PatchCellDataMiscellaneousOpsReal< DIM, TYPE >::minPointwiseDivide | ( | const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | numer, | |
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | denom, | |||
const hier::Box< DIM > & | box | |||
) | const |
Compute min of quotients of two arrays.
Return the minimum of pointwise quotients of the numerator and denominator.
The quotient is defined as (numerator/denominator) where the denominator is nonzero. When the denominator is zero, the entry is skipped. If the denominator is always zero, the value of tbox::IEEE::getFLT_MAX() is returned (see SAMRAI::tbox::IEEE).
Note: This method is currently intended to support the SUNDIALS vector wrapper only. Please do not use it!