From 948f90b6493da83d10e18f30b0fbb8e937e29c0b Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Mon, 24 Jun 2019 21:41:34 -0400 Subject: mostly implemented the ability to find dead bonds using topological properties --- src/animate_fracture.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/animate_fracture.cpp') diff --git a/src/animate_fracture.cpp b/src/animate_fracture.cpp index c3b4a69..9d875e6 100644 --- a/src/animate_fracture.cpp +++ b/src/animate_fracture.cpp @@ -31,20 +31,20 @@ int main(int argc, char* argv[]) { int opt; unsigned N = 1; - double Lx = 16.0; - double Ly = 16.0; + unsigned n = 16; + double a = 16.0; double beta = 0.5; - while ((opt = getopt(argc, argv, "X:Y:N:b:")) != -1) { + while ((opt = getopt(argc, argv, "n:a:N:b:")) != -1) { switch (opt) { case 'N': N = (unsigned)atof(optarg); break; - case 'X': - Lx = atof(optarg); + case 'n': + n = atoi(optarg); break; - case 'Y': - Ly = atof(optarg); + case 'a': + a = atof(optarg); break; case 'b': beta = atof(optarg); @@ -57,16 +57,16 @@ int main(int argc, char* argv[]) { cholmod_common c; CHOL_F(start)(&c); - animate meas(Lx, Ly, 700, argc, argv); + animate meas(sqrt(2*n *a), sqrt( 2*n / a), 700, argc, argv); randutils::auto_seed_128 seeds; std::mt19937 rng{seeds}; for (unsigned trial = 0; trial < N; trial++) { - graph G(Lx, Ly, rng); + graph G(n, a, rng); elastic_network elastic_network(G, &c); elastic_network.set_thresholds(beta, rng); - elastic_network.fracture(meas); + elastic_network.fracture(meas, true); if (quit.load()) break; -- cgit v1.2.3-70-g09d2