IndexTM< T, N > Class Template Reference

#include <IndexTM.H>

Inheritance diagram for IndexTM< T, N >:

Inheritance graph
[legend]
Collaboration diagram for IndexTM< T, N >:

Collaboration graph
[legend]

List of all members.

template<typename T, int N = CH_SPACEDIM>
class IndexTM< T, N >


Constants

static const IndexTM Zero
static const IndexTM Unit
void linearIn (const void *inBuf)
void linearOut (void *outBuf) const
static int InitStatics ()

I/O Functions

std::ostream & operator<< (std::ostream &os, const IndexTM &iv)
std::istream & operator>> (std::istream &os, IndexTM &iv)
void printOn (std::ostream &os) const
void p () const
void dumpOn (std::ostream &os) const

Public Member Functions

template<typename OP>
bool operatorCompare (const IndexTM< T, N > &, const OP &) const
template<typename OP>
IndexTM< T, N > & operatorOpEquals (const IndexTM< T, N > &, const OP &)
template<typename OP>
IndexTM< T, N > & operatorOpEquals (const T &, const OP &)
IndexTMreciprocal ()
int minDir (bool a_doAbs) const
int maxDir (bool a_doAbs) const
Constructors and Accessors
See derived class IndexTM for more constructors.

 IndexTM ()
 ~IndexTM ()
 IndexTM (T i)
 IndexTM (T i, T j)
 IndexTM (T i, T j, T k)
 IndexTM (T i, T j, T k, T m)
 IndexTM (T i, T j, T k, T m, T n)
 IndexTM (T i, T j, T k, T m, T n, T p)
 IndexTM (const T *a)
 IndexTM (const IndexTM &rhs)
IndexTM copy () const
IndexTMoperator= (const IndexTM &rhs)
T & operator[] (int i)
operator[] (int i) const
void setVal (int i, T val)
void setAll (T val)
Data pointer functions
const T * getVect () const
const T * dataPtr () const
T * dataPtr ()
Comparison Operators
bool operator== (const IndexTM &p) const
bool operator!= (const IndexTM &p) const
bool lexLT (const IndexTM &s) const
bool lexGT (const IndexTM &s) const
Unary operators
IndexTM operator+ () const
IndexTM operator- () const
dotProduct (const IndexTM &a_rhs) const
sum () const
product () const
Other arithmetic operators
IndexTMmin (const IndexTM &p)
IndexTMmax (const IndexTM &p)
IndexTMscale (T s)
IndexTMreflect (T ref_ix, int idir)
IndexTMshift (int coord, T s)
IndexTMshift (const IndexTM &iv)
IndexTMdiagShift (T s)
IndexTMcoarsen (const IndexTM &p)
IndexTMcoarsen (T p)

Protected Attributes

vect [N]

Friends

class HDF5Handle

Constructor & Destructor Documentation

template<typename T, int N = CH_SPACEDIM>
IndexTM< T, N >::IndexTM (  )  [inline]

Construct an IndexTM whose components are uninitialized.

template<typename T, int N = CH_SPACEDIM>
IndexTM< T, N >::~IndexTM (  )  [inline]

Destructor.

template<typename T, int N>
IndexTM< T, N >::IndexTM ( i  )  [inline, explicit]

References IndexTM< T, N >::vect.

template<typename T, int N>
IndexTM< T, N >::IndexTM ( i,
j 
) [inline]

References IndexTM< T, N >::vect.

template<typename T, int N>
IndexTM< T, N >::IndexTM ( i,
j,
k 
) [inline]

References IndexTM< T, N >::vect.

template<typename T, int N>
IndexTM< T, N >::IndexTM ( i,
j,
k,
m 
) [inline]

References IndexTM< T, N >::vect.

template<typename T, int N>
IndexTM< T, N >::IndexTM ( i,
j,
k,
m,
n 
) [inline]

References IndexTM< T, N >::vect.

template<typename T, int N>
IndexTM< T, N >::IndexTM ( i,
j,
k,
m,
n,
p 
) [inline]

References IndexTM< T, N >::vect.

template<typename T, int N>
IndexTM< T, N >::IndexTM ( const T *  a  )  [inline, explicit]

Construct an IndexTM setting the coordinates to the corresponding values in the integer array a.

References IndexTM< T, N >::vect.

template<typename T, int N>
IndexTM< T, N >::IndexTM ( const IndexTM< T, N > &  rhs  )  [inline]

The copy constructor.

References IndexTM< T, N >::vect.


Member Function Documentation

template<typename T, int N = CH_SPACEDIM>
IndexTM IndexTM< T, N >::copy (  )  const [inline]

template<typename T, int N>
IndexTM< T, N > & IndexTM< T, N >::operator= ( const IndexTM< T, N > &  rhs  )  [inline]

The assignment operator.

References IndexTM< T, N >::vect.

template<typename T, int N>
T & IndexTM< T, N >::operator[] ( int  i  )  [inline]

Returns a modifiable lvalue reference to the i'th coordinate of the IndexTM.

References IndexTM< T, N >::vect.

template<typename T, int N>
T IndexTM< T, N >::operator[] ( int  i  )  const [inline]

Returns the i'th coordinate of the IndexTM.

References IndexTM< T, N >::vect.

template<typename T, int N>
void IndexTM< T, N >::setVal ( int  i,
val 
) [inline]

Set i'th coordinate of IndexTM to val.

References IndexTM< T, N >::vect.

template<typename T, int N>
void IndexTM< T, N >::setAll ( val  )  [inline]

set all values to val

References i, and IndexTM< T, N >::vect.

Referenced by IndexTM< T, N >::InitStatics().

template<typename T, int N>
const T * IndexTM< T, N >::getVect (  )  const [inline]

Returns a const pointer to an array of coordinates of the IndexTM. Useful for arguments to FORTRAN calls.

References IndexTM< T, N >::vect.

template<typename T, int N>
const T * IndexTM< T, N >::dataPtr (  )  const [inline]

Only for sending to Fortran

References IndexTM< T, N >::vect.

Referenced by BASISV_TM().

template<typename T, int N>
T * IndexTM< T, N >::dataPtr (  )  [inline]

Only for sending to Fortran

References IndexTM< T, N >::vect.

template<typename T, int N>
bool IndexTM< T, N >::operator== ( const IndexTM< T, N > &  p  )  const [inline]

Returns true if this IndexTM is equivalent to argument IndexTM. All comparisons between analogous components must be satisfied.

References IndexTM< T, N >::vect.

Referenced by IndexTM< T, N >::operator!=().

template<typename T, int N>
bool IndexTM< T, N >::operator!= ( const IndexTM< T, N > &  p  )  const [inline]

Returns true if this IndexTM is different from argument IndexTM. All comparisons between analogous components must be satisfied.

References IndexTM< T, N >::operator==().

template<typename T, int N>
bool IndexTM< T, N >::lexLT ( const IndexTM< T, N > &  s  )  const [inline]

Returns true if this IndexTM is lexically less than the argument. An IndexTM MUST BE either lexically less than, lexically greater than, or equal to another IndexTM.

iv1 is lexically less than iv2 if:

in 2-D:
(iv1[0] < iv2[0]) || ((iv1[0] == iv2[0]) && (iv1[1] < iv2[1]));

in 3-D:
(iv1[0] < iv2[0]) || (iv1[0]==iv2[0] && ((iv1[1] < iv2[1] || ((iv1[1] == iv2[1]) && (iv1[2] < iv2[2])))));

References IndexTM< T, N >::vect.

template<typename T, int N>
bool IndexTM< T, N >::lexGT ( const IndexTM< T, N > &  s  )  const [inline]

Returns true if this IndexTM is lexically greater than the argument. An IndexTM MUST BE either lexically less than, lexically greater than, or equal to another IndexTM.

iv1 is lexically less than iv2 if:

in 2-D:
(iv1[0] > iv2[0]) || ((iv1[0] == iv2[0]) && (iv1[1] > iv2[1]));

in 3-D:
(iv1[0] > iv2[0]) || (iv1[0]==iv2[0] && ((iv1[1] > iv2[1] || ((iv1[1] == iv2[1]) && (iv1[2] > iv2[2])))));

References IndexTM< T, N >::vect.

template<typename T, int N>
IndexTM< T, N > IndexTM< T, N >::operator+ (  )  const [inline]

Unary plus -- for completeness.

template<typename T, int N>
IndexTM< T, N > IndexTM< T, N >::operator- (  )  const [inline]

Unary minus -- negates all components of this IndexTM.

References i, and IndexTM< T, N >::vect.

template<typename T, int N>
T IndexTM< T, N >::dotProduct ( const IndexTM< T, N > &  a_rhs  )  const [inline]

References IndexTM< T, N >::vect.

template<typename T, int N>
T IndexTM< T, N >::sum (  )  const [inline]

Sum of all components of this IndexTM.

References IndexTM< T, N >::vect.

template<typename T, int N>
T IndexTM< T, N >::product (  )  const [inline]

Product of all components of this IndexTM.

References IndexTM< T, N >::vect.

template<typename T, int N>
template<typename OP>
bool IndexTM< T, N >::operatorCompare ( const IndexTM< T, N > &  p,
const OP &  op 
) const [inline]

Used by GenericArithmeticable to implement all pointwise arithmetic and comparison functions.

References IndexTM< T, N >::vect.

template<typename T, int N>
template<typename OP>
IndexTM< T, N > & IndexTM< T, N >::operatorOpEquals ( const IndexTM< T, N > &  p,
const OP &  op 
) [inline]

References IndexTM< T, N >::vect.

template<typename T, int N>
template<typename OP>
IndexTM< T, N > & IndexTM< T, N >::operatorOpEquals ( const T &  s,
const OP &  op 
) [inline]

References IndexTM< T, N >::vect.

template<typename T, int N>
IndexTM< T, N > & IndexTM< T, N >::reciprocal (  )  [inline]

Modifies this IndexTM by division of each component into T(1).

References IndexTM< T, N >::vect.

template<typename T, int N>
int IndexTM< T, N >::minDir ( bool  a_doAbs  )  const [inline]

Component with the minimum value of this Index(returns 0 if they are all the same). a_doAbs : if true then take the absolute value before comparing

References IndexTM< T, N >::vect.

template<typename T, int N>
int IndexTM< T, N >::maxDir ( bool  a_doAbs  )  const [inline]

Component with the maximum value of this Index (returns 0 if they are all the same). a_doAbs : if true then take the absolute value before comparing.

References IndexTM< T, N >::vect.

template<typename T, int N>
IndexTM< T, N > & IndexTM< T, N >::min ( const IndexTM< T, N > &  p  )  [inline]

Modifies this IndexTM by taking component-wise min with IndexTM argument.

References IndexTM< T, N >::vect.

Referenced by min().

template<typename T, int N>
IndexTM< T, N > & IndexTM< T, N >::max ( const IndexTM< T, N > &  p  )  [inline]

Modifies this IndexTM by taking component-wise max with IndexTM argument.

References IndexTM< T, N >::vect.

Referenced by max().

template<typename T, int N>
IndexTM< T, N > & IndexTM< T, N >::scale ( s  )  [inline]

Modifies this IndexTM by multiplying each component by a scalar.

template<typename T, int N>
IndexTM< T, N > & IndexTM< T, N >::reflect ( ref_ix,
int  idir 
) [inline]

Modifies IndexTM by reflecting it in the plane defined by the index ref_ix and with normal in the direction of idir. Directions are based at zero.

References IndexTM< T, N >::vect.

Referenced by reflect().

template<typename T, int N>
IndexTM< T, N > & IndexTM< T, N >::shift ( int  coord,
s 
) [inline]

Modifies this IndexTM by adding s to component in given coordinate direction.

References IndexTM< T, N >::vect.

template<typename T, int N>
IndexTM< T, N > & IndexTM< T, N >::shift ( const IndexTM< T, N > &  iv  )  [inline]

Modifies this IndexTM by component-wise addition with IndexTM argument.

template<typename T, int N>
IndexTM< T, N > & IndexTM< T, N >::diagShift ( s  )  [inline]

Modifies this IndexTM by adding a scalar s to each component.

template<typename T, int N>
IndexTM< T, N > & IndexTM< T, N >::coarsen ( const IndexTM< T, N > &  p  )  [inline]

Modify IndexTM by component-wise integer projection.

References IndexTM< T, N >::vect.

Referenced by coarsen().

template<typename T, int N>
IndexTM< T, N > & IndexTM< T, N >::coarsen ( p  )  [inline]

Modify IndexTM by component-wise integer projection.

References IndexTM< T, N >::vect.

template<typename T, int N = CH_SPACEDIM>
void IndexTM< T, N >::printOn ( std::ostream &  os  )  const

Print an IndexTM to the ostream.

template<typename T, int N>
void IndexTM< T, N >::p (  )  const [inline]

Print an IndexTM to the pout().

References pout().

template<typename T, int N = CH_SPACEDIM>
void IndexTM< T, N >::dumpOn ( std::ostream &  os  )  const

Print an IndexTM to the ostream a bit more verbosely.

template<typename T, int N>
int IndexTM< T, N >::InitStatics (  )  [inline, static]

Initializes Zero and Unit.

References IndexTM< T, N >::setAll().

template<typename T, int N>
void IndexTM< T, N >::linearIn ( const void *  inBuf  )  [inline]

Low-level data copy.

References IndexTM< T, N >::vect.

template<typename T, int N>
void IndexTM< T, N >::linearOut ( void *  outBuf  )  const [inline]

References IndexTM< T, N >::vect.


Friends And Related Function Documentation

template<typename T, int N = CH_SPACEDIM>
friend class HDF5Handle [friend]

template<typename T, int N = CH_SPACEDIM>
std::ostream& operator<< ( std::ostream &  os,
const IndexTM< T, N > &  iv 
) [friend]

Print the IndexTM to given output stream in ASCII.

template<typename T, int N = CH_SPACEDIM>
std::istream& operator>> ( std::istream &  os,
IndexTM< T, N > &  iv 
) [friend]

Read next IndexTM from given input stream.


Member Data Documentation

template<typename T, int N = CH_SPACEDIM>
const IndexTM< T, N > IndexTM< T, N >::Zero [inline, static]

This is an IndexTM all of whose components are equal to zero.

Referenced by LSProblem< dim >::computeBounds().

template<typename T, int N = CH_SPACEDIM>
const IndexTM< T, N > IndexTM< T, N >::Unit [inline, static]

This is an IndexTM all of whose components are equal to one.

template<typename T, int N = CH_SPACEDIM>
T IndexTM< T, N >::vect[N] [protected]


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

Generated on Tue Apr 14 14:23:37 2009 for Chombo + EB by  doxygen 1.5.5