diff --git a/src/mesh/Connectivity.hpp b/src/mesh/Connectivity.hpp index 7a3c77b717854dbbc16e48dddbe10b3940172ff2..f8e4dafdb7a46473434645c26e46ee1c00f86117 100644 --- a/src/mesh/Connectivity.hpp +++ b/src/mesh/Connectivity.hpp @@ -12,7 +12,7 @@ #include <mesh/RefId.hpp> #include <mesh/RefItemList.hpp> #include <mesh/SubItemValuePerItem.hpp> -#include <utils/CSRGraph.hpp> +#include <utils/CRSGraph.hpp> #include <utils/Exceptions.hpp> #include <utils/PugsAssert.hpp> #include <utils/PugsMacros.hpp> @@ -542,7 +542,7 @@ class Connectivity final : public IConnectivity } PUGS_INLINE - CSRGraph + CRSGraph cellToCellGraph() const { std::vector<std::set<int>> cell_cells(this->numberOfCells()); @@ -574,7 +574,7 @@ class Connectivity final : public IConnectivity } } } - return CSRGraph(entries, neighbors); + return CRSGraph(entries, neighbors); } PUGS_INLINE diff --git a/src/mesh/ConnectivityDispatcher.cpp b/src/mesh/ConnectivityDispatcher.cpp index 82bf2a2e006a13d0806b2d88b1dc54715a0cc116..6b73d967d4d4fcb37e1376bf1d9306826d25fb1f 100644 --- a/src/mesh/ConnectivityDispatcher.cpp +++ b/src/mesh/ConnectivityDispatcher.cpp @@ -1,6 +1,7 @@ #include <mesh/ConnectivityDispatcher.hpp> -#include <mesh/ItemOfItemType.hpp> +#include <mesh/ItemOfItemType.hpp> +#include <utils/CRSGraph.hpp> #include <utils/Partitioner.hpp> #include <iostream> @@ -12,7 +13,7 @@ void ConnectivityDispatcher<Dimension>::_buildNewOwner() { if constexpr (item_type == ItemType::cell) { - CSRGraph connectivity_graph = m_connectivity.cellToCellGraph(); + CRSGraph connectivity_graph = m_connectivity.cellToCellGraph(); Partitioner P; CellValue<int> cell_new_owner(m_connectivity); diff --git a/src/mesh/Mesh.hpp b/src/mesh/Mesh.hpp index d04807650cd08c0b96a7259cbe5756596d54aad1..e78383978469292d6529eb931b432406612f7220 100644 --- a/src/mesh/Mesh.hpp +++ b/src/mesh/Mesh.hpp @@ -4,7 +4,6 @@ #include <algebra/TinyVector.hpp> #include <mesh/IMesh.hpp> #include <mesh/ItemValue.hpp> -#include <utils/CSRGraph.hpp> #include <memory> diff --git a/src/utils/CSRGraph.hpp b/src/utils/CRSGraph.hpp similarity index 52% rename from src/utils/CSRGraph.hpp rename to src/utils/CRSGraph.hpp index a3ae85dcced1897fc54901903c919f0009761d74..18300f47a38acdced4bd0753c4cb18cad6dffb17 100644 --- a/src/utils/CSRGraph.hpp +++ b/src/utils/CRSGraph.hpp @@ -1,9 +1,9 @@ -#ifndef CSR_GRAPH_HPP -#define CSR_GRAPH_HPP +#ifndef CRS_GRAPH_HPP +#define CRS_GRAPH_HPP #include <utils/Array.hpp> -class CSRGraph +class CRSGraph { private: Array<int> m_entries; @@ -29,18 +29,18 @@ class CSRGraph return m_neighbors; } - CSRGraph& operator=(CSRGraph&&) = default; - CSRGraph& operator=(const CSRGraph&) = default; + CRSGraph& operator=(CRSGraph&&) = default; + CRSGraph& operator=(const CRSGraph&) = default; - CSRGraph(const Array<int>& entries, const Array<int>& neighbors) : m_entries(entries), m_neighbors(neighbors) + CRSGraph(const Array<int>& entries, const Array<int>& neighbors) : m_entries(entries), m_neighbors(neighbors) { Assert(m_entries.size() > 0); } - CSRGraph() = default; - CSRGraph(CSRGraph&&) = default; - CSRGraph(const CSRGraph&) = default; - ~CSRGraph() = default; + CRSGraph() = default; + CRSGraph(CRSGraph&&) = default; + CRSGraph(const CRSGraph&) = default; + ~CRSGraph() = default; }; -#endif // CSR_GRAPH_HPP +#endif // CRS_GRAPH_HPP diff --git a/src/utils/Partitioner.cpp b/src/utils/Partitioner.cpp index 43ee64851b8d63e80afaf4d6960fe8015c1fa675..4e6a45e1c20480d666e017670eea6795f5f08f0f 100644 --- a/src/utils/Partitioner.cpp +++ b/src/utils/Partitioner.cpp @@ -15,7 +15,7 @@ #include <utils/Exceptions.hpp> Array<int> -Partitioner::partition(const CSRGraph& graph) +Partitioner::partition(const CRSGraph& graph) { std::cout << "Partitioning graph into " << rang::style::bold << parallel::size() << rang::style::reset << " parts\n"; @@ -78,7 +78,7 @@ Partitioner::partition(const CSRGraph& graph) #else // PUGS_HAS_MPI Array<int> -Partitioner::partition(const CSRGraph&) +Partitioner::partition(const CRSGraph&) { return Array<int>(0); } diff --git a/src/utils/Partitioner.hpp b/src/utils/Partitioner.hpp index 30f50723acff089cd1a21fa4f289030f5bbdf7a3..2c720bfd87e7853e12cd0736a46c5eda246f085f 100644 --- a/src/utils/Partitioner.hpp +++ b/src/utils/Partitioner.hpp @@ -1,7 +1,7 @@ #ifndef PARTITIONER_HPP #define PARTITIONER_HPP -#include <utils/CSRGraph.hpp> +#include <utils/CRSGraph.hpp> class Partitioner { @@ -10,7 +10,7 @@ class Partitioner Partitioner(const Partitioner&) = default; ~Partitioner() = default; - Array<int> partition(const CSRGraph& graph); + Array<int> partition(const CRSGraph& graph); }; #endif // PARTITIONER_HPP