#include <IndexedMoments.H>
D | The Dimension of the container |
Public Member Functions | |
IndexedMoments () | |
constructor---make statics first time called | |
~IndexedMoments () | |
Destructor. | |
Real & | operator[] (int a_i) |
const Real & | operator[] (int a_i) const |
Real & | operator[] (const IndexTM< int, Dim > &a_index) |
const Real & | operator[] (const IndexTM< int, Dim > &a_index) const |
IndexedMoments< Dim, P > & | operator+= (const IndexedMoments< Dim, P > &increment) |
add compoenentwise | |
IndexedMoments< Dim, P > & | operator*= (const Real &a_factor) |
multiply each component by constant | |
void | linearOut (void *const a_outbuf) const |
void | linearIn (const void *const a_inbuf) |
void | setRegular (const Real a_dx) |
set to a regular IndexTM | |
void | setToRegular (const Real a_dx) |
bool | isRegular () const |
IndexedMoments< Dim, P > & | operator= (const map< IndexTM< int, Dim >, Real > &a_mapin) |
for use with irregnode | |
IndexedMoments< Dim, P > & | operator= (const IndexedMoments< Dim, P > &a_input) |
void | shift (const IndexTM< Real, Dim > &a_distance) |
shift moment by the input distance. | |
void | setToZero () |
void | spout () const |
outputs the current state to pout() (a la parstream.H) | |
void | setToTruncatedMultiply (const IndexedMoments< Dim, P > &a_CA, const IndexedMoments< Dim, P > &a_CB) |
void | divideByFactorial () |
divides each entry by p! | |
void | multiplyByFactorial () |
multiply each entry by p! | |
Static Public Member Functions | |
static int | size () |
number of reals in the vector | |
static size_t | linearSize () |
for linearization | |
static const Vector< IndexTM < int, Dim > > & | getMonomialPowers () |
monomial powers | |
static int | indexOf (IndexTM< int, Dim > a_index) |
Calculate what linear index this multi-index is. | |
static IndexTM< int, Dim > | getIndex (const int &a_linearIndex) |
Protected Member Functions | |
Real | getMoment (const IndexTM< int, Dim > &a_mono, const map< IndexTM< int, Dim >, Real > &a_mapin) const |
Static Protected Member Functions | |
static void | setStatics () |
static void | setMultiIndicies () |
static void | setSize () |
Static Protected Attributes | |
static bool | s_staticsSet = false |
static int | s_size = 0 |
static Vector< IndexTM< int, Dim > > | s_multiIndicies = Vector<IndexTM<int, Dim> >() |
Private Attributes | |
int | m_isRegular |
Vector< Real > | m_moms |
Static Private Attributes | |
static const int | s_max_sizes [][CH_IM_MAX_POWER+1] |
IndexedMoments< Dim, P >::IndexedMoments | ( | ) | [inline] |
constructor---make statics first time called
References IndexedMoments< Dim, P >::m_isRegular, IndexedMoments< Dim, P >::m_moms, IndexedMoments< Dim, P >::s_size, IndexedMoments< Dim, P >::s_staticsSet, and IndexedMoments< Dim, P >::setStatics().
IndexedMoments< Dim, P >::~IndexedMoments | ( | ) | [inline] |
Destructor.
Real& IndexedMoments< Dim, P >::operator[] | ( | int | a_i | ) | [inline] |
Retrieve the moment from the index a_index The lexigraphical index to the data
const Real& IndexedMoments< Dim, P >::operator[] | ( | int | a_i | ) | const [inline] |
Retrieve the moment from the index a_index The lexigraphical index to the data
Real& IndexedMoments< Dim, P >::operator[] | ( | const IndexTM< int, Dim > & | a_index | ) | [inline] |
Retrieve the moment from the index a_index The multi-index that's needed
const Real& IndexedMoments< Dim, P >::operator[] | ( | const IndexTM< int, Dim > & | a_index | ) | const [inline] |
Retrieve the moment from the index a_index The multi-index that's needed
IndexedMoments< Dim, P > & IndexedMoments< Dim, P >::operator+= | ( | const IndexedMoments< Dim, P > & | increment | ) | [inline] |
add compoenentwise
IndexedMoments< Dim, P > & IndexedMoments< Dim, P >::operator*= | ( | const Real & | a_factor | ) | [inline] |
multiply each component by constant
multiply each component by factor
static int IndexedMoments< Dim, P >::size | ( | ) | [inline, static] |
number of reals in the vector
Referenced by getIndMomSize(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::linearIn(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::linearOut(), and IndexedMoments< SpaceDim, CH_EBIS_ORDER >::linearSize().
static size_t IndexedMoments< Dim, P >::linearSize | ( | void | ) | [inline, static] |
for linearization
void IndexedMoments< Dim, P >::linearOut | ( | void *const | a_outbuf | ) | const [inline] |
void IndexedMoments< Dim, P >::linearIn | ( | const void *const | a_inbuf | ) | [inline] |
void IndexedMoments< Dim, P >::setRegular | ( | const Real | a_dx | ) | [inline] |
set to a regular IndexTM
Only moments with an even multi-index are non-zero
References CH_assert, IndexedMoments< Dim, P >::getMonomialPowers(), IndexedMoments< Dim, P >::m_isRegular, IndexedMoments< Dim, P >::m_moms, POW(), Vector< T >::size(), and IndexTM< T, N >::sum().
Referenced by IndexedMoments< SpaceDim, CH_EBIS_ORDER >::setToRegular(), FaceData::setToRegular(), and VolData::setToRegular().
void IndexedMoments< Dim, P >::setToRegular | ( | const Real | a_dx | ) | [inline] |
static const Vector<IndexTM<int,Dim> >& IndexedMoments< Dim, P >::getMonomialPowers | ( | ) | [inline, static] |
monomial powers
Referenced by MomentIterator< D, P >::MomentIterator(), and IndexedMoments< Dim, P >::setRegular().
bool IndexedMoments< Dim, P >::isRegular | ( | ) | const [inline] |
IndexedMoments< Dim, P > & IndexedMoments< Dim, P >::operator= | ( | const map< IndexTM< int, Dim >, Real > & | a_mapin | ) | [inline] |
IndexedMoments<Dim, P>& IndexedMoments< Dim, P >::operator= | ( | const IndexedMoments< Dim, P > & | a_input | ) | [inline] |
void IndexedMoments< Dim, P >::shift | ( | const IndexTM< Real, Dim > & | a_distance | ) | [inline] |
shift moment by the input distance.
shift moment by the input vector distance. this changes the current object from integral(x^p) to integral((x+x0)^p), where x0 = a_distance
References CH_TIME, IndexTM< T, N >::componentwiseLE(), and POW().
Referenced by checkMoments().
void IndexedMoments< Dim, P >::setToZero | ( | ) | [inline] |
Referenced by BaseIF::getExactEBMoments(), BaseIF::getExactEBNormalMoments(), BaseIF::getExactEBNormalPartialDerivs(), BaseIF::getExactFaceMoments(), BaseIF::getExactVolumeMoments(), FaceData::setToCovered(), VolData::setToCovered(), IndexedMoments< Dim, P >::setToTruncatedMultiply(), and BoundaryData::setToZero().
int IndexedMoments< Dim, P >::indexOf | ( | IndexTM< int, Dim > | a_index | ) | [inline, static] |
Calculate what linear index this multi-index is.
References allPositive(), CH_assert, IndexedMoments< Dim, P >::s_max_sizes, and IndexTM< T, N >::sum().
Referenced by getIndMomLinearIndex(), and IndexedMoments< SpaceDim, CH_EBIS_ORDER >::operator[]().
static IndexTM<int,Dim> IndexedMoments< Dim, P >::getIndex | ( | const int & | a_linearIndex | ) | [inline, static] |
Referenced by getIndMomMultiIndex().
void IndexedMoments< Dim, P >::spout | ( | ) | const [inline] |
outputs the current state to pout() (a la parstream.H)
References pout().
Referenced by IrregNode::spout().
void IndexedMoments< Dim, P >::setToTruncatedMultiply | ( | const IndexedMoments< Dim, P > & | a_CA, | |
const IndexedMoments< Dim, P > & | a_CB | |||
) | [inline] |
Say = sum_p(CA m^p), and = sum_q(CB m^q).
This sets the current data to the set of coefficents M such that <AB> = sum_r(M m^r) + O(h^P+1).
We drop all coefficents for powers s.t. p + q > P.
References IndexedMoments< Dim, P >::setToZero(), and IndexTM< T, N >::sum().
void IndexedMoments< Dim, P >::divideByFactorial | ( | ) | [inline] |
void IndexedMoments< Dim, P >::multiplyByFactorial | ( | ) | [inline] |
Real IndexedMoments< Dim, P >::getMoment | ( | const IndexTM< int, Dim > & | a_mono, | |
const map< IndexTM< int, Dim >, Real > & | a_mapin | |||
) | const [inline, protected] |
void IndexedMoments< Dim, P >::setStatics | ( | ) | [inline, static, protected] |
References IndexedMoments< Dim, P >::s_staticsSet, IndexedMoments< Dim, P >::setMultiIndicies(), and IndexedMoments< Dim, P >::setSize().
Referenced by IndexedMoments< SpaceDim, CH_EBIS_ORDER >::getMonomialPowers(), IndexedMoments< Dim, P >::IndexedMoments(), and IndexedMoments< SpaceDim, CH_EBIS_ORDER >::size().
void IndexedMoments< Dim, P >::setMultiIndicies | ( | ) | [inline, static, protected] |
void IndexedMoments< Dim, P >::setSize | ( | ) | [inline, static, protected] |
References CH_assert, CH_IM_MAX_POWER, IndexedMoments< Dim, P >::s_max_sizes, IndexedMoments< Dim, P >::s_size, and SpaceDim.
Referenced by IndexedMoments< Dim, P >::setStatics().
bool IndexedMoments< Dim, P >::s_staticsSet = false [inline, static, protected] |
int IndexedMoments< Dim, P >::s_size = 0 [inline, static, protected] |
Vector< IndexTM< int, Dim > > IndexedMoments< Dim, P >::s_multiIndicies = Vector<IndexTM<int, Dim> >() [inline, static, protected] |
int IndexedMoments< Dim, P >::m_isRegular [private] |
Referenced by IndexedMoments< Dim, P >::IndexedMoments(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::isRegular(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::linearIn(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::linearOut(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::operator=(), and IndexedMoments< Dim, P >::setRegular().
Vector<Real> IndexedMoments< Dim, P >::m_moms [private] |
Referenced by IndexedMoments< Dim, P >::IndexedMoments(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::linearIn(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::linearOut(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::operator=(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::operator[](), IndexedMoments< Dim, P >::setRegular(), and IndexedMoments< SpaceDim, CH_EBIS_ORDER >::setToZero().
const int IndexedMoments< Dim, P >::s_max_sizes [inline, static, private] |
Initial value:
{ {1, 2, 3, 4, 5, 6, 7, 8, 9}, {1, 3, 6, 10, 15, 21, 28, 36, 45}, {1, 4, 10, 20, 35, 56, 84, 120, 165} }
Referenced by IndexedMoments< Dim, P >::indexOf(), and IndexedMoments< Dim, P >::setSize().