diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-06-24 21:41:34 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-06-24 21:41:34 -0400 |
commit | 948f90b6493da83d10e18f30b0fbb8e937e29c0b (patch) | |
tree | 29a44c20b55a6a890e107f9321cb3b3d1783111e /src/animate_fracture.cpp | |
parent | 117476f964c8700d16294e06bafc7e8491482620 (diff) | |
download | fuse_networks-948f90b6493da83d10e18f30b0fbb8e937e29c0b.tar.gz fuse_networks-948f90b6493da83d10e18f30b0fbb8e937e29c0b.tar.bz2 fuse_networks-948f90b6493da83d10e18f30b0fbb8e937e29c0b.zip |
mostly implemented the ability to find dead bonds using topological properties
Diffstat (limited to 'src/animate_fracture.cpp')
-rw-r--r-- | src/animate_fracture.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
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; |