From a20ac5471a35c9c2a70b48fc4393d2323b52bd85 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Fri, 28 Dec 2018 00:58:12 -0500 Subject: removed test.cpp and made the array for saving damage size distribution larger --- src/CMakeLists.txt | 2 -- src/measurements.cpp | 2 +- src/test.cpp | 83 ---------------------------------------------------- 3 files changed, 1 insertion(+), 86 deletions(-) delete mode 100644 src/test.cpp (limited to 'src') 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 -#include - -#include - -#include "randutils/randutils.hpp" - -#include -#include -#include -#include "measurements.hpp" - -#include -#include -#include - -std::atomic 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; - */ -} - -- cgit v1.2.3-70-g09d2