diff options
Diffstat (limited to 'src/fracture.cpp')
-rw-r--r-- | src/fracture.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/fracture.cpp b/src/fracture.cpp index 742a3f9..47b4856 100644 --- a/src/fracture.cpp +++ b/src/fracture.cpp @@ -34,8 +34,9 @@ int main(int argc, char* argv[]) { double Lx = 16; double Ly = 16; double beta = 0.5; + double w = 0.01; - while ((opt = getopt(argc, argv, "N:X:Y:b:")) != -1) { + while ((opt = getopt(argc, argv, "N:X:Y:b:w:")) != -1) { switch (opt) { case 'N': N = (unsigned int)atof(optarg); @@ -49,6 +50,9 @@ int main(int argc, char* argv[]) { case 'b': beta = atof(optarg); break; + case 'w': + w = atof(optarg); + break; default: exit(1); } @@ -65,12 +69,13 @@ int main(int argc, char* argv[]) { for (unsigned int trial = 0; trial < N; trial++) { while (true) { try { - graph G(Lx, Ly, rng); + graph G(Lx, Ly, rng, w); network network(G, &c); network.set_thresholds(beta, rng); network.fracture(meas); break; } catch (std::exception &e) { + std::cout << e.what() << '\n'; } } |