diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-05-07 14:05:32 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-05-07 14:05:32 -0400 |
commit | 456d748b8cbf141e1fe6e82a7c0106f469e28ba6 (patch) | |
tree | 80d2474e8f9f90256501b3d8516e1d432be46658 /src | |
parent | 98b6303894018c626b68e135c892af46b4a6b9de (diff) | |
download | fuse_networks-456d748b8cbf141e1fe6e82a7c0106f469e28ba6.tar.gz fuse_networks-456d748b8cbf141e1fe6e82a7c0106f469e28ba6.tar.bz2 fuse_networks-456d748b8cbf141e1fe6e82a7c0106f469e28ba6.zip |
added measurements of spanning cluster sizes and conducting backbone sizes
Diffstat (limited to 'src')
-rw-r--r-- | src/measurements.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/measurements.cpp b/src/measurements.cpp index 407048d..33056ef 100644 --- a/src/measurements.cpp +++ b/src/measurements.cpp @@ -148,7 +148,9 @@ ma::ma(unsigned n, double a, unsigned Mx, unsigned My, double beta) : sm(2 * n), sa(3 * n), sl(2 * n), - sn(2 * n) + sn(2 * n), + ss(2 * n), + sb(3 * n) { if (beta != 0.0) { model_string = "fracture_" + std::to_string(n) + "_" + std::to_string(a) + "_" + std::to_string(beta) + "_"; @@ -178,6 +180,8 @@ ma::~ma() { update_distribution_file("sa", sa, model_string); update_distribution_file("sl", sl, model_string); update_distribution_file("sn", sn, model_string); + update_distribution_file("ss", ss, model_string); + update_distribution_file("sb", sb, model_string); } void ma::pre_fracture(const network&) { @@ -219,6 +223,8 @@ void ma::post_fracture(network &n) { for (unsigned i = 0; i < num; i++) { if (i != crack_component) { sm[components[i].size() - 1]++; + } else { + ss[components[i].size() - 1]++; } sn[components[i].size() - 1]++; } @@ -228,7 +234,7 @@ void ma::post_fracture(network &n) { while (true) { for (unsigned e : *av_it) { boost::remove_edge(n.G.dual_edges[e].v[0], n.G.dual_edges[e].v[1], G); - n.fuses[e] = false; + n.break_edge(e, true); } auto cracks = find_minimal_crack(G, n); @@ -252,6 +258,18 @@ void ma::post_fracture(network &n) { sc[new_components[i].size() - 1]++; } + current_info ct = n.get_current_info(); + + unsigned conducting_backbone_size = 0; + + for (unsigned i = 0; i < n.G.edges.size(); i++) { + if (ct.currents[i] > 1.0 / n.G.edges.size()) { + conducting_backbone_size++; + } + } + + sb[conducting_backbone_size - 1]++; + av_it++; while (av_it != avalanches.rend()) { |