diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-12-28 00:58:12 -0500 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-12-28 00:58:12 -0500 |
commit | a20ac5471a35c9c2a70b48fc4393d2323b52bd85 (patch) | |
tree | 292318d46c31539bc1476946f865c9b90c4773a1 /src/test.cpp | |
parent | 380e16a94dbdc7c8f4ba6e389395296cf8be66c1 (diff) | |
download | fuse_networks-a20ac5471a35c9c2a70b48fc4393d2323b52bd85.tar.gz fuse_networks-a20ac5471a35c9c2a70b48fc4393d2323b52bd85.tar.bz2 fuse_networks-a20ac5471a35c9c2a70b48fc4393d2323b52bd85.zip |
removed test.cpp and made the array for saving damage size distribution larger
Diffstat (limited to 'src/test.cpp')
-rw-r--r-- | src/test.cpp | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/src/test.cpp b/src/test.cpp deleted file mode 100644 index 2ebf3ac..0000000 --- a/src/test.cpp +++ /dev/null @@ -1,83 +0,0 @@ - -#include <random> -#include <iostream> - -#include <cholmod.h> - -#include "randutils/randutils.hpp" - -#include <graph.hpp> -#include <network.hpp> -#include <hooks.hpp> -#include "measurements.hpp" - -#include <csignal> -#include <cstring> -#include <atomic> - -std::atomic<bool> quit(false); // signal flag - -void got_signal(int) { - quit.store(true); -} - -int main(int argc, char* argv[]) { - struct sigaction sa; - memset( &sa, 0, sizeof(sa) ); - sa.sa_handler = got_signal; - sigfillset(&sa.sa_mask); - sigaction(SIGINT, &sa, NULL); - - int opt; - - unsigned int N = 1; - unsigned int Lx = 16; - unsigned int Ly = 16; - double beta = 0.5; - - while ((opt = getopt(argc, argv, "N:X:Y:b:")) != -1) { - switch (opt) { - case 'N': - N = (unsigned int)atof(optarg); - break; - case 'X': - Lx = atoi(optarg); - break; - case 'Y': - Ly = atoi(optarg); - break; - case 'b': - beta = atof(optarg); - break; - default: - exit(1); - } - } - - cholmod_common c; - CHOL_F(start)(&c); - - randutils::auto_seed_128 seeds; - std::mt19937 rng{seeds}; - - graph G(Lx, Ly, rng); - return 0; - /* - network base_network(G, &c); - ma meas(Lx, Ly, beta); - - for (unsigned int trial = 0; trial < N; trial++) { - network tmp_network(base_network); - tmp_network.set_thresholds(beta, rng); - tmp_network.fracture(meas); - - if (quit.load()) - break; - } - - CHOL_F(finish)(&c); - - return 0; - */ -} - |