CoordTransform Class Reference

#include <FourthOrderMappedFineInterpSup.H>

List of all members.


Detailed Description

Coordinate transformations.

Provides for coordinate transformations. The transformation is input in compact form where a vector of size SpaceDim describes for each direction, the corresponding direction (including sign) in transformed space. Directions are number from 1, e.g., [-2, -1, -3] transforms i -> -j, j -> -i, and k -> -k. For transformation of IntVects, all coordinate systems are "fixed" at cell IntVect::Zero such that the transformation of IntVect::Zero is also IntVect::Zero. See http://www.grc.nasa.gov/WWW/cgns/sids/cnct.html#GridConnectivity1to1 for a more detailed explanation on transformations.

Note:
  • The transformation description can be passed to Chombo Fortran as a 1-D array
    CHF_CONST_I1D(ct.xctm(), 2*SpaceDim) 
    and then used with a routine that duplicates CoordTransform::transform.

Public Member Functions

 CoordTransform ()
 Default constructor.
 CoordTransform (const int *const a_ctm)
 Constructor taking a compact description of the transformation.
 CoordTransform (const CoordTransform &a_ct)
 Copy constructor.
CoordTransformoperator= (const CoordTransform &a_ct)
 Assignment.
void expand (const int *const a_ctm)
 Defines the transformation by expanding a compact description.
IntVect transform (const IntVect &a_iv) const
 Transforms an IntVect to the transformed space.
int indexAt (const int a_i) const
 Returns the transformed direction associated with direction 'i'.
int signAt (const int a_i) const
 Returns the sign of the transformation associated with direction 'i'.
const int * xctm () const
 Returns the expanded transformation description.
void reverse ()
 Reverse the transformation to the other way.

Private Member Functions

int sign (const int a_i) const
 Sign function.

Private Attributes

int m_xctm [2 *SpaceDim]

Constructor & Destructor Documentation

CoordTransform::CoordTransform (  )  [inline]

Default constructor.

Parameters:
[in] a_ctm Compact description of the transformation

References m_xctm, and SpaceDim.

CoordTransform::CoordTransform ( const int *const   a_ctm  )  [inline]

Constructor taking a compact description of the transformation.

Parameters:
[in] a_ctm Compact description of the transformation

References expand().

CoordTransform::CoordTransform ( const CoordTransform a_ct  )  [inline]

Copy constructor.

Parameters:
[in] a_ct CoordTransform to copy

References m_xctm, and SpaceDim.


Member Function Documentation

CoordTransform & CoordTransform::operator= ( const CoordTransform a_ct  )  [inline]

Assignment.

Parameters:
[in] a_ct CoordTransform to copy
Returns:
Updated with assignment

References m_xctm, and SpaceDim.

void CoordTransform::expand ( const int *const   a_ctm  )  [inline]

Defines the transformation by expanding a compact description.

Parameters:
[in] a_ctm Compact description of the transformation

References m_xctm, sign(), and SpaceDim.

Referenced by CoordTransform().

IntVect CoordTransform::transform ( const IntVect a_iv  )  const [inline]

Transforms an IntVect to the transformed space.

Parameters:
[in] a_iv IntVect to transform
Returns:
Tranformed IntVect

References m_xctm.

int CoordTransform::indexAt ( const int  a_i  )  const [inline]

Returns the transformed direction associated with direction 'i'.

Parameters:
[in] a_i Input direction
Returns:
Transformed direction

References m_xctm.

int CoordTransform::signAt ( const int  a_i  )  const [inline]

Returns the sign of the transformation associated with direction 'i'.

Parameters:
[in] a_i Input direction
Returns:
Sign associated with transformation

References m_xctm.

const int * CoordTransform::xctm (  )  const [inline]

Returns the expanded transformation description.

Returns:
Exanded transformation decsription

References m_xctm.

void CoordTransform::reverse (  )  [inline]

Reverse the transformation to the other way.

References m_xctm, and SpaceDim.

int CoordTransform::sign ( const int  a_i  )  const [inline, private]

Sign function.

Referenced by expand().


Member Data Documentation

int CoordTransform::m_xctm[2 *SpaceDim] [private]

An expanded description of the transformation. For direction i: m_xctm[2*i] = new direction m_xctm[2*i+1] = sign

Referenced by CoordTransform(), expand(), indexAt(), operator=(), reverse(), signAt(), transform(), and xctm().


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

Generated on Wed Mar 29 03:26:57 2017 for Chombo + EB + MF by  doxygen 1.5.5