12 #ifndef CD_MultiIndex_H
13 #define CD_MultiIndex_H
23 #include <CD_NamespaceHeader.H>
136 pow(
const RealVect& a_vec);
192 norm(
const IntVect a_index)
const;
195 #include <CD_NamespaceFooter.H>
SpaceDim multi-index type for use with higher order Taylor series.
Definition: CD_MultiIndex.H:30
void operator++()
Increment multi-index lexigraphically.
Definition: CD_MultiIndex.cpp:151
void makeMaps()
Fill maps.
Definition: CD_MultiIndex.cpp:194
MultiIndex()=delete
Weak construction is bad.
int factorial() const
Factorial function.
Definition: CD_MultiIndex.cpp:110
int norm() const
Get norm of multi-index.
Definition: CD_MultiIndex.cpp:121
std::vector< IntVect >::iterator m_iter
Pointer to index.
Definition: CD_MultiIndex.H:152
void makeIndices()
Fill m_indices.
Definition: CD_MultiIndex.cpp:157
IntVect m_curIndex
Current idnex.
Definition: CD_MultiIndex.H:147
void reset()
Reset multi-index to point to the first index.
Definition: CD_MultiIndex.cpp:33
IntVect getCurrentIndex() const
Get index.
Definition: CD_MultiIndex.cpp:39
~MultiIndex()=default
Destructor.
int m_order
Maximum order representable by this multi-index.
Definition: CD_MultiIndex.H:142
int operator[](const int a_dir) const
Get one index.
Definition: CD_MultiIndex.cpp:87
IntVect getMultiIndex(const int a_linearIndex) const
Get a multi-index corresponding to the linear index (i.e. column number)
Definition: CD_MultiIndex.cpp:72
MultiIndex(const MultiIndex &a_index)=default
Copy constructor.
std::map< int, IntVect > m_mapToMultiIndex
Map going from linear index to multi-index.
Definition: CD_MultiIndex.H:167
MultiIndex & operator=(const MultiIndex &a_other)=default
Assignment operator.
bool ok() const
Check that multi-index is ok.
Definition: CD_MultiIndex.cpp:93
std::map< IntVect, int > m_mapToLinearIndex
Map for going from lexigraphically ordered multi-index to linear index.
Definition: CD_MultiIndex.H:162
int getLinearIndex(const IntVect a_MultiIndex) const
Get the linear index (i.e. column number) for a given multi-index.
Definition: CD_MultiIndex.cpp:57
int getOrder() const
Get highest order for this index.
Definition: CD_MultiIndex.cpp:45
void define(const int a_order)
Define function.
Definition: CD_MultiIndex.cpp:22
std::vector< IntVect > m_indices
All indices.
Definition: CD_MultiIndex.H:157
Real pow(const RealVect &a_vec)
Power function for multi-indices.
Definition: CD_MultiIndex.cpp:138
int getNumIndices() const
Return number of indices in MultiIndex range.
Definition: CD_MultiIndex.cpp:51