diff --git a/examples/madness/mra-device/key.h b/examples/madness/mra-device/key.h index e4d82ee2a..547b2cac2 100644 --- a/examples/madness/mra-device/key.h +++ b/examples/madness/mra-device/key.h @@ -102,7 +102,7 @@ namespace mra { assert(n l = this->l; for (auto& x : l) x = 2*x + 1; - return Key(2*n, l); + return Key(n+1, l); } /// Used by iterator to increment child translation @@ -126,7 +126,7 @@ namespace mra { assert(idx l = this->l; for (Dimension d = 0; d < NDIM; ++d) l[d] = 2*l[d] + (idx & (1<(2*n, l); + return Key(n+1, l); } }; template <> inline SCOPE Key<1> Key<1>::parent(Level generation) const { diff --git a/examples/madness/mra-device/mrattg-device.cc b/examples/madness/mra-device/mrattg-device.cc index 2cee40311..30f5e18b0 100644 --- a/examples/madness/mra-device/mrattg-device.cc +++ b/examples/madness/mra-device/mrattg-device.cc @@ -407,7 +407,7 @@ void test(std::size_t K) { D.set_cube(-6.0,6.0); srand48(5551212); // for reproducible results - //for (auto i : range(10000)) drand48(); // warmup generator + for (int i = 0; i < range(10000); ++i) drand48(); // warmup generator ttg::Edge, void> project_control; ttg::Edge, mra::FunctionReconstructedNode> project_result, reconstruct_result; diff --git a/examples/mrakey.h b/examples/mrakey.h index 9c500e2da..75d5181f1 100644 --- a/examples/mrakey.h +++ b/examples/mrakey.h @@ -102,7 +102,7 @@ namespace mra { assert(n l = this->l; for (auto& x : l) x = 2*x + 1; - return Key(2*n, l); + return Key(n+1, l); } /// Used by iterator to increment child translation @@ -127,7 +127,7 @@ namespace mra { assert(idx l = this->l; for (auto d : range(NDIM)) l[d] = 2*l[d] + (idx & (1<(2*n, l); + return Key(n+1, l); } }; template <> inline Key<1> Key<1>::parent(Level generation) const {