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