#include <IndexTM.H>
Constants | |
static const IndexTM | Zero |
static const IndexTM | Unit |
void | linearIn (const void *a_inBuf) |
void | linearOut (void *a_outBuf) const |
static int | InitStatics () |
I/O Functions | |
void | printOn (std::ostream &a_os) const |
void | p () const |
void | dumpOn (std::ostream &a_os) const |
std::ostream & | operator<< (std::ostream &a_os, const IndexTM &a_iv) |
std::istream & | operator>> (std::istream &a_os, IndexTM &a_iv) |
Public Member Functions | |
template<typename OP> | |
bool | operatorCompare (const IndexTM< T, N > &a_p, const OP &a_op) const |
template<typename OP> | |
IndexTM< T, N > & | operatorOpEquals (const IndexTM< T, N > &a_p, const OP &a_op) |
template<typename OP> | |
IndexTM< T, N > & | operatorOpEquals (const T &a_p, const OP &a_op) |
IndexTM & | reciprocal () |
int | minDir (bool a_doAbs) const |
int | maxDir (bool a_doAbs) const |
T | integer_factorial (int n) const |
T | factorial () const |
Constructors and Accessors | |
IndexTM () | |
~IndexTM () | |
IndexTM (T a_i) | |
IndexTM (T a_i, T a_j) | |
IndexTM (T a_i, T a_j, T a_k) | |
IndexTM (T a_i, T a_j, T a_k, T a_l) | |
IndexTM (T a_i, T a_j, T a_k, T a_l, T a_m) | |
IndexTM (T a_i, T a_j, T a_k, T a_l, T a_m, T a_n) | |
IndexTM (const T *a_a) | |
IndexTM (const IndexTM &a_rhs) | |
IndexTM | copy () const |
IndexTM & | operator= (const IndexTM &a_rhs) |
T & | operator[] (int a_i) |
T | operator[] (int a_i) const |
void | setVal (int a_i, T a_val) |
void | setAll (T a_val) |
Data pointer functions | |
const T * | getVect () const |
const T * | dataPtr () const |
T * | dataPtr () |
Comparison Operators | |
bool | operator== (const IndexTM &a_p) const |
bool | operator!= (const IndexTM &a_p) const |
bool | lexLT (const IndexTM &a_s) const |
bool | operator< (const IndexTM &a_s) const |
bool | componentwiseLE (const IndexTM &a_s) |
bool | lexGT (const IndexTM &a_s) const |
Unary operators | |
IndexTM | operator+ () const |
IndexTM | operator- () const |
T | dotProduct (const IndexTM &a_rhs) const |
T | sum () const |
T | product () const |
Other arithmetic operators | |
IndexTM & | min (const IndexTM &a_p) |
IndexTM & | max (const IndexTM &a_p) |
IndexTM & | scale (T a_s) |
IndexTM & | reflect (T a_refIx, int a_idir) |
IndexTM & | shift (int a_coord, T a_s) |
IndexTM & | shift (const IndexTM &a_iv) |
IndexTM & | diagShift (T a_s) |
IndexTM & | coarsen (const IndexTM &a_p) |
IndexTM & | coarsen (T a_p) |
Protected Member Functions | |
IndexTM (const char *) | |
Protected Attributes | |
T | m_vect [N] |
Construct an IndexTM whose components are uninitialized.
References IndexTM< T, N >::m_vect, and N.
References IndexTM< T, N >::m_vect, and N.
References IndexTM< T, N >::m_vect, and N.
References IndexTM< T, N >::m_vect, and N.
References IndexTM< T, N >::m_vect, and N.
IndexTM< T, N >::IndexTM | ( | T | a_i, | |
T | a_j, | |||
T | a_k, | |||
T | a_l, | |||
T | a_m, | |||
T | a_n | |||
) | [inline] |
References IndexTM< T, N >::m_vect, and N.
Construct an IndexTM setting the coordinates to the corresponding values in the integer array a_a.
References IndexTM< T, N >::m_vect, and N.
The copy constructor.
References IndexTM< T, N >::m_vect, and N.
IndexTM< T, N >::IndexTM | ( | const char * | a_reference | ) | [inline, protected] |
References MayDay::Error(), and IndexTM< T, N >::setAll().
IndexTM< T, N > & IndexTM< T, N >::operator= | ( | const IndexTM< T, N > & | a_rhs | ) | [inline] |
The assignment operator.
References IndexTM< T, N >::m_vect, and N.
Returns a modifiable lvalue reference to the i'th coordinate of the IndexTM.
References CH_assert, IndexTM< T, N >::m_vect, and N.
Returns the i'th coordinate of the IndexTM.
References CH_assert, IndexTM< T, N >::m_vect, and N.
Set i'th coordinate of IndexTM to val.
References CH_assert, IndexTM< T, N >::m_vect, and N.
set all values to val
References IndexTM< T, N >::m_vect, and N.
Referenced by checkMoments(), and IndexTM< T, N >::IndexTM().
Returns a const pointer to an array of coordinates of the IndexTM. Useful for arguments to FORTRAN calls.
References IndexTM< T, N >::m_vect.
Only for sending to Fortran
References IndexTM< T, N >::m_vect.
bool IndexTM< T, N >::operator== | ( | const IndexTM< T, N > & | a_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 >::m_vect.
Referenced by IndexTM< T, N >::operator!=().
bool IndexTM< T, N >::operator!= | ( | const IndexTM< T, N > & | a_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==().
bool IndexTM< T, N >::lexLT | ( | const IndexTM< T, N > & | a_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 >::m_vect.
Referenced by IndexTM< int, SpaceDim >::operator<().
bool IndexTM< T, N >::operator< | ( | const IndexTM< T, N > & | a_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])))));
Reimplemented from GenericArithmeticable< T, IndexTM< T, N > >.
bool IndexTM< T, N >::componentwiseLE | ( | const IndexTM< T, N > & | a_s | ) | [inline] |
Does operator <= the same way that intvect does it Intvect code looks like this: return D_TERM6(vect[0] >= p[0], && vect[1] >= p[1], && vect[2] >= p[2], && vect[3] >= p[3], && vect[4] >= p[4], && vect[5] >= p[5]);
Referenced by IndexedMoments< Dim, P >::shift().
bool IndexTM< T, N >::lexGT | ( | const IndexTM< T, N > & | a_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 >::m_vect.
Unary plus -- for completeness.
Unary minus -- negates all components of this IndexTM.
References IndexTM< T, N >::m_vect, and N.
T IndexTM< T, N >::dotProduct | ( | const IndexTM< T, N > & | a_rhs | ) | const [inline] |
References IndexTM< T, N >::m_vect, and N.
Sum of all components of this IndexTM.
References IndexTM< T, N >::m_vect.
Referenced by NormalDerivativeNew< dim >::calculateAll(), checkMoments(), LSProblem< dim >::computeBounds(), IndexedMoments< Dim, P >::indexOf(), IndexedMoments< Dim, P >::setMultiIndicies(), IndexedMoments< Dim, P >::setRegular(), and IndexedMoments< Dim, P >::setToTruncatedMultiply().
Product of all components of this IndexTM.
References IndexTM< T, N >::m_vect.
bool IndexTM< T, N >::operatorCompare | ( | const IndexTM< T, N > & | a_p, | |
const OP & | a_op | |||
) | const [inline] |
Used by GenericArithmeticable to implement all pointwise arithmetic and comparison functions.
References IndexTM< T, N >::m_vect.
IndexTM< T, N > & IndexTM< T, N >::operatorOpEquals | ( | const IndexTM< T, N > & | a_p, | |
const OP & | a_op | |||
) | [inline] |
References IndexTM< T, N >::m_vect.
IndexTM< T, N > & IndexTM< T, N >::operatorOpEquals | ( | const T & | a_p, | |
const OP & | a_op | |||
) | [inline] |
References IndexTM< T, N >::m_vect.
Modifies this IndexTM by division of each component into T(1).
References IndexTM< T, N >::m_vect, and N.
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 >::m_vect, and N.
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 >::m_vect, and N.
IndexTM< T, N > & IndexTM< T, N >::min | ( | const IndexTM< T, N > & | a_p | ) | [inline] |
Modifies this IndexTM by taking component-wise min with IndexTM argument.
References IndexTM< T, N >::m_vect, and N.
Referenced by min().
IndexTM< T, N > & IndexTM< T, N >::max | ( | const IndexTM< T, N > & | a_p | ) | [inline] |
Modifies this IndexTM by taking component-wise max with IndexTM argument.
References IndexTM< T, N >::m_vect, and N.
Referenced by max().
Modifies this IndexTM by multiplying each component by a scalar.
IndexTM< T, N > & IndexTM< T, N >::reflect | ( | T | a_refIx, | |
int | a_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 CH_assert, IndexTM< T, N >::m_vect, and N.
Referenced by reflect().
IndexTM< T, N > & IndexTM< T, N >::shift | ( | int | a_coord, | |
T | a_s | |||
) | [inline] |
Modifies this IndexTM by adding s to component in given coordinate direction.
References CH_assert, IndexTM< T, N >::m_vect, and N.
Modifies this IndexTM by adding a scalar s to each component.
IndexTM< T, N > & IndexTM< T, N >::coarsen | ( | const IndexTM< T, N > & | a_p | ) | [inline] |
Modify IndexTM by component-wise integer projection.
References CH_assert, IndexTM< T, N >::m_vect, and N.
Referenced by coarsen().
Modify IndexTM by component-wise integer projection.
References CH_assert, IndexTM< T, N >::m_vect, and N.
void IndexTM< T, N >::printOn | ( | std::ostream & | a_os | ) | const |
Print an IndexTM to the ostream.
void IndexTM< T, N >::dumpOn | ( | std::ostream & | a_os | ) | const |
Print an IndexTM to the ostream a bit more verbosely.
Initializes Zero and Unit.
Low-level data copy.
References IndexTM< T, N >::m_vect, and N.
References IndexTM< T, N >::m_vect, and N.
T IndexTM< T, N >::integer_factorial | ( | int | n | ) | const [inline] |
Referenced by IndexTM< int, SpaceDim >::factorial(), and IndexTM< int, SpaceDim >::integer_factorial().
std::ostream& operator<< | ( | std::ostream & | a_os, | |
const IndexTM< T, N > & | a_iv | |||
) | [friend] |
Print the IndexTM to given output stream in ASCII.
std::istream& operator>> | ( | std::istream & | a_os, | |
IndexTM< T, N > & | a_iv | |||
) | [friend] |
Read next IndexTM from given input stream.
const IndexTM< T, N > IndexTM< T, N >::Zero [inline, static] |
This is an IndexTM all of whose components are equal to zero.
Referenced by NormalDerivativeNew< dim >::addLDeriv(), NormalDerivativeNew< dim >::addNDeriv(), NormalDerivativeNew< dim >::calculateAll(), LSProblem< dim >::computeBounds(), IFData< dim >::defineLocalCoords(), CutCellMoments< dim >::getVol(), NormalDerivativeNew< dim >::nChoosek(), and IFData< dim >::setNormalDerivatives().
const IndexTM< T, N > IndexTM< T, N >::Unit [inline, static] |
This is an IndexTM all of whose components are equal to one.
The individual components of this IndexTM.
Referenced by IndexTM< T, N >::coarsen(), IndexTM< T, N >::dataPtr(), IndexTM< T, N >::dotProduct(), IndexTM< int, SpaceDim >::factorial(), IndexTM< T, N >::getVect(), IndexTM< T, N >::IndexTM(), IndexTM< T, N >::lexGT(), IndexTM< T, N >::lexLT(), IndexTM< T, N >::linearIn(), IndexTM< T, N >::linearOut(), IndexTM< T, N >::max(), IndexTM< T, N >::maxDir(), IndexTM< T, N >::min(), IndexTM< T, N >::minDir(), IndexTM< T, N >::operator-(), IndexTM< T, N >::operator=(), IndexTM< T, N >::operator==(), IndexTM< T, N >::operator[](), IndexTM< T, N >::operatorCompare(), IndexTM< T, N >::operatorOpEquals(), IndexTM< T, N >::product(), IndexTM< T, N >::reciprocal(), IndexTM< T, N >::reflect(), IndexTM< T, N >::setAll(), IndexTM< T, N >::setVal(), IndexTM< T, N >::shift(), and IndexTM< T, N >::sum().