18 #ifndef SPARSE_GRAPH_HH_
19 #define SPARSE_GRAPH_HH_
27 #include "petscistypes.h"
79 void set_edge(
const int a,
const int b,
int weight=1);
90 void set_vtx_position(
const int vtx,
const float xyz[3],
int weight=1);
114 bool check_subgraph_connectivity(
int *part);
187 :
SparseGraph(distr), petsc_adj_mat(0), petsc_part(0), part_IS(0) {}
191 virtual void partition(
int *loc_part);
198 virtual void allocate_sparse_graph(
int lsize_vtxs,
int lsize_adj);
226 virtual void partition(
int *loc_part);
229 virtual void allocate_sparse_graph(
int lsize_vtxs,
int lsize_adj);
SparseGraphMETIS(const Distribution &distr)
SparseGraphMETIS(int n_vtxs, MPI_Comm comm)
SparseGraphPETSC(const Distribution &distr)
MatPartitioning petsc_part
SparseGraphPETSC(int n_vtxs, MPI_Comm comm)
Virtual class for construction and partitioning of a distributed sparse graph.
float * vtx_XYZ
optional vertex coordinates (global array)
int proc_to_check
subgraph to check
int * vtx_weights
Vertex weights for computations (optional).
virtual void allocate_sparse_graph(int lsize_vtxs, int lsize_adj)=0
vector< stack< Edge > > adj_of_proc
storage for graph edges for individual processors
Distribution vtx_distr
distribution of vertexes
int * part_to_check
created partitioning used through check of connectivity
virtual void partition(int *loc_part)=0
std::vector< int > checked_vtx
coloring of DFS algorithm
Support classes for parallel programing.
bool operator<(IntersectionResult a, IntersectionResult b)
ostream & operator<<(ostream &out, const SparseGraph &sg)
Output a sparse graph.