From 48d336aa95989ed796f8f2f88dd8a51781e19771 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Fri, 8 Feb 2019 13:08:00 -0500 Subject: mx and my by default are powers of two for fourier efficiency --- src/fracture.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/fracture.cpp b/src/fracture.cpp index ec00b89..595cf1d 100644 --- a/src/fracture.cpp +++ b/src/fracture.cpp @@ -57,7 +57,11 @@ int main(int argc, char* argv[]) { cholmod_common c; CHOL_F(start)(&c); - ma meas(Lx, Ly, 4*ceil(Lx), 4*ceil(Ly), beta, 4); + // fourier transforms of powers of two are faster + unsigned Mx = pow(2, ceil(log2(4*Lx))); + unsigned My = pow(2, ceil(log2(4*Ly))); + + ma meas(Lx, Ly, Mx, My, beta, 4); randutils::auto_seed_128 seeds; std::mt19937 rng{seeds}; -- cgit v1.2.3-54-g00ecf