From d87b34443e5c6f8aae9dcf8ebbd339b75d25d1e2 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Wed, 24 Jul 2019 13:49:15 -0400 Subject: added non-rotaded measurements --- src/measurements.cpp | 6 +++++- src/measurements.hpp | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/measurements.cpp b/src/measurements.cpp index aca9cc6..4f0f5c1 100644 --- a/src/measurements.cpp +++ b/src/measurements.cpp @@ -161,7 +161,9 @@ ma::ma(unsigned n, double a, double beta, double weight, bool one) : cl(pow((unsigned)sqrt(n), 2)), cb(pow((unsigned)sqrt(n), 2)), ca(pow((unsigned)sqrt(n), 2)), - cA(pow((unsigned)sqrt(n), 2)) + cA(pow((unsigned)sqrt(n), 2)), + cp(pow((unsigned)sqrt(n), 2)), + cq(pow((unsigned)sqrt(n), 2)) { if (beta != 0.0) { model_string = "fracture_" + std::to_string(n) + "_" + std::to_string(a) + "_" + std::to_string(beta) + "_" + std::to_string(weight) + "_"; @@ -279,6 +281,7 @@ void ma::post_fracture(network &n) { if (i != crack_component) { sm[components[i].size() - 1]++; autocorrelation2(n.G.L.x, n.G.L.y, 2 * sqrt(cm.size()), 2 * sqrt(cm.size()), cm, components[i], post_cracks.front().first); + autocorrelation2(n.G.L.x, n.G.L.y, 2 * sqrt(cp.size()), 2 * sqrt(cp.size()), cp, components[i], {0, 1}); } else { ss[components[i].size() - 1]++; autocorrelation2(n.G.L.x, n.G.L.y, 2 * sqrt(cs.size()), 2 * sqrt(cs.size()), cs, components[i], post_cracks.front().first); @@ -320,6 +323,7 @@ void ma::post_fracture(network &n) { ca_co.push_back(n.G.edges[e].r); } autocorrelation2(n.G.L.x, n.G.L.y, 2 * sqrt(ca.size()), 2 * sqrt(ca.size()), ca, ca_co, post_cracks.front().first); + autocorrelation2(n.G.L.x, n.G.L.y, 2 * sqrt(cq.size()), 2 * sqrt(cq.size()), cq, ca_co, {0,1}); av_it++; } diff --git a/src/measurements.hpp b/src/measurements.hpp index c69404b..b22c327 100644 --- a/src/measurements.hpp +++ b/src/measurements.hpp @@ -43,6 +43,8 @@ class ma : public hooks { std::vector cb; std::vector ca; std::vector cA; + std::vector cp; + std::vector cq; public: long double lv; -- cgit v1.2.3-70-g09d2