summaryrefslogtreecommitdiff
path: root/src/measurements.hpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-11-06 17:44:09 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-11-06 17:44:09 -0500
commit16924b17b6974f669dd928639c89baa57d8d3f62 (patch)
tree731b10682d0f92d89b2d485433b7b7a50a9d3716 /src/measurements.hpp
parent07906baa42470bad14d2c40f57967691f6118969 (diff)
downloadfuse_networks-16924b17b6974f669dd928639c89baa57d8d3f62.tar.gz
fuse_networks-16924b17b6974f669dd928639c89baa57d8d3f62.tar.bz2
fuse_networks-16924b17b6974f669dd928639c89baa57d8d3f62.zip
many changes to measurements, right now halfway through implementing a better, self-consistent record of the crack surface
Diffstat (limited to 'src/measurements.hpp')
-rw-r--r--src/measurements.hpp35
1 files changed, 27 insertions, 8 deletions
diff --git a/src/measurements.hpp b/src/measurements.hpp
index 817481b..4c05d93 100644
--- a/src/measurements.hpp
+++ b/src/measurements.hpp
@@ -7,19 +7,30 @@
#include <string>
#include <cinttypes>
#include <sstream>
+#include <functional>
+#include <iostream>
+#include <valarray>
+#include <array>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/connected_components.hpp>
+#include <boost/graph/depth_first_search.hpp>
+#include <boost/range/combine.hpp>
+#include <boost/foreach.hpp>
#include <fftw3.h>
#include <network.hpp>
#include <hooks.hpp>
+struct EdgeProperties {
+ unsigned int index;
+};
+
+typedef boost::adjacency_list<boost::listS, boost::vecS, boost::undirectedS, boost::no_property, EdgeProperties> Graph;
+
class ma : public hooks {
// need:
- // - measurements for correlation functions (nice looking?)
- // - interface for reading and writing from files (nice looking?)
// - interface for turning on and off specific measurements
//
private:
@@ -29,20 +40,28 @@ class ma : public hooks {
double *fftw_reverse_out;
fftw_plan forward_plan;
fftw_plan reverse_plan;
- boost::adjacency_list <boost::listS, boost::vecS, boost::undirectedS> G;
+ Graph G;
+
+ // measurement storage
+ std::vector<uint64_t> sc; // cluster size distribution
+ std::vector<uint64_t> sa; // avalanche size distribution
+ std::vector<uint64_t> sd; // avalanche size distribution
+ std::vector<uint64_t> sb; // bin size distribution
+ std::vector<uint64_t> Ccc; // cluster-cluster correlations
+ std::vector<uint64_t> Css; // surface-surface correlations
+ std::vector<uint64_t> Caa; // avalanche-avalanche correlations
+ std::vector<uint64_t> Cdd; // damage-damage distribution
+ uint64_t Nc;
+ uint64_t Na;
public:
unsigned int N;
unsigned int L;
- unsigned int as;
double lv;
double beta;
- std::vector<unsigned int> ad;
- std::vector<unsigned int> cd;
- std::vector<unsigned int> bin_counts;
- std::list<std::list<unsigned int>> avalanches;;
+ std::list<unsigned int> avalanche;
ma(unsigned int N, unsigned int L, double beta);
~ma();