|
|
@ -66,6 +66,7 @@ void FFTMA2(struct vario_mod variogram, struct grid_mod grid, int n[3], struct r
|
|
|
|
covariance(covar, variogram, grid, n, cores);
|
|
|
|
covariance(covar, variogram, grid, n, cores);
|
|
|
|
|
|
|
|
|
|
|
|
/*power spectrum*/
|
|
|
|
/*power spectrum*/
|
|
|
|
|
|
|
|
printf("Running with covar and ireal\n");
|
|
|
|
fourt(covar, ireal, n, NDIM, 1, 0, workr, worki, cores);
|
|
|
|
fourt(covar, ireal, n, NDIM, 1, 0, workr, worki, cores);
|
|
|
|
|
|
|
|
|
|
|
|
/*organization of the input Gaussian white noise*/
|
|
|
|
/*organization of the input Gaussian white noise*/
|
|
|
@ -73,6 +74,7 @@ void FFTMA2(struct vario_mod variogram, struct grid_mod grid, int n[3], struct r
|
|
|
|
prebuild_gwn(grid, n, realin, realization, solver, cores, seed);
|
|
|
|
prebuild_gwn(grid, n, realin, realization, solver, cores, seed);
|
|
|
|
|
|
|
|
|
|
|
|
/*forward fourier transform of the GWN*/
|
|
|
|
/*forward fourier transform of the GWN*/
|
|
|
|
|
|
|
|
printf("Running with realization and ireal\n");
|
|
|
|
fourt(realization, ireal, n, NDIM, 1, 0, workr, worki, cores);
|
|
|
|
fourt(realization, ireal, n, NDIM, 1, 0, workr, worki, cores);
|
|
|
|
|
|
|
|
|
|
|
|
/* build realization in spectral domain */
|
|
|
|
/* build realization in spectral domain */
|
|
|
@ -82,6 +84,7 @@ void FFTMA2(struct vario_mod variogram, struct grid_mod grid, int n[3], struct r
|
|
|
|
remove("covar.txt");
|
|
|
|
remove("covar.txt");
|
|
|
|
|
|
|
|
|
|
|
|
/*backward fourier transform*/
|
|
|
|
/*backward fourier transform*/
|
|
|
|
|
|
|
|
printf("Running with realization and ireal\n");
|
|
|
|
fourt(realization, ireal, n, NDIM, 0, 1, workr, worki, cores);
|
|
|
|
fourt(realization, ireal, n, NDIM, 0, 1, workr, worki, cores);
|
|
|
|
|
|
|
|
|
|
|
|
chunk_array_free(ireal);
|
|
|
|
chunk_array_free(ireal);
|
|
|
|