You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
simulacion-permeabilidad/fftma_module/gen/include/toolsFFTMA.h

74 lines
3.1 KiB
C

#include "genlib.h"
#include "geostat.h"
#include "file_array.h"
#include <stdlib.h>
#include <string.h>
#ifndef _TOOLSFFTMA_H
#define _TOOLSFFTMA_H
/* Create december, the 16th 2002 */
/* Modified december, the 9th 2002 */
/* List of functions: */
/* ------------------ */
/* kgeneration, FFTMA2, prebuild_gwn, build_real, , clean_real */
/*FAST FOURIER TRANSFORM Pressure Simulation */
/*Turns a Gaussian white noise vector into a */
/*spatially correlated vector */
/*input: */
/*variogram: structure defining the variogram */
/* model */
/*grid: structure defining the grid */
/*n: vector with the number of cells along the */
/* X, Y and Z axes for the underlying grid */
/* i = [0 1 2] */
/* --> 0 0 0 : n will be computed and */
/* updated as output */
/* --> nx ny nz: these dimensions are used */
/*realin: structure defining a realization - */
/* must be a Gaussian white noise */
/*gradient: macroscopic gradient pression vector */
/*output: */
/*realout: structure defining a realization - */
/*realout2: structure defining a pressure field */
/*realout3: structure defining a xvelocity field */
/*realout4: structure defining a yvelocity field */
/*realout5: structure defining a zvelocity field */
void FFTMA2(struct vario_mod variogram, struct grid_mod grid, int n[3], struct realization_mod* realin, struct realization_mod* realout, int cores, long* seed);
/* prebuild_gwn */
/* Produce a first construction in real space of the Gaussian white noise */
/* grid: structure defining the grid */
/*n: vector with the number of cells along the */
/* X, Y and Z axes for the underlying grid */
/* i = [0 1 2] */
/* --> 0 0 0 : n will be computed and */
/* updated as output */
/* --> nx ny nz: these dimensions are used */
/*realin: structure defining a realization - */
/* must be a Gaussian white noise */
/*realization: structure defining a realization*/
void prebuild_gwn(struct grid_mod grid, int n[3], struct realization_mod* realin, file_array_t* realization, int solver, int cores, long* seed);
/* build_real */
/* build a realization in the spectral domain */
/*n: vector with the number of cells along the */
/* X, Y and Z axes for the underlying grid */
/* i = [0 1 2] */
/* --> 0 0 0 : n will be computed and */
/* updated as output */
/* --> nx ny nz: these dimensions are used */
/*covar: vector defining the covariance in spectral domain */
/*realization: vector defining the real part */
/*ireal: vector defining the i-part */
void build_real(int n[3], int NTOT, file_array_t* covar, file_array_t* realization, file_array_t* ireal, int cores);
void clean_real(struct realization_mod* realin, int n[3], struct grid_mod grid, file_array_t* vectorresult, struct realization_mod* realout, int cores);
#endif // define _TOOLSFFTMA_H