#include <source/mathops/cell/PatchCellDataBasicOps.h>
Inheritance diagram for SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >:
Public Member Functions | |
PatchCellDataBasicOps () | |
virtual | ~PatchCellDataBasicOps () |
void | scale (tbox::Pointer< pdat::CellData< DIM, TYPE > > &dst, const TYPE &alpha, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src, const hier::Box< DIM > &box) const |
void | addScalar (tbox::Pointer< pdat::CellData< DIM, TYPE > > &dst, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src, const TYPE &alpha, const hier::Box< DIM > &box) const |
void | add (tbox::Pointer< pdat::CellData< DIM, TYPE > > &dst, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src1, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src2, const hier::Box< DIM > &box) const |
void | subtract (tbox::Pointer< pdat::CellData< DIM, TYPE > > &dst, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src1, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src2, const hier::Box< DIM > &box) const |
void | multiply (tbox::Pointer< pdat::CellData< DIM, TYPE > > &dst, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src1, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src2, const hier::Box< DIM > &box) const |
void | divide (tbox::Pointer< pdat::CellData< DIM, TYPE > > &dst, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src1, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src2, const hier::Box< DIM > &box) const |
void | reciprocal (tbox::Pointer< pdat::CellData< DIM, TYPE > > &dst, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src, const hier::Box< DIM > &box) const |
void | linearSum (tbox::Pointer< pdat::CellData< DIM, TYPE > > &dst, const TYPE &alpha, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src1, const TYPE &beta, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src2, const hier::Box< DIM > &box) const |
void | axpy (tbox::Pointer< pdat::CellData< DIM, TYPE > > &dst, const TYPE &alpha, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src1, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src2, const hier::Box< DIM > &box) const |
void | axmy (tbox::Pointer< pdat::CellData< DIM, TYPE > > &dst, const TYPE &alpha, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src1, const tbox::Pointer< pdat::CellData< DIM, TYPE > > &src2, const hier::Box< DIM > &box) const |
TYPE | min (const tbox::Pointer< pdat::CellData< DIM, TYPE > > &data, const hier::Box< DIM > &box) const |
TYPE | max (const tbox::Pointer< pdat::CellData< DIM, TYPE > > &data, const hier::Box< DIM > &box) const |
void | setRandomValues (tbox::Pointer< pdat::CellData< DIM, TYPE > > &dst, const TYPE &width, const TYPE &low, const hier::Box< DIM > &box) const |
These operations typically apply only to the numerical standard built-in types, such as double, float, and int, and the complex type (which may or may not be a built-in type depending on the C++ compiler). Thus, this templated class should only be used to instantiate objects with those types as the template parameter. None of the operations are implemented for any other type.
SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >::PatchCellDataBasicOps | ( | ) |
Empty constructor and destructor.
SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >::~PatchCellDataBasicOps | ( | ) | [virtual] |
void SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >::scale | ( | tbox::Pointer< pdat::CellData< DIM, TYPE > > & | dst, | |
const TYPE & | alpha, | |||
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src, | |||
const hier::Box< DIM > & | box | |||
) | const |
Set dst = alpha * src, elementwise.
void SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >::addScalar | ( | tbox::Pointer< pdat::CellData< DIM, TYPE > > & | dst, | |
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src, | |||
const TYPE & | alpha, | |||
const hier::Box< DIM > & | box | |||
) | const |
Set dst = src + alpha, elementwise.
void SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >::add | ( | tbox::Pointer< pdat::CellData< DIM, TYPE > > & | dst, | |
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src1, | |||
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src2, | |||
const hier::Box< DIM > & | box | |||
) | const |
Set dst = src1 + src2, elementwise.
void SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >::subtract | ( | tbox::Pointer< pdat::CellData< DIM, TYPE > > & | dst, | |
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src1, | |||
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src2, | |||
const hier::Box< DIM > & | box | |||
) | const |
Set dst = src1 - src2, elementwise.
void SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >::multiply | ( | tbox::Pointer< pdat::CellData< DIM, TYPE > > & | dst, | |
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src1, | |||
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src2, | |||
const hier::Box< DIM > & | box | |||
) | const |
Set dst = src1 * src2, elementwise.
void SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >::divide | ( | tbox::Pointer< pdat::CellData< DIM, TYPE > > & | dst, | |
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src1, | |||
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src2, | |||
const hier::Box< DIM > & | box | |||
) | const |
Set dst = src1 / src2, elementwise. No check for division by zero.
void SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >::reciprocal | ( | tbox::Pointer< pdat::CellData< DIM, TYPE > > & | dst, | |
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src, | |||
const hier::Box< DIM > & | box | |||
) | const |
Set dst = 1 / src, elementwise. No check for division by zero.
void SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >::linearSum | ( | tbox::Pointer< pdat::CellData< DIM, TYPE > > & | dst, | |
const TYPE & | alpha, | |||
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src1, | |||
const TYPE & | beta, | |||
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src2, | |||
const hier::Box< DIM > & | box | |||
) | const |
Set dst = alpha * src1 + beta * src2, elementwise.
void SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >::axpy | ( | tbox::Pointer< pdat::CellData< DIM, TYPE > > & | dst, | |
const TYPE & | alpha, | |||
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src1, | |||
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src2, | |||
const hier::Box< DIM > & | box | |||
) | const |
Set dst = alpha * src1 + src2, elementwise.
void SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >::axmy | ( | tbox::Pointer< pdat::CellData< DIM, TYPE > > & | dst, | |
const TYPE & | alpha, | |||
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src1, | |||
const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | src2, | |||
const hier::Box< DIM > & | box | |||
) | const |
Set dst = alpha * src1 - src2, elementwise.
TYPE SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >::min | ( | const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | data, | |
const hier::Box< DIM > & | box | |||
) | const |
Return the minimum patch data component entry When the data is complex, the result is the data element with the smallest norm.
TYPE SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >::max | ( | const tbox::Pointer< pdat::CellData< DIM, TYPE > > & | data, | |
const hier::Box< DIM > & | box | |||
) | const |
Return the maximum patch data component entry When the data is complex, the result is the data element with the largest norm.
void SAMRAI::math::PatchCellDataBasicOps< DIM, TYPE >::setRandomValues | ( | tbox::Pointer< pdat::CellData< DIM, TYPE > > & | dst, | |
const TYPE & | width, | |||
const TYPE & | low, | |||
const hier::Box< DIM > & | box | |||
) | const |
Set patch data to random values. See the operations in the ArrayDataBasicOps<DIM> class for details on the generation of the random values for each data type.