diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/analysis_tools.hpp | 2 | ||||
-rw-r--r-- | src/perc_meas.cpp | 4 | ||||
-rw-r--r-- | src/percolation.cpp | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/analysis_tools.hpp b/src/analysis_tools.hpp index 3beb1a8..659cacf 100644 --- a/src/analysis_tools.hpp +++ b/src/analysis_tools.hpp @@ -18,6 +18,8 @@ struct EdgeProperties { }; typedef boost::adjacency_list<boost::listS, boost::vecS, boost::undirectedS, boost::no_property, EdgeProperties> Graph; +typedef boost::graph_traits<Graph>::vertex_descriptor Vertex; +typedef boost::graph_traits<Graph>::vertices_size_type VertexIndex; template<class T> diff --git a/src/perc_meas.cpp b/src/perc_meas.cpp index 4220a93..ec7746e 100644 --- a/src/perc_meas.cpp +++ b/src/perc_meas.cpp @@ -159,7 +159,9 @@ void pm::post_fracture(network &n) { } else { ss[components[i].size() - 1]++; } - sn[p][components[i].size() - 1]++; + for (unsigned j = p; j < sn.size(); j++) { + sn[j][components[i].size() - 1]++; + } } sp[p - 1]++; diff --git a/src/percolation.cpp b/src/percolation.cpp index 03da117..757ab44 100644 --- a/src/percolation.cpp +++ b/src/percolation.cpp @@ -76,20 +76,23 @@ int main(int argc, char* argv[]) { pm meas(n, a); for (unsigned trial = 0; trial < N; trial++) { + /* while (true) { try { + */ graph G(n, a, rng); percolation_network fuse_network(G, &c); fuse_network.set_thresholds(beta, rng); fuse_network.fracture(meas); + /* break; } catch (std::exception &e) { std::cout << e.what() << '\n'; } } - if (quit.load()) break; + */ } } |