diff options
Diffstat (limited to 'src/fracture.cpp')
-rw-r--r-- | src/fracture.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/fracture.cpp b/src/fracture.cpp index 317d91b..4b6fb5b 100644 --- a/src/fracture.cpp +++ b/src/fracture.cpp @@ -57,17 +57,22 @@ int main(int argc, char* argv[]) { cholmod_common c; CHOL_F(start)(&c); - graph G(Lx, Ly); - network base_network(G, &c); - ma meas(Lx, Ly, beta); + ma meas(Lx, Ly, Lx, Ly, beta); randutils::auto_seed_128 seeds; std::mt19937 rng{seeds}; for (unsigned int trial = 0; trial < N; trial++) { - network tmp_network(base_network); - tmp_network.set_thresholds(beta, rng); - tmp_network.fracture(meas); + while (true) { + try { + graph G(Lx, Ly, rng, 0.4); + network network(G, &c); + network.set_thresholds(beta, rng); + network.fracture(meas); + break; + } catch (std::exception &e) { + } + } if (quit.load()) break; |