|
| CSRGraph ()=delete |
| Empty CSR Graph.
|
|
template<typename X > |
| CSRGraph (MPI_Comm mpi_comm, const std::vector< X > &graph) |
|
| CSRGraph (MPI_Comm mpi_comm, const T *xadj, const T *adjncy, std::size_t n) |
| Create a CSR Graph from ParMETIS style adjacency lists.
|
|
| ~CSRGraph () |
| Destructor.
|
|
const std::vector< T > & | edges () const |
|
std::vector< T > & | edges () |
|
const node | operator[] (std::size_t i) const |
|
const std::vector< T > & | nodes () const |
|
std::vector< T > & | nodes () |
|
std::size_t | num_edges () const |
| Number of local edges in graph.
|
|
std::size_t | num_edges (std::size_t i) const |
| Number of edges from node i.
|
|
std::size_t | size () const |
| Number of local nodes in graph.
|
|
T | size_global () const |
| Total (global) number of nodes in parallel graph.
|
|
const std::vector< T > & | node_distribution () const |
| Return number of nodes (offset) on each process.
|
|
std::vector< T > & | node_distribution () |
| Return number of nodes (offset) on each process (non-const)
|
|
template<typename T>
class dolfin::CSRGraph< T >
Compressed Sparse Row graph.
This class provides a Compressed Sparse Row Graph defined by a vector containing edges for each node and a vector of offsets into the edge vector for each node
In parallel, all nodes must be numbered from zero on process zero continuously through increasing rank processes. Edges must be defined in terms of the global node numbers. The global node offset of each process is given by node_distribution()
The format of the nodes, edges and distribution is identical with the formats for ParMETIS and PT-SCOTCH. See the manuals for these libraries for further information.