12 #ifndef CD_TileImplem_H
13 #define CD_TileImplem_H
20 #include <CD_NamespaceHeader.H>
37 template <
class T,
size_t DIM>
40 for (
auto& index : m_indices) {
50 template <
class T,
size_t DIM>
54 template <
class T,
size_t DIM>
58 return m_indices[a_dir];
61 template <
class T,
size_t DIM>
65 return m_indices[a_dir];
68 template <
class T,
size_t DIM>
69 inline std::array<T, DIM>&
75 template <
class T,
size_t DIM>
76 inline const std::array<T, DIM>&
82 template <
class T,
size_t DIM>
89 const auto& myIndices = std::tuple_cat(m_indices);
90 const auto& otherIndices = std::tuple_cat(a_otherTile.getIndices());
92 return std::tie(myIndices) < std::tie(otherIndices);
95 template <
class T,
size_t DIM>
101 const auto& myIndices = std::tuple_cat(m_indices);
102 const auto& otherIndices = std::tuple_cat(a_otherTile.getIndices());
104 return std::tie(myIndices) > std::tie(otherIndices);
107 template <
class T,
size_t DIM>
108 inline constexpr
bool
114 const auto& myIndices = std::tuple_cat(m_indices);
115 const auto& otherIndices = std::tuple_cat(a_otherTile.getIndices());
117 return std::tie(myIndices) == std::tie(otherIndices);
120 #include <CD_NamespaceFooter.H>
Class for representing a tile (used in, e.g., TiledMeshRefine)
Definition: CD_Tile.H:26
constexpr bool operator>(const TileI &a_otherTile) const noexcept
Comparison operator. Uses lexicographical comparison.
Definition: CD_TileImplem.H:97
TileI() noexcept
Default constructor. Sets m_indices = 0.
Definition: CD_TileImplem.H:38
constexpr bool operator<(const TileI &a_otherTile) const noexcept
Comparison operator. Uses lexicographical comparison.
Definition: CD_TileImplem.H:84
virtual ~TileI() noexcept
Destructor.
Definition: CD_TileImplem.H:51
constexpr bool operator==(const TileI &a_otherTile) const noexcept
Comparison operator. Uses lexicographical comparison.
Definition: CD_TileImplem.H:109
T & operator[](const size_t a_dir) noexcept
Get the index in specified coordinate direction.
Definition: CD_TileImplem.H:56
std::array< T, DIM > & getIndices() noexcept
Get the indices.
Definition: CD_TileImplem.H:70