summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-12-28 00:58:12 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-12-28 00:58:12 -0500
commita20ac5471a35c9c2a70b48fc4393d2323b52bd85 (patch)
tree292318d46c31539bc1476946f865c9b90c4773a1
parent380e16a94dbdc7c8f4ba6e389395296cf8be66c1 (diff)
downloadfuse_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
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/measurements.cpp2
-rw-r--r--src/test.cpp83
3 files changed, 1 insertions, 86 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 283eb10..2b34984 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -14,5 +14,3 @@ target_link_libraries(fracture frac measurements fftw3 cholmod profiler GL GLU g
add_executable(animate_fracture animate_fracture.cpp)
target_link_libraries(animate_fracture frac animate fftw3 cholmod profiler GL GLU glut)
-add_executable(test test.cpp)
-target_link_libraries(test frac measurements fftw3 cholmod profiler)
diff --git a/src/measurements.cpp b/src/measurements.cpp
index 15d37d1..72f074a 100644
--- a/src/measurements.cpp
+++ b/src/measurements.cpp
@@ -114,7 +114,7 @@ ma::ma(double Lx, double Ly, unsigned int Mx, unsigned int My, double beta) :
sa(2 * (unsigned int)ceil(Lx * Ly / 2), 0),
sC(2 * (unsigned int)ceil(Lx * Ly / 2), 0),
sA(2 * (unsigned int)ceil(Lx * Ly / 2), 0),
- sd(2 * (unsigned int)ceil(Lx * Ly / 2), 0),
+ sd(3 * (unsigned int)ceil(Lx * Ly / 2), 0),
sb(log2(Mx < My ? Mx : My) + 1, 0),
Ccc((Mx / 2 + 1) * (My / 2 + 1), 0),
Css((Mx / 2 + 1) * (My / 2 + 1), 0),
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;
- */
-}
-