From bbad06faef7c5386e9179f7d2a0bcc946187bb15 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Tue, 7 May 2019 11:17:22 -0400 Subject: added measurement of all clusters --- src/measurements.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/measurements.cpp b/src/measurements.cpp index baead2c..407048d 100644 --- a/src/measurements.cpp +++ b/src/measurements.cpp @@ -147,7 +147,8 @@ ma::ma(unsigned n, double a, unsigned Mx, unsigned My, double beta) : sc(2 * n), sm(2 * n), sa(3 * n), - sl(2 * n) + sl(2 * n), + sn(2 * n) { if (beta != 0.0) { model_string = "fracture_" + std::to_string(n) + "_" + std::to_string(a) + "_" + std::to_string(beta) + "_"; @@ -161,7 +162,8 @@ ma::ma(unsigned Lx, unsigned Ly, double beta) : sc(Lx * Ly / 2), sm(Lx * Ly / 2), sa(Lx * Ly), - sl(Lx * Ly / 2) + sl(Lx * Ly / 2), + sn(Lx * Ly / 2) { if (beta != 0.0) { model_string = "fracture_" + std::to_string(Lx) + "_" + std::to_string(Ly) + "_" + std::to_string(beta) + "_"; @@ -175,6 +177,7 @@ ma::~ma() { update_distribution_file("sm", sm, model_string); update_distribution_file("sa", sa, model_string); update_distribution_file("sl", sl, model_string); + update_distribution_file("sn", sn, model_string); } void ma::pre_fracture(const network&) { @@ -217,6 +220,7 @@ void ma::post_fracture(network &n) { if (i != crack_component) { sm[components[i].size() - 1]++; } + sn[components[i].size() - 1]++; } auto av_it = avalanches.rbegin(); -- cgit v1.2.3-70-g09d2