CodimBox< S > Class Template Reference

#include <CodimBox.H>

List of all members.


Detailed Description

template<class S>
class CodimBox< S >

An FArrayBox container for storage on the codimensions of a box.

The orientation of a box is described by specifying the orthogonal directions and internally, this is converted to a bit representation. Direction 'i' is bit 2^i (or via shifting as 1 << i). Directions can be specified in any order. For example, the edges in 3D orthogonal to directions i and j may be specified as (0, 1) or (1, 0). Internally, both are converted to 0x3. Orientations can be described by sequential indices or bit representations. The routines seq2bit and bit2seq can be used to switch between the two using lookup tables.

For example, a 3 dimensional space has the following codimensions, bit representations, and sequential indices of the orientations:

 *         Codim   Bit   Integer   Sequential   numOrient   totOrient
 *   Dir           zyx
 *             0   000         0            0           1           0
 *             1   001         1            0           3           1
 *             1   010         2            1
 *             1   100         4            2
 *             2   011         3            0           3           4
 *             2   101         5            1
 *             2   110         6            2
 *             3   111         7            0           1           7
 *                                                                  
The 'indexFAB' and 'bitOrient' are then defined as follows:
 *     indexFAB:  0 0 1 0 2 1 2 0
 *     bitOrient: 0 1 2 4 3 5 6 7
 *                                                                  
Note:
  • CodimBoxFactory is also defined in this file for use with BoxLayoutData and similar containers
  • A FluxBox is essentially a CodimBox with codimension 1.
  • Not much functionality exists in this class beyond creating and retrieving the FArrayBoxes.
  • Codimension 0 is the original object spanning 'SpaceDim' dimensions. Using this is no different from an FArrayBox itself.
  • Codimension 'SpaceDim' is a vertex. This is also the same as an FArrayBox that surrounds all nodes.

Public Types

enum  { numCD = SpaceDim + 1, numAI = 1 << SpaceDim }

Public Member Functions

 CodimBox ()
 Default constructor.
 CodimBox (const int a_codim, const Box &a_box, const int a_nvar)
 Full constructor.
 ~CodimBox ()
 Destructor.
void define (const int a_codim, const Box &a_box, const int a_nvar)
 Full define function.
void define (const Box &a_box, int a_nvar)
 Define function.
void clear ()
 Deallocate.
int getCodim () const
 Return the codimension.
int nComp () const
 Number of components.
int getNumOrient () const
 Number of different orientations of codimensional objects.
int bit2seq (const unsigned a_bOrient) const
unsigned seq2bit (const int a_iOrient) const
int getDirection (const int a_iOrient, int a_i) const
 Get the 'i'th orthogonal direction of an orientation.
void getDirections (const int a_iOrient, int *const a_dir) const
 Get all the orthogonal directions of an orientation.
const Boxbox () const
 Returns cell-centered box which defines the CodimBox.
const S & operator() (const Box &a_box) const
 Returns S in the directions defined by a Box.
S & operator() (const Box &a_box)
 Returns S in the directions defined by a Box.
const S & operator() (const IndexType &a_ixType) const
 Returns S in the directions defined by an IndexType.
S & operator() (const IndexType &a_ixType)
const S & getSequential (const int a_iOrient) const
 Returns S from a sequential index.
S & getSequential (const int a_iOrient)
void setVal (const Real a_x)
 Set all values in all FAB.
Box orientBox (const int a_iOrient) const
Box orientBox (const int a_iOrient, const Box &a_cbox) const
Accessor functions (1 for each codimension)
Parameters:
[in] a_dir0-a_dir5 The orthogonal directions define the orientation of the codimensional geometry. Directions can be specified in any order. For example, the edges in 3D orthogonal to directions i and j may be specified as (0, 1) or (1, 0). The individual directions should be unique but assertions are only implemented for codimensions <= 3.


const S & operator() () const
 Returns S in the given direction (codimension 0).
S & operator() ()
const S & operator() (const int a_dir0) const
 Returns S in the given direction (codimension 1).
S & operator() (const int a_dir0)
const S & operator() (const int a_dir0, const int a_dir1) const
 Returns S in the given direction (codimension 2).
S & operator() (const int a_dir0, const int a_dir1)
const S & operator() (const int a_dir0, const int a_dir1, const int a_dir2) const
 Returns S in the given direction (codimension 3).
S & operator() (const int a_dir0, const int a_dir1, const int a_dir2)
const S & operator() (const int a_dir0, const int a_dir1, const int a_dir2, const int a_dir3) const
 Returns S in the given direction (codimension 4).
S & operator() (const int a_dir0, const int a_dir1, const int a_dir2, const int a_dir3)
const S & operator() (const int a_dir0, const int a_dir1, const int a_dir2, const int a_dir3, const int a_dir4) const
 Returns S in the given direction (codimension 5).
S & operator() (const int a_dir0, const int a_dir1, const int a_dir2, const int a_dir3, const int a_dir4)
const S & operator() (const int a_dir0, const int a_dir1, const int a_dir2, const int a_dir3, const int a_dir4, const int a_dir5) const
 Returns S in the given direction (codimension 6).
S & operator() (const int a_dir0, const int a_dir1, const int a_dir2, const int a_dir3, const int a_dir4, const int a_dir5)
Functions for compatability with containers like
BoxLayoutData.h

void copy (const Box &a_R, const Interval &a_Cd, const CodimBox &a_src, const Interval &a_Cs)
 Copy from another CodimBox.
void copy (const Box &a_Rs, const Interval &a_Cd, const Box &a_Rd, const CodimBox &a_src, const Interval &a_Cs)
 Copy from another CodimBox but to a different region.
int size (const Box &a_R, const Interval &a_comps) const
 Returns size of serialized data.
void linearOut (void *a_buf, const Box &a_R, const Interval &a_comps) const
 Writes a serialized representation of this CodimBox.
void linearIn (void *a_buf, const Box &a_R, const Interval &a_comps)
 Reads a serialized representation of this CodimBox.

Static Public Member Functions

static void initialize ()
 Initialize static lookup tables.
static int getNumOrient (const int a_codim)
static unsigned seq2bit (const int a_codim, const int a_iOrient)
static void getDirections (const int a_codim, const int a_iOrient, int *const a_dir)
static Box orientBox (const int a_codim, const int a_iOrient, const Box &a_cbox)
static int preAllocatable ()
 Report preallocation capability as non-static but symmetric.

Static Protected Attributes

static int numOrient [numCD]
static int totOrient [numCD]
static unsigned bitOrient [CodimBox::numAI]
static int indexFAB [CodimBox::numAI]

Private Member Functions

 CodimBox (const CodimBox &)
CodimBoxoperator= (const CodimBox &)
S & getS (const unsigned i)
 Return the FArray box from a bit description of the orientation.
const S & getS (const unsigned i) const
 Return the FArray box from a bit description of the orientation.

Static Private Member Functions

static bool isInitialized ()
 Check that static arrays are initialized.
static void genGetDirections (const int a_codim, int a_bOrient, int *const a_dir)
 Get all the orthogonal directions of an orientation (general).
static Box genOrientBox (int a_bOrient, Box a_cbox)

Private Attributes

Box m_box
int m_codim
int m_nvar
 Number of components in the S.
Vector< S * > m_S
 The Ses for each orientation.

Member Enumeration Documentation

template<class S>
anonymous enum

Enumerator:
numCD  Number of codimensions.
numAI  Total orientations (array indices) for all codimensions


Constructor & Destructor Documentation

template<typename S>
CodimBox< S >::CodimBox (  )  [inline]

Default constructor.

The codimension can be set by the 'define' function

References CodimBox< S >::initialize().

template<typename S>
CodimBox< S >::CodimBox ( const int  a_codim,
const Box a_box,
const int  a_nvar 
) [inline]

Full constructor.

Parameters:
[in] a_codim The codimension intended for the object
[in] a_box The cell centered box for the FArrays
[in] a_nvar The number of components for the FArrays

References CodimBox< S >::define(), and CodimBox< S >::initialize().

template<typename S>
CodimBox< S >::~CodimBox (  )  [inline]

Destructor.

References CodimBox< S >::clear().

template<class S>
CodimBox< S >::CodimBox ( const CodimBox< S > &   )  [private]


Member Function Documentation

template<typename S>
void CodimBox< S >::initialize (  )  [inline, static]

Initialize static lookup tables.

Construct lookup tables that give the index of the appropriate S for a given codimension and orientation. This function is only called once to initialize the static lookup tables. The constructors will call initialize but if any static members are used before construction, it must be called manually. See class CodimBox for more information on the lookup tables.

References CodimBox< S >::bitOrient, CodimBox< S >::indexFAB, CodimBox< S >::numAI, CodimBox< S >::numCD, CodimBox< S >::numOrient, and CodimBox< S >::totOrient.

Referenced by CodimBox< S >::CodimBox().

template<typename S>
void CodimBox< S >::define ( const int  a_codim,
const Box a_box,
const int  a_nvar 
) [inline]

Full define function.

Define function allocates space.

Parameters:
[in] a_codim The codimension intended for the object
[in] a_box The cell centered box for the FArrays
[in] a_nvar The number of components for the FArrays

References CH_assert, CodimBox< S >::m_codim, and SpaceDim.

Referenced by CodimBox< S >::CodimBox().

template<typename S>
void CodimBox< S >::define ( const Box a_box,
int  a_nvar 
) [inline]

Define function.

Define function allocates space.

Codimension set by constructor

Parameters:
[in] a_box The cell centered box for the FArrays
[in] a_nvar The number of components for the FArrays

References CH_assert, CodimBox< S >::clear(), CodimBox< S >::m_box, CodimBox< S >::m_codim, CodimBox< S >::m_nvar, CodimBox< S >::m_S, CodimBox< S >::numOrient, CodimBox< S >::orientBox(), and Vector< T >::resize().

template<typename S>
void CodimBox< S >::clear (  )  [inline]

template<typename S>
int CodimBox< S >::getCodim (  )  const [inline]

Return the codimension.

References CodimBox< S >::m_codim.

template<typename S>
int CodimBox< S >::nComp (  )  const [inline]

Number of components.

References CodimBox< S >::m_nvar.

template<typename S>
int CodimBox< S >::getNumOrient (  )  const [inline]

Number of different orientations of codimensional objects.

References CodimBox< S >::m_codim, and CodimBox< S >::numOrient.

template<typename S>
int CodimBox< S >::getNumOrient ( const int  a_codim  )  [inline, static]

Number of different orientations of codimensional objects. Used externally for any codimension.

Number of different orientations of codimensional objects. Used externally for any codimension.

References CH_assert, and CodimBox< S >::numOrient.

template<typename S>
int CodimBox< S >::bit2seq ( const unsigned  a_bOrient  )  const [inline]

Switch from a bit orientation to a sequential index of the orientation

Switch from a bit orientation to a sequential index of the orientation

References CodimBox< S >::indexFAB.

Referenced by CodimBox< S >::getS().

template<typename S>
unsigned CodimBox< S >::seq2bit ( const int  a_iOrient  )  const [inline]

Switch from a sequential index to a bit representation of the orientation

Switch from a sequential index to a bit representation of the orientation

References CodimBox< S >::bitOrient, CodimBox< S >::m_codim, and CodimBox< S >::totOrient.

Referenced by CodimBox< S >::getDirection(), CodimBox< S >::getDirections(), and CodimBox< S >::orientBox().

template<typename S>
unsigned CodimBox< S >::seq2bit ( const int  a_codim,
const int  a_iOrient 
) [inline, static]

Switch from a sequential index to a bit representation of the orientation for any codimension

Switch from a sequential index to a bit representation of the orientation for any codimension

References CodimBox< S >::bitOrient, CH_assert, and CodimBox< S >::totOrient.

template<typename S>
int CodimBox< S >::getDirection ( const int  a_iOrient,
int  a_i 
) const [inline]

Get the 'i'th orthogonal direction of an orientation.

Parameters:
[in] a_iOrient The sequential orientation index from which to get the directions
[in] a_i The 'i'th direction. 0 <= a_i < m_codim
Returns:
An integer defining the requested direction 0 <= return < SpaceDim
Note:
  • The directions are orderd from smallest to largest so a_i = 0 always returns the smallest direction.

References CH_assert, CodimBox< S >::m_codim, and CodimBox< S >::seq2bit().

template<typename S>
void CodimBox< S >::getDirections ( const int  a_iOrient,
int *const   a_dir 
) const [inline]

Get all the orthogonal directions of an orientation.

Parameters:
[in] a_iOrient The sequential orientation index from which to get the directions
[in] a_dir Array with minimum size [m_codim]
[out] a_dir Integers defining the directions 0 <= dir[i] < SpaceDim
Note:
  • The directions are orderd from smallest to largest.

References CodimBox< S >::genGetDirections(), CodimBox< S >::m_codim, and CodimBox< S >::seq2bit().

template<typename S>
void CodimBox< S >::getDirections ( const int  a_codim,
const int  a_iOrient,
int *const   a_dir 
) [inline, static]

Get all the orthogonal directions of an orientation. Used externally for any codimension.

Get all the orthogonal directions of an orientation. Used externally for any codimension.

Parameters:
[in] a_codim The codimension
[in] a_iOrient The sequential orientation index from which to get the directions
[in] a_dir Array with minimum size [m_codim]
[out] a_dir Integers defining the directions 0 <= dir[i] < SpaceDim
Note:
  • The directions are orderd from smallest to largest.

References CH_assert, CodimBox< S >::genGetDirections(), and CodimBox< S >::seq2bit().

template<typename S>
const Box & CodimBox< S >::box (  )  const [inline]

Returns cell-centered box which defines the CodimBox.

References CodimBox< S >::m_box.

template<class S>
const S& CodimBox< S >::operator() ( const Box a_box  )  const

Returns S in the directions defined by a Box.

template<typename S>
S & CodimBox< S >::operator() ( const Box a_box  )  [inline]

Returns S in the directions defined by a Box.

References Box::ixType(), and CodimBox< S >::operator()().

template<typename S>
const S & CodimBox< S >::operator() ( const IndexType a_ixType  )  const [inline]

Returns S in the directions defined by an IndexType.

Parameters:
[in] a_ixType Box index type which must define exactly m_codim directions as 'NODE' Returns S in the directions defined by an IndexType

References CH_assert, CodimBox< S >::getS(), CodimBox< S >::m_codim, and SpaceDim.

template<typename S>
S & CodimBox< S >::operator() ( const IndexType a_ixType  )  [inline]

template<typename S>
const S & CodimBox< S >::operator() (  )  const [inline]

Returns S in the given direction (codimension 0).

Returns S in the given direction (codimension 0 or SpaceDim).

Formally this operator is for codimension 0 objects but it is also allowed for codimension 'SpaceDim' objects since there is also only one codimension object (the vertices) in that case. A codimension 'SpaceDim' object can also be accessed by specifying all the directions as orthogonal.

References CH_assert, CodimBox< S >::getS(), CodimBox< S >::m_codim, CodimBox< S >::numAI, and SpaceDim.

Referenced by CodimBox< S >::operator()().

template<typename S>
S & CodimBox< S >::operator() (  )  [inline]

template<typename S>
const S & CodimBox< S >::operator() ( const int  a_dir0  )  const [inline]

Returns S in the given direction (codimension 1).

References CH_assert, CodimBox< S >::getS(), CodimBox< S >::m_codim, and SpaceDim.

template<typename S>
S & CodimBox< S >::operator() ( const int  a_dir0  )  [inline]

template<typename S>
const S & CodimBox< S >::operator() ( const int  a_dir0,
const int  a_dir1 
) const [inline]

Returns S in the given direction (codimension 2).

References CH_assert, CodimBox< S >::getS(), CodimBox< S >::m_codim, and SpaceDim.

template<typename S>
S & CodimBox< S >::operator() ( const int  a_dir0,
const int  a_dir1 
) [inline]

template<typename S>
const S & CodimBox< S >::operator() ( const int  a_dir0,
const int  a_dir1,
const int  a_dir2 
) const [inline]

Returns S in the given direction (codimension 3).

References CH_assert, CodimBox< S >::getS(), CodimBox< S >::m_codim, and SpaceDim.

template<typename S>
S & CodimBox< S >::operator() ( const int  a_dir0,
const int  a_dir1,
const int  a_dir2 
) [inline]

template<typename S>
const S & CodimBox< S >::operator() ( const int  a_dir0,
const int  a_dir1,
const int  a_dir2,
const int  a_dir3 
) const [inline]

Returns S in the given direction (codimension 4).

References CH_assert, CodimBox< S >::getS(), CodimBox< S >::m_codim, and SpaceDim.

template<typename S>
S & CodimBox< S >::operator() ( const int  a_dir0,
const int  a_dir1,
const int  a_dir2,
const int  a_dir3 
) [inline]

template<typename S>
const S & CodimBox< S >::operator() ( const int  a_dir0,
const int  a_dir1,
const int  a_dir2,
const int  a_dir3,
const int  a_dir4 
) const [inline]

Returns S in the given direction (codimension 5).

References CH_assert, CodimBox< S >::getS(), CodimBox< S >::m_codim, and SpaceDim.

template<typename S>
S & CodimBox< S >::operator() ( const int  a_dir0,
const int  a_dir1,
const int  a_dir2,
const int  a_dir3,
const int  a_dir4 
) [inline]

template<typename S>
const S & CodimBox< S >::operator() ( const int  a_dir0,
const int  a_dir1,
const int  a_dir2,
const int  a_dir3,
const int  a_dir4,
const int  a_dir5 
) const [inline]

Returns S in the given direction (codimension 6).

References CH_assert, CodimBox< S >::getS(), CodimBox< S >::m_codim, and SpaceDim.

template<typename S>
S & CodimBox< S >::operator() ( const int  a_dir0,
const int  a_dir1,
const int  a_dir2,
const int  a_dir3,
const int  a_dir4,
const int  a_dir5 
) [inline]

template<typename S>
const S & CodimBox< S >::getSequential ( const int  a_iOrient  )  const [inline]

Returns S from a sequential index.

Parameters:
[in] a_iOrient A sequential orientation index.
Note:
  • A bit description of the orientation can be obtained from
     *            bitOrient[totOrient[a_codim] + a_iOrient]
     *          

References CH_assert, CodimBox< S >::m_codim, CodimBox< S >::m_S, and CodimBox< S >::numOrient.

template<typename S>
S & CodimBox< S >::getSequential ( const int  a_iOrient  )  [inline]

template<typename S>
void CodimBox< S >::setVal ( const Real  a_x  )  [inline]

Set all values in all FAB.

Parameters:
[in] a_x New value

References CodimBox< S >::m_codim, CodimBox< S >::m_S, and CodimBox< S >::numOrient.

template<typename S>
Box CodimBox< S >::orientBox ( const int  a_bOrient  )  const [inline]

Orient the stored box in the othogonal directions of the given orientation

Orient the stored box in the othogonal directions of the given orientation

Parameters:
[in] a_bOrient A bit orientation index.

References CodimBox< S >::m_box.

Referenced by CodimBox< S >::copy(), CodimBox< S >::define(), CodimBox< S >::linearIn(), CodimBox< S >::linearOut(), and CodimBox< S >::size().

template<typename S>
Box CodimBox< S >::orientBox ( const int  a_iOrient,
const Box a_cbox 
) const [inline]

Orient a centered box in the othogonal directions of the given orientation

Orient a centered box in the othogonal directions of the given orientation

Parameters:
[in] a_iOrient A sequential orientation index. This is converted to a bit orientation for finding the orthogonal directions.
[in] a_cbox A centered box.
Returns:
The orientated box

References CodimBox< S >::genOrientBox(), and CodimBox< S >::seq2bit().

template<typename S>
Box CodimBox< S >::orientBox ( const int  a_codim,
const int  a_iOrient,
const Box a_cbox 
) [inline, static]

Orient a centered box in the othogonal directions of the given orientation. Used externally for any codimension.

Orient a centered box in the othogonal directions of the given orientation. Used externally for any codimension.

Parameters:
[in] a_codim The codimension of the box
[in] a_iOrient A sequential orientation index. This is converted to a bit orientation for finding the orthogonal directions.
[in] a_cbox A centered box.
Returns:
The orientated box

References CH_assert, CodimBox< S >::genOrientBox(), and CodimBox< S >::seq2bit().

template<typename S>
void CodimBox< S >::copy ( const Box a_R,
const Interval a_Cd,
const CodimBox< S > &  a_src,
const Interval a_Cs 
) [inline]

Copy from another CodimBox.

Parameters:
[in] a_R Centered box describing region to copy
[in] a_Cd Interval for components at destination
[in] a_src The source CodimBox (must be same codimension)
[in] a_Cs Interval for components at source
Note:
  • It is assumed that both CodimBoxes have the same orientation at their intersection.
  • a_R is not assumed to be contained within m_box because higher-level copy routines generally work on cell centers.

References CH_assert, Box::isEmpty(), CodimBox< S >::m_codim, CodimBox< S >::m_S, CodimBox< S >::numOrient, and CodimBox< S >::orientBox().

template<typename S>
void CodimBox< S >::copy ( const Box a_Rs,
const Interval a_Cd,
const Box a_Rd,
const CodimBox< S > &  a_src,
const Interval a_Cs 
) [inline]

Copy from another CodimBox but to a different region.

Parameters:
[in] a_Rs Centered box describing region to copy from in source
[in] a_Cd Interval for components at destination
[in] a_Rd Centered box describing region to copy to in destination
[in] a_src The source CodimBox (must be same codimension)
[in] a_Cs Interval for components at source
Note:
  • It is assumed that both CodimBoxes have the same orientation at their intersection.
  • Beware that the source and destination arguments are not grouped together.
  • The story here seems to be that copyTo in a LevelData uses centered boxes to see who to copy to. So we need +1 ghost cells in the destination to ensure abutting boxes are matched and that we can then copy abutting codimension objects. Hence, a_Rd may not be contained in m_box and must be intersected. Then make assumtions about what a_Rs should be.

References CH_assert, Box::isEmpty(), CodimBox< S >::m_codim, CodimBox< S >::m_S, CodimBox< S >::numOrient, CodimBox< S >::orientBox(), Box::sameSize(), Box::shift(), and Box::smallEnd().

template<typename S>
int CodimBox< S >::preAllocatable (  )  [inline, static]

Report preallocation capability as non-static but symmetric.

The size of the class is dependent upon the codimension. See BoxLayoutData.H for more info

template<typename S>
int CodimBox< S >::size ( const Box a_R,
const Interval a_comps 
) const [inline]

Returns size of serialized data.

Returns size, in number of bytes, of a 1D representation of data in the class.

Parameters:
[in] a_R Centered box describing size
[in] a_comps Number of components for describing size

References CodimBox< S >::m_codim, CodimBox< S >::numOrient, and CodimBox< S >::orientBox().

template<typename S>
void CodimBox< S >::linearOut ( void *  a_buf,
const Box a_R,
const Interval a_comps 
) const [inline]

Writes a serialized representation of this CodimBox.

Write a linear representaion of the internal data. Assumes that sufficient memory for the buffer has already been allocated by the caller.

Parameters:
[in] a_buf Buffer for linear representation
[in] a_R Centered box from which to write
[in] a_comps Components to be written

References CH_assert, CodimBox< S >::m_codim, CodimBox< S >::m_S, CodimBox< S >::numOrient, CodimBox< S >::orientBox(), and Vector< T >::size().

template<typename S>
void CodimBox< S >::linearIn ( void *  a_buf,
const Box a_R,
const Interval a_comps 
) [inline]

Reads a serialized representation of this CodimBox.

Reads in the output of linearOut.

Parameters:
[in] a_buf Buffer for linear representation
[in] a_R Centered box to read to
[in] a_comps Components to be read

References CH_assert, CodimBox< S >::m_codim, CodimBox< S >::m_S, CodimBox< S >::numOrient, CodimBox< S >::orientBox(), and Vector< T >::size().

template<class S>
CodimBox& CodimBox< S >::operator= ( const CodimBox< S > &   )  [private]

template<typename S>
bool CodimBox< S >::isInitialized (  )  [inline, static, private]

Check that static arrays are initialized.

Test assumes static arrays have at least been default initialized.

Returns:
T - Arrays initialized

References CodimBox< S >::indexFAB.

template<typename S>
S & CodimBox< S >::getS ( const unsigned  i  )  [inline, private]

Return the FArray box from a bit description of the orientation.

References CodimBox< S >::bit2seq(), and CodimBox< S >::m_S.

Referenced by CodimBox< S >::operator()().

template<typename S>
const S & CodimBox< S >::getS ( const unsigned  a_bOrient  )  const [inline, private]

Return the FArray box from a bit description of the orientation.

The appropriate FArray box for this codimension and orientation is given by a query to 'indexFAB'

Parameters:
[in] a_bOrient Bit description of the orientation

References CodimBox< S >::bit2seq(), and CodimBox< S >::m_S.

template<typename S>
void CodimBox< S >::genGetDirections ( const int  a_codim,
int  a_bOrient,
int *const   a_dir 
) [inline, static, private]

Get all the orthogonal directions of an orientation (general).

General static routine for a given codimension and a bit representation of the orientation

Parameters:
[in] a_codim The codimension
[in] a_bOrient Bit representation of the orientation
[in] a_dir Array with minimum size [a_codim]
[out] a_dir Integers defining the directions 0 <= dir[i] < SpaceDim
Note:
  • The directions are orderd from smallest to largest.

Referenced by CodimBox< S >::getDirections().

template<typename S>
Box CodimBox< S >::genOrientBox ( int  a_bOrient,
Box  a_cbox 
) [inline, static, private]

Orient a centered box in the othogonal directions of the given orientation (general)

Orient a centered box in the othogonal directions of the given orientation (general) General static routine for a given codimension and a bit representation of the orientation

Parameters:
[in] a_bOrient Bit representation of the orientation
[in] a_cbox A centered box.
Returns:
The orientated box

References Box::surroundingNodes().

Referenced by CodimBox< S >::orientBox().


Member Data Documentation

template<class S>
int CodimBox< S >::numOrient [inline, static, protected]

template<class S>
int CodimBox< S >::totOrient [inline, static, protected]

Initial value:

  {
    -1
  }
Total of number of orientations for all smaller codimensions

Referenced by CodimBox< S >::initialize(), and CodimBox< S >::seq2bit().

template<class S>
unsigned CodimBox< S >::bitOrient [inline, static, protected]

Initial value:

  {
    0
  }
A sequential list of bit representations of possible orientations for each codimension

Referenced by CodimBox< S >::initialize(), and CodimBox< S >::seq2bit().

template<class S>
int CodimBox< S >::indexFAB [inline, static, protected]

Initial value:

  {
    -1
  }
Returns the index of the S for a given codimension and orientation. The input index expresses the orientation as the sum of the orthogonal directions.

Referenced by CodimBox< S >::bit2seq(), CodimBox< S >::initialize(), and CodimBox< S >::isInitialized().

template<class S>
Box CodimBox< S >::m_box [private]

Cell-centered box over which this CodimBox is defined

Referenced by CodimBox< S >::box(), CodimBox< S >::define(), and CodimBox< S >::orientBox().

template<class S>
int CodimBox< S >::m_codim [private]

template<class S>
int CodimBox< S >::m_nvar [private]

Number of components in the S.

Referenced by CodimBox< S >::define(), and CodimBox< S >::nComp().

template<class S>
Vector<S*> CodimBox< S >::m_S [private]


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

Generated on Tue Sep 26 03:27:00 2017 for Chombo + EB + MF by  doxygen 1.5.5