|
|
|
@ -69,30 +69,5 @@ void FFTMA2(struct vario_mod variogram, struct grid_mod grid, int n[3], struct r
|
|
|
|
|
printf("Running with covar and ireal\n");
|
|
|
|
|
fourt(covar, ireal, n, NDIM, 1, 0, workr, worki, cores);
|
|
|
|
|
|
|
|
|
|
/*organization of the input Gaussian white noise*/
|
|
|
|
|
solver = 0;
|
|
|
|
|
prebuild_gwn(grid, n, realin, realization, solver, cores, seed);
|
|
|
|
|
|
|
|
|
|
/*forward fourier transform of the GWN*/
|
|
|
|
|
printf("Running with realization and ireal\n");
|
|
|
|
|
fourt(realization, ireal, n, NDIM, 1, 0, workr, worki, cores);
|
|
|
|
|
|
|
|
|
|
/* build realization in spectral domain */
|
|
|
|
|
build_real(n, NTOT, covar, realization, ireal, cores);
|
|
|
|
|
|
|
|
|
|
chunk_array_free(covar);
|
|
|
|
|
//remove("covar.txt");
|
|
|
|
|
|
|
|
|
|
/*backward fourier transform*/
|
|
|
|
|
printf("Running with realization and ireal\n");
|
|
|
|
|
fourt(realization, ireal, n, NDIM, 0, 1, workr, worki, cores);
|
|
|
|
|
|
|
|
|
|
chunk_array_free(ireal);
|
|
|
|
|
remove("ireal.txt");
|
|
|
|
|
|
|
|
|
|
free(workr);
|
|
|
|
|
free(worki);
|
|
|
|
|
|
|
|
|
|
/*output realization*/
|
|
|
|
|
clean_real(realin, n, grid, realization, realout, cores);
|
|
|
|
|
chunk_array_flush(covar);
|
|
|
|
|
}
|
|
|
|
|