Chombo + EB
3.2
|
Class to describe transformation of indices from one block to another. More...
#include <IndicesTransformation.H>
Public Member Functions | |
IndicesTransformation () | |
null constructor leaves object in undefined state. More... | |
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) |
Class to describe transformation of indices from one block to another.
IndicesTransformation::IndicesTransformation | ( | ) |
null constructor leaves object in undefined state.
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 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]
Referenced by transform(), transformBack(), and transformFwd().
RealVect IndicesTransformation::transformMapped | ( | const RealVect & | a_pointOld, |
const RealVect & | a_dxOld, | ||
const RealVect & | a_dxNew | ||
) | const |
Transform coordinates in mapped space, not an index.
Transform a vector, not an index. There may be permutation of indices and sign change, but no translation.
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().
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.
|
inline |
Apply forward transformation on a Box within a BaseFab.
References transform().
|
inline |
Apply inverse transformation on a Box within a BaseFab.
References transform().
|
inline |
Apply forward or inverse transformation on a Box within a BaseFab.
References BASISV(), Interval::begin(), BaseFab< T >::box(), CH_assert, CH_SPACEDIM, coarsen(), compose(), Box::contains(), BaseFab< T >::dataPtr(), Interval::end(), FortranArrayIndex(), inverse(), Box::isEmpty(), Box::numPts(), BoxIterator::ok(), refine(), Interval::size(), Box::size(), Box::smallEnd(), SpaceDim, transform(), transformWithType(), and Box::type().
IndicesTransformation IndicesTransformation::inverse | ( | ) | const |
Return the inverse transformation.
Referenced by transform().
IndicesTransformation IndicesTransformation::compose | ( | const IndicesTransformation & | a_next | ) | const |
Return the composite transformation: that is, this transformation followed by a_next.
Referenced by transform().
IndicesTransformation IndicesTransformation::coarsen | ( | int | a_refRatio | ) | const |
Return this transformation with index spaces coarsened by a_refRatio.
Referenced by transform().
IndicesTransformation IndicesTransformation::refine | ( | int | a_refRatio | ) | const |
Return this transformation with index spaces refined by a_refRatio.
Referenced by transform().
|
inline |
References m_permutation.
|
inline |
References InitStatics(), and m_translation.
|
static |
Initializes IndicesTransformation::Identity .
Referenced by getTranslation().
|
friend |
|
static |
|
static |
The identity transformation, which has no permutation, no sign change, and no translation.
|
static |
The undefined transformation.
|
protected |
Referenced by getPermutation().
|
protected |
Referenced by getTranslation().