MaMiCo 1.2
|
Classes | |
class | IndexIterator |
Public Types | |
using | value_T |
Public Member Functions | |
CellIndex ()=default | |
CellIndex (const CellIndex &ci)=default | |
CellIndex (const value_T &i) | |
template<coupling::indexing::IndexTrait... converted_traits> | |
operator CellIndex< dim, converted_traits... > () const | |
value_T | get () const |
CellIndex & | operator++ () |
CellIndex & | operator-- () |
bool | operator== (const CellIndex &i) const |
bool | operator!= (const CellIndex &i) const |
bool | operator< (const CellIndex &i) const |
bool | operator<= (const CellIndex &i) const |
bool | operator> (const CellIndex &i) const |
bool | operator>= (const CellIndex &i) const |
tarch::la::Vector< dim, double > | getCellMidPoint () const |
Static Public Member Functions | |
static constexpr bool | checkIndexTraitOrder () |
static void | setDomainParameters () |
static bool | contains (const coupling::indexing::BaseIndex< dim > &index) |
static IndexIterator | begin () |
static IndexIterator | end () |
Static Public Attributes | |
static BaseIndex< dim > | lowerBoundary |
static BaseIndex< dim > | upperBoundary |
static tarch::la::Vector< dim, unsigned int > | numberCellsInDomain |
static unsigned int | linearNumberCellsInDomain |
static tarch::la::Vector< dim, unsigned int > | divisionFactor |
static const char | TNAME [] |
Private Member Functions | |
template<coupling::indexing::IndexTrait T1, coupling::indexing::IndexTrait... other_traits> | |
CellIndex< dim, other_traits... > | getScalarCellIndex (int value) |
Private Attributes | |
value_T | _index |
Index used to describe spatial location of a CouplingCell. Since various different ways of expressing this location are useful for different applications, IndexTraits are used to describe the context of this index.
All commonly used (arithmetic) operations on CouplingCell indices are provided as well as seamless conversion between any two ways of expressing these indices. (cf. user-defined conversion function below)
dim | number of dimensions of the coupled simulation |
traits... | index type parametrisation (expressed via IndexTraits) used by this specific index |
using coupling::indexing::CellIndex< dim, traits >::value_T |
The type of this CellIndex's underlying index representation.
|
default |
Constructors
|
inlinestaticconstexpr |
Check at compile time wether traits... is in proper order, i.e.
\forall i<j: traits[i] < traits[j]
where '<' is the standard operator< on enum classes. This means: vector < local < md2macro < noGhost
Note that this causes duplicate IndexTraits in 'traits' to be not accepted.
|
inlinestatic |
|
inline |
coupling::indexing::CellIndex< dim, traits >::operator CellIndex< dim, converted_traits... > | ( | ) | const |
|
inline |
Increments the index by one. Note that this does NOT increment indices in vector representation in all directions.
|
inline |
Decrements the index by one. Note that this does NOT decrement indices in vector representation in all directions.
|
inlinestatic |
Initialises all static members dependant only on upperBoundary and lowerBoundary
|
static |
Used in scalar -> vector indexing conversion functions Initialised in setDomainParameters().
|
static |
Number of cells in this indexing's domain. Same as numberCellsInDomain, but expressed as a scalar.
|
static |
Defines where this type of cell index starts counting. Read inclusively, e.g.: lowerBoundary = {1,2,3} means {1,2,3} is the first index contained in this type of cell index' domain.
|
static |
Number of cells in this indexing's domain. The above declared boundaries are inclusive. Initialised in setDomainParameters().
|
static |
Defines where this type of cell index stops counting. Read inclusively, e.g.: upperBoundary = {4,5,6} means {4,5,6} is the last index contained in this type of cell index' domain.