summaryrefslogtreecommitdiff
path: root/src/fracture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fracture.cpp')
-rw-r--r--src/fracture.cpp14
1 files changed, 9 insertions, 5 deletions
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';