summaryrefslogtreecommitdiff
path: root/src/fracture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fracture.cpp')
-rw-r--r--src/fracture.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/fracture.cpp b/src/fracture.cpp
index 96cdac3..22101c8 100644
--- a/src/fracture.cpp
+++ b/src/fracture.cpp
@@ -76,6 +76,49 @@ int main(int argc, char* argv[]) {
randutils::auto_seed_128 seeds;
std::mt19937 rng{seeds};
+ if (w == 0 || w == 1) {
+ if (use_aN) {
+ ma meas(n, a, beta, w);
+
+ for (unsigned trial = 0; trial < N; trial++) {
+ while (true) {
+ try {
+ graph G(n, a, rng);
+ fuse_network n(G, &c);
+ n.set_thresholds(beta, rng);
+ n.fracture(meas);
+ break;
+ } catch (std::exception &e) {
+ std::cout << e.what() << '\n';
+ }
+ }
+
+ if (quit.load())
+ break;
+ }
+ } else {
+ ma meas(Lx, Ly, beta, w);
+
+ const graph G(Lx, Ly);
+ const fuse_network n(G, &c);
+
+ for (unsigned trial = 0; trial < N; trial++) {
+ while (true) {
+ try {
+ fuse_network net = n;
+ net.set_thresholds(beta, rng);
+ net.fracture(meas);
+ break;
+ } catch (std::exception &e) {
+ std::cout << e.what() << '\n';
+ }
+ }
+
+ if (quit.load())
+ break;
+ }
+ }
+ } else {
if (use_aN) {
ma meas(n, a, beta, w);
@@ -117,6 +160,7 @@ int main(int argc, char* argv[]) {
break;
}
}
+ }
CHOL_F(finish)(&c);