summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-05-07 11:17:22 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-05-07 11:17:22 -0400
commitbbad06faef7c5386e9179f7d2a0bcc946187bb15 (patch)
tree4fcb349a8e31949a597a7f5002415a8f09fa723e
parentee2fe27f538281b59d9f0dcaf2fb9da447c135e6 (diff)
downloadfuse_networks-bbad06faef7c5386e9179f7d2a0bcc946187bb15.tar.gz
fuse_networks-bbad06faef7c5386e9179f7d2a0bcc946187bb15.tar.bz2
fuse_networks-bbad06faef7c5386e9179f7d2a0bcc946187bb15.zip
added measurement of all clusters
-rw-r--r--src/measurements.cpp8
1 files changed, 6 insertions, 2 deletions
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();