Chombo + EB + MF  3.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CoordTransform Class Reference

Coordinate transformations. More...

#include <FourthOrderMappedFineInterpSup.H>

Public Member Functions

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

Private Member Functions

int sign (const int a_i) const
 Sign function. More...
 

Private Attributes

int m_xctm [2 *SpaceDim]
 

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.

Constructor & Destructor Documentation

◆ CoordTransform() [1/3]

CoordTransform::CoordTransform ( )
inline

Default constructor.

Parameters
[in]a_ctmCompact description of the transformation

References m_xctm, and SpaceDim.

◆ CoordTransform() [2/3]

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

Constructor taking a compact description of the transformation.

Parameters
[in]a_ctmCompact description of the transformation

References expand().

◆ CoordTransform() [3/3]

CoordTransform::CoordTransform ( const CoordTransform a_ct)
inline

Copy constructor.

Parameters
[in]a_ctCoordTransform to copy

References m_xctm, and SpaceDim.

Member Function Documentation

◆ operator=()

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

Assignment.

Parameters
[in]a_ctCoordTransform to copy
Returns
Updated with assignment

References m_xctm, and SpaceDim.

◆ expand()

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

Defines the transformation by expanding a compact description.

Parameters
[in]a_ctmCompact description of the transformation

References m_xctm, sign(), and SpaceDim.

Referenced by CoordTransform().

◆ transform()

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

Transforms an IntVect to the transformed space.

Parameters
[in]a_ivIntVect to transform
Returns
Tranformed IntVect

References m_xctm.

◆ indexAt()

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

Returns the transformed direction associated with direction 'i'.

Parameters
[in]a_iInput direction
Returns
Transformed direction

References m_xctm.

◆ signAt()

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

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

Parameters
[in]a_iInput direction
Returns
Sign associated with transformation

References m_xctm.

◆ xctm()

const int * CoordTransform::xctm ( ) const
inline

Returns the expanded transformation description.

Returns
Exanded transformation decsription

References m_xctm.

◆ reverse()

void CoordTransform::reverse ( )
inline

Reverse the transformation to the other way.

References m_xctm, and SpaceDim.

◆ sign()

int CoordTransform::sign ( const int  a_i) const
inlineprivate

Sign function.

Referenced by expand().

Member Data Documentation

◆ m_xctm

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: