IndicesTransformation Class Reference

#include <IndicesTransformation.H>

List of all members.


Detailed Description

Class to describe transformation of indices from one block to another.

Public Member Functions

 IndicesTransformation ()
 null constructor leaves object in undefined state.
 IndicesTransformation (const IntVect &a_permutation, const IntVect &a_sign, const IntVect &a_translation)
void define (const IntVect &a_permutation, const IntVect &a_sign, const IntVect &a_translation)
void defineFromSwap (int a_ind1, int a_ind2)
void defineFromTranslation (const IntVect &a_translation)
void defineFromPivot (const IntVect &a_pivotOld, const IntVect &a_pivotNew, const IntVect &a_permutation, const IntVect &a_sign)
void defineFromFaces (const Box &a_srcBox, int a_srcDim, Side::LoHiSide a_srcSide, const Box &a_dstBox, int a_dstDim, Side::LoHiSide a_dstSide, const IntVect &a_sign=IntVect::Unit)
bool isDefined () const
bool operator== (const IndicesTransformation &a_itOther) const
bool operator!= (const IndicesTransformation &a_itOther) const
IntVect transformFwd (const IntVect &a_ivOld) const
IntVect transformBack (const IntVect &a_ivNew) const
IntVect transform (const IntVect &a_iv, bool a_forward=true) const
IntVect transformNode (const IntVect &a_iv) const
RealVect transformMapped (const RealVect &a_pointOld, const RealVect &a_dxOld, const RealVect &a_dxNew) const
IntVect transformVectorFwd (const IntVect &a_vecOld) const
IntVect transformVectorBack (const IntVect &a_vecNew) const
IntVect transformVector (const IntVect &a_vec, bool a_forward=true) const
IntVect transformWithType (const IntVect &a_iv, const IntVect &a_tp, bool a_forward=true) const
IntVect transformType (const IntVect &a_tp, bool a_forward=true) const
Box transformFwd (const Box &a_bxOld) const
Box transformBack (const Box &a_bxNew) const
Box transform (const Box &a_bx, bool a_forward=true) const
template<typename T>
void transformFwd (BaseFab< T > &a_dstFab, const BaseFab< T > &a_srcFab, const Box &a_srcBox, const Interval &a_dstIntvl, const Interval &a_srcIntvl) const
template<typename T>
void transformBack (BaseFab< T > &a_dstFab, const BaseFab< T > &a_srcFab, const Box &a_srcBox, const Interval &a_dstIntvl, const Interval &a_srcIntvl) const
template<typename T>
void transform (BaseFab< T > &a_dstFab, const BaseFab< T > &a_srcFab, const Box &a_srcBox, const Interval &a_dstIntvl, const Interval &a_srcIntvl, bool a_forward=true) const
IndicesTransformation inverse () const
IndicesTransformation compose (const IndicesTransformation &a_next) const
IndicesTransformation coarsen (int a_refRatio) const
IndicesTransformation refine (int a_refRatio) const
IntVect getPermutation () const
IntVect getSign () const
IntVect getTranslation () const

Static Public Member Functions

static int InitStatics ()

Static Public Attributes

static const IntVect NoPermutation
static const IndicesTransformation Identity
static const IndicesTransformation Undefined

Protected Attributes

IntVect m_permutation
IntVect m_sign
IntVect m_translation

Friends

std::ostream & operator<< (std::ostream &a_os, const IndicesTransformation &a_it)

Constructor & Destructor Documentation

IndicesTransformation::IndicesTransformation (  ) 

null constructor leaves object in undefined state.

IndicesTransformation::IndicesTransformation ( const IntVect a_permutation,
const IntVect a_sign,
const IntVect a_translation 
)

Constructor.

IntVect pOld: indices of a cell in old index space IntVect pNew: indices of the same cell in new index space

Then for each direction idir: pNew[idir] = a_sign[idir]*pOld[a_permutation[idir]] + a_translation[idir].


Member Function Documentation

void IndicesTransformation::define ( const IntVect a_permutation,
const IntVect a_sign,
const IntVect a_translation 
)

void IndicesTransformation::defineFromSwap ( int  a_ind1,
int  a_ind2 
)

void IndicesTransformation::defineFromTranslation ( const IntVect a_translation  ) 

void IndicesTransformation::defineFromPivot ( const IntVect a_pivotOld,
const IntVect a_pivotNew,
const IntVect a_permutation,
const IntVect a_sign 
)

void IndicesTransformation::defineFromFaces ( const Box a_srcBox,
int  a_srcDim,
Side::LoHiSide  a_srcSide,
const Box a_dstBox,
int  a_dstDim,
Side::LoHiSide  a_dstSide,
const IntVect a_sign = IntVect::Unit 
)

bool IndicesTransformation::isDefined (  )  const

bool IndicesTransformation::operator== ( const IndicesTransformation a_itOther  )  const

bool IndicesTransformation::operator!= ( const IndicesTransformation a_itOther  )  const

IntVect IndicesTransformation::transformFwd ( const IntVect a_ivOld  )  const

IntVect pOld: indices of a cell in old index space IntVect pNew: indices of the same cell in new index space

Then for each direction idir: pNew[idir] = m_sign[idir]*pOld[m_permutation[idir]] + m_translation[idir] and hence: pOld[m_permutation[idir]] = m_sign[idir]*pNew[idir]

  • m_sign[idir]*m_translation[idir]

IntVect IndicesTransformation::transformBack ( const IntVect a_ivNew  )  const

IntVect IndicesTransformation::transform ( const IntVect a_iv,
bool  a_forward = true 
) const

IntVect IndicesTransformation::transformNode ( const IntVect a_iv  )  const

Transform NODE indices.

RealVect IndicesTransformation::transformMapped ( const RealVect a_pointOld,
const RealVect a_dxOld,
const RealVect a_dxNew 
) const

Transform coordinates in mapped space, not an index.

IntVect IndicesTransformation::transformVectorFwd ( const IntVect a_vecOld  )  const

Transform a vector, not an index. There may be permutation of indices and sign change, but no translation.

IntVect IndicesTransformation::transformVectorBack ( const IntVect a_vecNew  )  const

IntVect IndicesTransformation::transformVector ( const IntVect a_vec,
bool  a_forward = true 
) const

IntVect IndicesTransformation::transformWithType ( const IntVect a_iv,
const IntVect a_tp,
bool  a_forward = true 
) const

Transform indices of either cells or nodes or faces or edges.

Referenced by transform().

IntVect IndicesTransformation::transformType ( const IntVect a_tp,
bool  a_forward = true 
) const

Transform the type of Box: no change if a_tp is the cell type or the node type, but if a face or edge type, then the transformed type may differ.

Box IndicesTransformation::transformFwd ( const Box a_bxOld  )  const

Transform a whole box.

Box IndicesTransformation::transformBack ( const Box a_bxNew  )  const

Box IndicesTransformation::transform ( const Box a_bx,
bool  a_forward = true 
) const

template<typename T>
void IndicesTransformation::transformFwd ( BaseFab< T > &  a_dstFab,
const BaseFab< T > &  a_srcFab,
const Box a_srcBox,
const Interval a_dstIntvl,
const Interval a_srcIntvl 
) const [inline]

Apply forward transformation on a Box within a BaseFab.

References transform().

template<typename T>
void IndicesTransformation::transformBack ( BaseFab< T > &  a_dstFab,
const BaseFab< T > &  a_srcFab,
const Box a_srcBox,
const Interval a_dstIntvl,
const Interval a_srcIntvl 
) const [inline]

Apply inverse transformation on a Box within a BaseFab.

References transform().

template<typename T>
void IndicesTransformation::transform ( BaseFab< T > &  a_dstFab,
const BaseFab< T > &  a_srcFab,
const Box a_srcBox,
const Interval a_dstIntvl,
const Interval a_srcIntvl,
bool  a_forward = true 
) const [inline]

IndicesTransformation IndicesTransformation::inverse (  )  const

Return the inverse transformation.

IndicesTransformation IndicesTransformation::compose ( const IndicesTransformation a_next  )  const

Return the composite transformation: that is, this transformation followed by a_next.

IndicesTransformation IndicesTransformation::coarsen ( int  a_refRatio  )  const

Return this transformation with index spaces coarsened by a_refRatio.

IndicesTransformation IndicesTransformation::refine ( int  a_refRatio  )  const

Return this transformation with index spaces refined by a_refRatio.

IntVect IndicesTransformation::getPermutation (  )  const [inline]

References m_permutation.

IntVect IndicesTransformation::getSign (  )  const [inline]

References m_sign.

IntVect IndicesTransformation::getTranslation (  )  const [inline]

References m_translation.

static int IndicesTransformation::InitStatics (  )  [static]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  a_os,
const IndicesTransformation a_it 
) [friend]


Member Data Documentation

The identity transformation, which has no permutation, no sign change, and no translation.

The undefined transformation.

Referenced by getPermutation().

Referenced by getSign().

Referenced by getTranslation().


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

Generated on Fri Apr 5 04:25:07 2019 for Chombo + EB by  doxygen 1.5.5