diff --git a/src/mesh/Connectivity.hpp b/src/mesh/Connectivity.hpp index f876f70e11727c20fb72050da96a41bde8fe2f75..01c2da0ffff27d15f65b8a841522b37ad9285d7d 100644 --- a/src/mesh/Connectivity.hpp +++ b/src/mesh/Connectivity.hpp @@ -319,7 +319,7 @@ class Connectivity final template <ItemType source_item_type, ItemType target_item_type> PASTIS_INLINE - const auto getItemToItemMatrix() const + auto getItemToItemMatrix() const { return ItemToItemMatrix<source_item_type, target_item_type>(_getMatrix(source_item_type, @@ -327,73 +327,73 @@ class Connectivity final } PASTIS_INLINE - const auto cellToFaceMatrix() const + auto cellToFaceMatrix() const { return this->template getItemToItemMatrix<ItemType::cell, ItemType::face>(); } PASTIS_INLINE - const auto cellToEdgeMatrix() const + auto cellToEdgeMatrix() const { return this->template getItemToItemMatrix<ItemType::cell, ItemType::edge>(); } PASTIS_INLINE - const auto cellToNodeMatrix() const + auto cellToNodeMatrix() const { return this->template getItemToItemMatrix<ItemType::cell, ItemType::node>(); } PASTIS_INLINE - const auto faceToCellMatrix() const + auto faceToCellMatrix() const { return this->template getItemToItemMatrix<ItemType::face, ItemType::cell>(); } PASTIS_INLINE - const auto faceToEdgeMatrix() const + auto faceToEdgeMatrix() const { return this->template getItemToItemMatrix<ItemType::face, ItemType::edge>(); } PASTIS_INLINE - const auto faceToNodeMatrix() const + auto faceToNodeMatrix() const { return this->template getItemToItemMatrix<ItemType::face, ItemType::node>(); } PASTIS_INLINE - const auto edgeToCellMatrix() const + auto edgeToCellMatrix() const { return this->template getItemToItemMatrix<ItemType::edge, ItemType::cell>(); } PASTIS_INLINE - const auto edgeToFaceMatrix() const + auto edgeToFaceMatrix() const { return this->template getItemToItemMatrix<ItemType::edge, ItemType::face>(); } PASTIS_INLINE - const auto edgeToNodeMatrix() const + auto edgeToNodeMatrix() const { return this->template getItemToItemMatrix<ItemType::edge, ItemType::node>(); } PASTIS_INLINE - const auto nodeToCellMatrix() const + auto nodeToCellMatrix() const { return this->template getItemToItemMatrix<ItemType::node, ItemType::cell>(); } PASTIS_INLINE - const auto nodeToFaceMatrix() const + auto nodeToFaceMatrix() const { return this->template getItemToItemMatrix<ItemType::node, ItemType::face>(); } PASTIS_INLINE - const auto nodeToEdgeMatrix() const + auto nodeToEdgeMatrix() const { return this->template getItemToItemMatrix<ItemType::node, ItemType::edge>(); } diff --git a/src/mesh/ConnectivityMatrix.hpp b/src/mesh/ConnectivityMatrix.hpp index 512c2cfdfda322f1b410543a75eea2af7dc19061..53feb3375a9de19370d03a002cf869fe4f039c0f 100644 --- a/src/mesh/ConnectivityMatrix.hpp +++ b/src/mesh/ConnectivityMatrix.hpp @@ -31,25 +31,25 @@ class ConnectivityMatrix } PASTIS_INLINE - const auto numEntries() const + auto numEntries() const { return m_host_matrix.entries.extent(0); } PASTIS_INLINE - const auto numRows() const + auto numRows() const { return m_host_matrix.numRows(); } PASTIS_INLINE - const auto rowConst(const size_t& j) const + auto rowConst(const size_t& j) const { return m_host_matrix.rowConst(j); } PASTIS_INLINE - const auto rowMap(const size_t& j) const + const auto& rowMap(const size_t& j) const { return m_host_matrix.row_map[j]; } diff --git a/src/mesh/ItemToItemMatrix.hpp b/src/mesh/ItemToItemMatrix.hpp index 38f8234c7ab4a1a1801644655a0d933a568cfced..60195176262fc8b62d2be7cdbaf55c01af5573d5 100644 --- a/src/mesh/ItemToItemMatrix.hpp +++ b/src/mesh/ItemToItemMatrix.hpp @@ -63,7 +63,7 @@ class ItemToItemMatrix public: PASTIS_INLINE - const auto operator[](const SourceItemId& source_id) const + auto operator[](const SourceItemId& source_id) const { using RowType = decltype(m_connectivity_matrix.rowConst(source_id)); return SubItemList<RowType>(m_connectivity_matrix.rowConst(source_id)); @@ -71,7 +71,7 @@ class ItemToItemMatrix template <typename IndexType> PASTIS_INLINE - const auto operator[](const IndexType& source_id) const + const auto& operator[](const IndexType& source_id) const { static_assert(std::is_same<IndexType, SourceItemId>(), "ItemToItemMatrix must be indexed using correct ItemId");