summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fracture.cpp14
-rw-r--r--src/measurements.cpp2
-rw-r--r--src/measurements.hpp2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/fracture.cpp b/src/fracture.cpp
index fb51d3e..7df3f67 100644
--- a/src/fracture.cpp
+++ b/src/fracture.cpp
@@ -31,8 +31,8 @@ int main(int argc, char* argv[]) {
int opt;
unsigned N = 1;
- double Lx = 16;
- double Ly = 16;
+ unsigned Lx = 16;
+ unsigned Ly = 16;
double beta = 0.5;
unsigned n = 128;
@@ -45,10 +45,10 @@ int main(int argc, char* argv[]) {
N = (unsigned)atof(optarg);
break;
case 'X':
- Lx = atof(optarg);
+ Lx = atoi(optarg);
break;
case 'Y':
- Ly = atof(optarg);
+ Ly = atoi(optarg);
break;
case 'b':
beta = atof(optarg);
@@ -76,7 +76,7 @@ int main(int argc, char* argv[]) {
unsigned Mx = (unsigned)4*sqrt(2*n*a);
unsigned My = (unsigned)4*sqrt(2*n/a);
- ma meas(n, a, Mx, My, beta);
+ ma meas(n, a, beta);
for (unsigned trial = 0; trial < N; trial++) {
while (true) {
@@ -99,12 +99,12 @@ int main(int argc, char* argv[]) {
unsigned Mx = pow(2, ceil(log2(4*Lx)));
unsigned My = pow(2, ceil(log2(4*Ly)));
- ma meas(Lx, Ly, Mx, My, beta);
+ ma meas(Lx, Ly, beta);
for (unsigned trial = 0; trial < N; trial++) {
while (true) {
try {
- graph G(Lx, Ly, rng);
+ graph G(Lx, Ly);
elastic_network fuse_network(G, &c);
fuse_network.set_thresholds(beta, rng);
fuse_network.fracture(meas);
diff --git a/src/measurements.cpp b/src/measurements.cpp
index eaa34ee..969f487 100644
--- a/src/measurements.cpp
+++ b/src/measurements.cpp
@@ -142,7 +142,7 @@ unsigned edge_r_to_ind(graph::coordinate r, double Lx, double Ly, unsigned Mx, u
return floor((Mx * r.x) / Lx) + Mx * floor((My * r.y) / Ly);
}
-ma::ma(unsigned n, double a, unsigned Mx, unsigned My, double beta) :
+ma::ma(unsigned n, double a, double beta) :
G(2 * n),
sn(2 * n),
ss(2 * n),
diff --git a/src/measurements.hpp b/src/measurements.hpp
index 51f7080..961ad7a 100644
--- a/src/measurements.hpp
+++ b/src/measurements.hpp
@@ -42,7 +42,7 @@ class ma : public hooks {
std::string model_string;
ma(unsigned Lx, unsigned Ly, double beta);
- ma(unsigned n, double a, unsigned Mx, unsigned My, double beta);
+ ma(unsigned n, double a, double beta);
~ma();
void pre_fracture(const network &) override;