IBAMR  IBAMR version 0.19.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SAMRAI::math::PatchNodeDataMiscellaneousOpsReal< DIM, TYPE > Class Template Reference

#include <PatchNodeDataMiscellaneousOpsReal.h>

Inheritance diagram for SAMRAI::math::PatchNodeDataMiscellaneousOpsReal< DIM, TYPE >:
Inheritance graph
[legend]

Public Member Functions

 PatchNodeDataMiscellaneousOpsReal ()
 
virtual ~PatchNodeDataMiscellaneousOpsReal ()
 
int computeConstrProdPos (const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &data1, const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &data2, const hier::Box< DIM > &box, const tbox::Pointer< pdat::NodeData< DIM, double > > cvol=((pdat::NodeData< DIM, double > *) NULL)) const
 
void compareToScalar (tbox::Pointer< pdat::NodeData< DIM, TYPE > > &dst, const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &src, const TYPE &alpha, const hier::Box< DIM > &box, const tbox::Pointer< pdat::NodeData< DIM, double > > cvol=((pdat::NodeData< DIM, double > *) NULL)) const
 
int testReciprocal (tbox::Pointer< pdat::NodeData< DIM, TYPE > > &dst, const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &src, const hier::Box< DIM > &box, const tbox::Pointer< pdat::NodeData< DIM, double > > cvol=((pdat::NodeData< DIM, double > *) NULL)) const
 
TYPE maxPointwiseDivide (const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &numer, const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &denom, const hier::Box< DIM > &box) const
 Compute max of "conditional" quotients of two arrays. More...
 
TYPE minPointwiseDivide (const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &numer, const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &denom, const hier::Box< DIM > &box) const
 Compute min of quotients of two arrays. More...
 

Private Member Functions

 PatchNodeDataMiscellaneousOpsReal (const PatchNodeDataMiscellaneousOpsReal< DIM, TYPE > &)
 
void operator= (const PatchNodeDataMiscellaneousOpsReal< DIM, TYPE > &)
 

Private Attributes

ArrayDataMiscellaneousOpsReal< DIM, TYPE > d_array_ops
 

Detailed Description

template<int DIM, class TYPE>
class SAMRAI::math::PatchNodeDataMiscellaneousOpsReal< DIM, TYPE >

Class PatchNodeDataMiscellaneousOpsReal<DIM> provides access to a collection of operations that may be applied to numerical node-centered patch data of type double and float. The primary intent of this class is to provide the interface to these operations for the class PatchNodeDataOpsReal<DIM> which provides access to a more complete set of operations that may be used to manipulate node-centered patch data. Each member function accepts a box argument indicating the region of index space on which the operation should be performed. The operation will be performed on the intersection of this box and those boxes corresponding to the patch data objects. Also, each operation allows an additional node-centered patch data object to be used to represent a control volume that weights the contribution of each data entry in the given norm calculation. Note that the control volume patch data must be of type double and have node-centered geometry (i.e., the same as the data itself). The use of control volumes is important when these operations are used in vector kernels where the data resides over multiple levels of spatial resolution in an AMR hierarchy. If the control volume is not given in the function call, it will be ignored in the calculation. Also, note that the depth of the control volume patch data object must be either 1 or be equal to the depth of the other data objects.

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.

See also
math::ArrayDataMiscellaneousOpsReal

Constructor & Destructor Documentation

◆ PatchNodeDataMiscellaneousOpsReal() [1/2]

Empty constructor and destructor.

◆ ~PatchNodeDataMiscellaneousOpsReal()

template<int DIM, class TYPE >
virtual SAMRAI::math::PatchNodeDataMiscellaneousOpsReal< DIM, TYPE >::~PatchNodeDataMiscellaneousOpsReal ( )
virtual

◆ PatchNodeDataMiscellaneousOpsReal() [2/2]

template<int DIM, class TYPE >
SAMRAI::math::PatchNodeDataMiscellaneousOpsReal< DIM, TYPE >::PatchNodeDataMiscellaneousOpsReal ( const PatchNodeDataMiscellaneousOpsReal< DIM, TYPE > &  )
private

Member Function Documentation

◆ computeConstrProdPos()

template<int DIM, class TYPE >
int SAMRAI::math::PatchNodeDataMiscellaneousOpsReal< DIM, TYPE >::computeConstrProdPos ( const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &  data1,
const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &  data2,
const hier::Box< DIM > &  box,
const tbox::Pointer< pdat::NodeData< DIM, double > >  cvol = ((pdat::NodeData< DIM, double > *) NULL) 
) const

Return 1 if \(\|data2_i\| > 0\) and \(data1_i * data2_i \leq 0\), for any \(i\) in the index region, where \(cvol_i > 0\). Otherwise return 0. If the control volume is NULL, all values in the index set are used.

◆ compareToScalar()

template<int DIM, class TYPE >
void SAMRAI::math::PatchNodeDataMiscellaneousOpsReal< DIM, TYPE >::compareToScalar ( tbox::Pointer< pdat::NodeData< DIM, TYPE > > &  dst,
const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &  src,
const TYPE &  alpha,
const hier::Box< DIM > &  box,
const tbox::Pointer< pdat::NodeData< DIM, double > >  cvol = ((pdat::NodeData< DIM, double > *) NULL) 
) const

Wherever \(cvol_i > 0\) in the index region, set \(dst_i = 1\) if \(\|src_i\| > \alpha\), and \(dst_i = 0\) otherwise. If the control volume is NULL, all values in the index set are considered.

◆ testReciprocal()

template<int DIM, class TYPE >
int SAMRAI::math::PatchNodeDataMiscellaneousOpsReal< DIM, TYPE >::testReciprocal ( tbox::Pointer< pdat::NodeData< DIM, TYPE > > &  dst,
const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &  src,
const hier::Box< DIM > &  box,
const tbox::Pointer< pdat::NodeData< DIM, double > >  cvol = ((pdat::NodeData< DIM, double > *) NULL) 
) const

Wherever \(cvol_i > 0\) in the index region, set \(dst_i = 1/src_i\) if \(src_i \neq 0\), and \(dst_i = 0\) otherwise. If \(dst_i = 0\) anywhere, 0 is the return value. Otherwise 1 is returned. If the control volume all values in the index set are considered.

◆ maxPointwiseDivide()

template<int DIM, class TYPE >
TYPE SAMRAI::math::PatchNodeDataMiscellaneousOpsReal< DIM, TYPE >::maxPointwiseDivide ( const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &  numer,
const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &  denom,
const hier::Box< DIM > &  box 
) const

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!

◆ minPointwiseDivide()

template<int DIM, class TYPE >
TYPE SAMRAI::math::PatchNodeDataMiscellaneousOpsReal< DIM, TYPE >::minPointwiseDivide ( const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &  numer,
const tbox::Pointer< pdat::NodeData< DIM, TYPE > > &  denom,
const hier::Box< DIM > &  box 
) const

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!

◆ operator=()

template<int DIM, class TYPE >
void SAMRAI::math::PatchNodeDataMiscellaneousOpsReal< DIM, TYPE >::operator= ( const PatchNodeDataMiscellaneousOpsReal< DIM, TYPE > &  )
private

Member Data Documentation

◆ d_array_ops

template<int DIM, class TYPE >
ArrayDataMiscellaneousOpsReal<DIM,TYPE> SAMRAI::math::PatchNodeDataMiscellaneousOpsReal< DIM, TYPE >::d_array_ops
private

The documentation for this class was generated from the following file: