|
chombo-discharge
|
SpaceDim multi-index type for use with higher order Taylor series. More...
#include <CD_MultiIndex.H>
Public Member Functions | |
| MultiIndex ()=delete | |
| Weak construction is bad. | |
| MultiIndex (const MultiIndex &a_index)=default | |
| Copy constructor. | |
| MultiIndex (const int a_order) | |
| Full constructor. | |
| ~MultiIndex ()=default | |
| Destructor. | |
| void | define (const int a_order) |
| Define function. | |
| int | factorial () const |
| Factorial function. | |
| IntVect | getCurrentIndex () const |
| Get index. | |
| int | getOrder () const |
| Get highest order for this index. | |
| int | getLinearIndex (const IntVect a_MultiIndex) const |
| Get the linear index (i.e. column number) for a given multi-index. | |
| IntVect | getMultiIndex (const int a_linearIndex) const |
| Get a multi-index corresponding to the linear index (i.e. column number) | |
| MultiIndex & | operator= (const MultiIndex &a_other)=default |
| Assignment operator. | |
| int | operator[] (const int a_dir) const |
| Get one index. | |
| void | operator++ () |
| Increment multi-index lexigraphically. | |
| void | reset () |
| Reset multi-index to point to the first index. | |
| bool | ok () const |
| Check that multi-index is ok. | |
| int | norm () const |
| Get norm of multi-index. | |
| int | getNumIndices () const |
| Return number of indices in MultiIndex range. | |
| Real | pow (const RealVect &a_vec) |
| Power function for multi-indices. | |
Protected Member Functions | |
| int | factorial (const int a_n) const |
| Base factorial function. | |
| void | makeIndices () |
| Fill m_indices. | |
| void | makeMaps () |
| Fill maps. | |
Protected Attributes | |
| int | m_order |
| Maximum order representable by this multi-index. | |
| IntVect | m_curIndex |
| Current idnex. | |
| std::vector< IntVect >::iterator | m_iter |
| Pointer to index. | |
| std::vector< IntVect > | m_indices |
| All indices. | |
| std::map< IntVect, int > | m_mapToLinearIndex |
| Map for going from lexigraphically ordered multi-index to linear index. | |
| std::map< int, IntVect > | m_mapToMultiIndex |
| Map going from linear index to multi-index. | |
SpaceDim multi-index type for use with higher order Taylor series.
| int MultiIndex::norm | ( | ) | const |
Get norm of multi-index.
Returns |alpha| + |alpha2| + ....