summaryrefslogtreecommitdiff
path: root/src/animate_fracture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/animate_fracture.cpp')
-rw-r--r--src/animate_fracture.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/animate_fracture.cpp b/src/animate_fracture.cpp
index e8de8c1..fd1ffe2 100644
--- a/src/animate_fracture.cpp
+++ b/src/animate_fracture.cpp
@@ -69,6 +69,33 @@ int main(int argc, char* argv[]) {
randutils::auto_seed_128 seeds;
std::mt19937 rng{seeds};
+ if (w == 0.0 || w == 1.0) {
+ if (use_aN) {
+ animate meas(sqrt(2*n *a), sqrt( 2*n / a), width, argc, argv);
+
+ for (unsigned trial = 0; trial < N; trial++) {
+ graph G(n, a, rng);
+ fuse_network net(G, &c);
+ net.set_thresholds(beta, rng);
+ net.fracture(meas);
+ }
+ } else {
+ animate meas(Lx, Ly, width, argc, argv);
+ const graph G(Lx, Ly);
+ const fuse_network plain_net(G, &c);
+
+ for (unsigned trial = 0; trial < N; trial++) {
+ fuse_network net = plain_net;
+ net.set_thresholds(beta, rng);
+ try {
+ net.fracture(meas);
+ } catch (std::exception &e) {
+ std::cout << e.what() << std::endl;
+ getchar();
+ }
+ }
+ }
+ } else {
if (use_aN) {
animate meas(sqrt(2*n *a), sqrt( 2*n / a), width, argc, argv);
@@ -89,6 +116,7 @@ int main(int argc, char* argv[]) {
net.fracture(meas);
}
}
+ }
CHOL_F(finish)(&c);