Changed interface of newRandomFourier to avoid generating copies.

This commit is contained in:
Guilhem Lavaux 2012-11-11 15:46:03 -05:00
parent ed1fede33d
commit 7ad4911872
5 changed files with 22 additions and 32 deletions

View file

@ -37,8 +37,7 @@ void test_2d(int Nx, int Ny)
dft.realSpace().scale(2.0);
dft.fourierSpace().scale(0.2);
typename SpectrumFunction<T>::FourierMapPtr m = spectrum.newRandomFourier(rng, dft.fourierSpace());
dft.fourierSpace() = *m.get();
spectrum.newRandomFourier(rng, dft.fourierSpace());
dft.synthesis();
uint32_t dims[2] = { Ny, Nx };