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/fracture.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/fracture.cpp') diff --git a/src/fracture.cpp b/src/fracture.cpp index 7df3f67..483a3d2 100644 --- a/src/fracture.cpp +++ b/src/fracture.cpp @@ -38,8 +38,9 @@ int main(int argc, char* argv[]) { unsigned n = 128; double a = 1.0; bool use_aN = false; + double w = 0.5; - while ((opt = getopt(argc, argv, "N:X:Y:b:n:a:")) != -1) { + while ((opt = getopt(argc, argv, "N:X:Y:b:n:a:w:")) != -1) { switch (opt) { case 'N': N = (unsigned)atof(optarg); @@ -61,6 +62,9 @@ int main(int argc, char* argv[]) { a = atof(optarg); use_aN = true; break; + case 'w': + w = atof(optarg); + break; default: exit(1); } @@ -82,9 +86,9 @@ int main(int argc, char* argv[]) { while (true) { try { graph G(n, a, rng); - elastic_network fuse_network(G, &c); + elastic_network fuse_network(G, &c, w); fuse_network.set_thresholds(beta, rng); - fuse_network.fracture(meas); + fuse_network.fracture(meas, false); break; } catch (std::exception &e) { std::cout << e.what() << '\n'; @@ -105,9 +109,9 @@ int main(int argc, char* argv[]) { while (true) { try { graph G(Lx, Ly); - elastic_network fuse_network(G, &c); + elastic_network fuse_network(G, &c, w); fuse_network.set_thresholds(beta, rng); - fuse_network.fracture(meas); + fuse_network.fracture(meas, false); break; } catch (std::exception &e) { std::cout << e.what() << '\n'; -- cgit v1.2.3-70-g09d2