summaryrefslogtreecommitdiff
path: root/src/fracture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fracture.cpp')
-rw-r--r--src/fracture.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fracture.cpp b/src/fracture.cpp
index 4b6fb5b..742a3f9 100644
--- a/src/fracture.cpp
+++ b/src/fracture.cpp
@@ -31,8 +31,8 @@ int main(int argc, char* argv[]) {
int opt;
unsigned int N = 1;
- unsigned int Lx = 16;
- unsigned int Ly = 16;
+ double Lx = 16;
+ double Ly = 16;
double beta = 0.5;
while ((opt = getopt(argc, argv, "N:X:Y:b:")) != -1) {
@@ -41,10 +41,10 @@ int main(int argc, char* argv[]) {
N = (unsigned int)atof(optarg);
break;
case 'X':
- Lx = atoi(optarg);
+ Lx = atof(optarg);
break;
case 'Y':
- Ly = atoi(optarg);
+ Ly = atof(optarg);
break;
case 'b':
beta = atof(optarg);
@@ -57,7 +57,7 @@ int main(int argc, char* argv[]) {
cholmod_common c;
CHOL_F(start)(&c);
- ma meas(Lx, Ly, Lx, Ly, beta);
+ ma meas(Lx, Ly, ceil(Lx), ceil(Ly), beta);
randutils::auto_seed_128 seeds;
std::mt19937 rng{seeds};
@@ -65,7 +65,7 @@ int main(int argc, char* argv[]) {
for (unsigned int trial = 0; trial < N; trial++) {
while (true) {
try {
- graph G(Lx, Ly, rng, 0.4);
+ graph G(Lx, Ly, rng);
network network(G, &c);
network.set_thresholds(beta, rng);
network.fracture(meas);