summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/src/graph.cpp2
-rw-r--r--src/fracture.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/src/graph.cpp b/lib/src/graph.cpp
index 8aa8877..364f339 100644
--- a/lib/src/graph.cpp
+++ b/lib/src/graph.cpp
@@ -152,7 +152,7 @@ graph::graph(double Lx, double Ly, std::mt19937& rng) {
}
graph::graph(unsigned n, double a, std::mt19937& rng) {
- L = {2 * n * a, 2 * n / a};
+ L = {sqrt(2 * n * a), sqrt(2 * n / a)};
this->helper(n, rng);
}
diff --git a/src/fracture.cpp b/src/fracture.cpp
index b1bde45..2651668 100644
--- a/src/fracture.cpp
+++ b/src/fracture.cpp
@@ -73,8 +73,8 @@ int main(int argc, char* argv[]) {
std::mt19937 rng{seeds};
if (use_aN) {
- unsigned Mx = pow(2, ceil(log2(4*2*n*a)));
- unsigned My = pow(2, ceil(log2(4*2*n/a)));
+ unsigned Mx = pow(2, ceil(log2(4*sqrt(2*n*a))));
+ unsigned My = pow(2, ceil(log2(4*sqrt(2*n/a))));
ma meas(n, a, Mx, My, beta);