summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fracture.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/fracture.cpp b/src/fracture.cpp
index b82abca..96cdac3 100644
--- a/src/fracture.cpp
+++ b/src/fracture.cpp
@@ -98,13 +98,15 @@ int main(int argc, char* argv[]) {
} else {
ma meas(Lx, Ly, beta, w);
+ const graph G(Lx, Ly);
+ const elastic_network fuse_network(G, &c, w);
+
for (unsigned trial = 0; trial < N; trial++) {
while (true) {
try {
- graph G(Lx, Ly);
- elastic_network fuse_network(G, &c, w);
- fuse_network.set_thresholds(beta, rng);
- fuse_network.fracture(meas);
+ elastic_network net = fuse_network;
+ net.set_thresholds(beta, rng);
+ net.fracture(meas);
break;
} catch (std::exception &e) {
std::cout << e.what() << '\n';