From 028d0a8d9f7f8b2832005fb1117202d5b96dd348 Mon Sep 17 00:00:00 2001 From: Oli Date: Wed, 1 Dec 2021 18:56:58 -0300 Subject: [PATCH] intermediate commit --- fftma_module/gen/include/condor.h | 34 --- fftma_module/gen/include/toolsFFTMA.h | 4 +- fftma_module/gen/include/toolsFFTPSIM.h | 6 +- fftma_module/gen/lib_src/FFTMAmemoire.c | 110 --------- fftma_module/gen/lib_src/FFTPSim.c | 162 ------------- fftma_module/gen/lib_src/FFTPressure.c | 157 ------------- fftma_module/gen/lib_src/FFTtest.c | 68 ------ fftma_module/gen/lib_src/Makefile.libCS106X | 13 -- fftma_module/gen/lib_src/Makefile.libFFTMA | 30 --- fftma_module/gen/lib_src/Makefile.libFFTMA2 | 30 --- fftma_module/gen/lib_src/Makefile.libFFTPSim | 34 --- fftma_module/gen/lib_src/Makefile.libIO | 31 --- fftma_module/gen/lib_src/Makefile_debug | 21 -- fftma_module/gen/lib_src/Py_kgeneration.c | 4 +- fftma_module/gen/lib_src/addstat.c | 106 --------- fftma_module/gen/lib_src/addstat2.c | 119 ---------- fftma_module/gen/lib_src/allouememoire.c | 16 -- fftma_module/gen/lib_src/build_pressure.c | 2 + fftma_module/gen/lib_src/build_real.c | 2 + fftma_module/gen/lib_src/build_velocity.c | 2 + fftma_module/gen/lib_src/cardsin.c | 1 + fftma_module/gen/lib_src/cgrid.c | 2 + fftma_module/gen/lib_src/clean_real.c | 2 + fftma_module/gen/lib_src/clean_real2.c | 50 ---- fftma_module/gen/lib_src/cov_value.c | 2 + fftma_module/gen/lib_src/covariance.c | 2 + fftma_module/gen/lib_src/cubic.c | 2 + fftma_module/gen/lib_src/derivReal.c | 216 ------------------ fftma_module/gen/lib_src/exponential.c | 1 + fftma_module/gen/lib_src/fftma.c | 185 --------------- fftma_module/gen/lib_src/fourt.c | 1 + fftma_module/gen/lib_src/gammf.c | 1 + fftma_module/gen/lib_src/gasdev.c | 1 + fftma_module/gen/lib_src/inputdata.c | 2 +- fftma_module/gen/lib_src/kgeneration.c | 4 +- fftma_module/gen/lib_src/kgeneration2.c | 4 +- .../gen/lib_src/makefileFFTMA_debug.lib | 36 --- fftma_module/gen/lib_src/pgeneration.c | 2 +- fftma_module/gen/lib_src/pgeneration2.c | 2 +- fftma_module/gen/lib_src/prebuild_gwn.c | 8 +- fftma_module/gen/lib_src/readdata.c | 8 +- fftma_module/gen/lib_src/readdata2.c | 8 +- fftma_module/gen/lib_src/readdata3.c | 8 +- fftma_module/gen/lib_src/scanadt.c | 2 + fftma_module/gen/lib_src/simpio.c | 4 + fftma_module/gen/lib_src/toolsFFTMA.h | 4 +- fftma_module/gen/lib_src/toolsFFTPSIM.h | 6 +- fftma_module/gen/moduleFFTMA.c | 2 +- fftma_module/gen/setup.py | 8 - 49 files changed, 57 insertions(+), 1468 deletions(-) delete mode 100755 fftma_module/gen/lib_src/FFTMAmemoire.c delete mode 100755 fftma_module/gen/lib_src/FFTPSim.c delete mode 100755 fftma_module/gen/lib_src/FFTPressure.c delete mode 100755 fftma_module/gen/lib_src/FFTtest.c delete mode 100755 fftma_module/gen/lib_src/Makefile.libCS106X delete mode 100755 fftma_module/gen/lib_src/Makefile.libFFTMA delete mode 100755 fftma_module/gen/lib_src/Makefile.libFFTMA2 delete mode 100755 fftma_module/gen/lib_src/Makefile.libFFTPSim delete mode 100755 fftma_module/gen/lib_src/Makefile.libIO delete mode 100755 fftma_module/gen/lib_src/Makefile_debug delete mode 100755 fftma_module/gen/lib_src/addstat.c delete mode 100755 fftma_module/gen/lib_src/addstat2.c delete mode 100755 fftma_module/gen/lib_src/allouememoire.c delete mode 100755 fftma_module/gen/lib_src/clean_real2.c delete mode 100755 fftma_module/gen/lib_src/derivReal.c delete mode 100755 fftma_module/gen/lib_src/fftma.c delete mode 100755 fftma_module/gen/lib_src/makefileFFTMA_debug.lib diff --git a/fftma_module/gen/include/condor.h b/fftma_module/gen/include/condor.h index 22c6696..e787744 100755 --- a/fftma_module/gen/include/condor.h +++ b/fftma_module/gen/include/condor.h @@ -9,18 +9,6 @@ /*FUNCTIONS*/ /*---------*/ - -/*addstat */ -/*adds mean and variance effects to the N(0,1) realization*/ -/*input: */ -/*realin: structure defining a realization - */ -/* must have zero mean and unit variance */ -/*stat: structure defining the mean and variance */ -/*output: */ -/*realout: structure defining a realization - */ -void addstat(struct realization_mod *realin,struct statistic_mod stat ,struct realization_mod *realout); - - /*condit */ /*conditioning of a Gaussian realization using */ /*the primal kriging approach */ @@ -87,28 +75,6 @@ void dual_condit(int k,struct welldata_mod well,struct vario_mod variogram,struc void dual_condit_gen(int k,struct welldata_mod wellin,struct vario_mod variogram,struct grid_mod grid,struct realization_mod *realin,struct statistic_mod stat, struct realization_mod *realout); - - -/*FAST FOURIER TRANSFORM MOVING AVERAGE METHOD */ -/*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 */ -/*output: */ -/*realout: structure defining a realization - */ -void FFTMA(struct vario_mod variogram,struct grid_mod grid,int n[3],struct realization_mod *realin,struct realization_mod *realout); - - /*FAST FOURIER TRANSFORM MOVING AVERAGE METHOD */ /*PLUS GRADIENT CALCULATIONS - GRADIENTS ARE */ /*CALCULATED FOR THE GRADUAL DEFORMATION PARAMETERS */ diff --git a/fftma_module/gen/include/toolsFFTMA.h b/fftma_module/gen/include/toolsFFTMA.h index 32d5535..2d3a313 100755 --- a/fftma_module/gen/include/toolsFFTMA.h +++ b/fftma_module/gen/include/toolsFFTMA.h @@ -11,7 +11,7 @@ /* List of functions: */ /* ------------------ */ -/* kgeneration, FFTMA2, prebuild_gwn, build_real, addstat2, clean_real */ +/* kgeneration, FFTMA2, prebuild_gwn, build_real, , clean_real */ /*FUNCTIONS*/ @@ -75,8 +75,6 @@ void prebuild_gwn(struct grid_mod grid,int n[3],struct realization_mod *realin,d void build_real(int n[3],int NTOT,double *covar,double *realization,double *ireal); -void addstat2(struct realization_mod *realin,struct statistic_mod stat ,struct realization_mod *realout,struct realization_mod *realout2); - void clean_real(struct realization_mod *realin,int n[3],struct grid_mod grid,double *vectorresult,struct realization_mod *realout); #endif // define _TOOLSFFTMA_H diff --git a/fftma_module/gen/include/toolsFFTPSIM.h b/fftma_module/gen/include/toolsFFTPSIM.h index 27f0a8c..75f0a7e 100755 --- a/fftma_module/gen/include/toolsFFTPSIM.h +++ b/fftma_module/gen/include/toolsFFTPSIM.h @@ -24,7 +24,7 @@ void pgeneration2(int n[3],struct grid_mod grid,struct statistic_mod stat, void FFTPSim(struct vario_mod variogram,struct statistic_mod stat,struct grid_mod grid,int n[3],struct realization_mod *realin,struct pressure_mod gradient,struct realization_mod *realout,struct realization_mod *realout2,struct realization_mod *realout3,struct realization_mod *realout4,struct realization_mod *realout5); -void FFTPressure(int n[3],struct grid_mod grid,struct realization_mod *realin,struct statistic_mod stat,struct pressure_mod gradient,struct realization_mod *realout,struct realization_mod *realout2,struct realization_mod *realout3,struct realization_mod *realout4, int solver); +//void FFTPressure(int n[3],struct grid_mod grid,struct realization_mod *realin,struct statistic_mod stat,struct pressure_mod gradient,struct realization_mod *realout,struct realization_mod *realout2,struct realization_mod *realout3,struct realization_mod *realout4, int solver); void build_pressure(int n[3],struct grid_mod grid,struct pressure_mod gradient,double *realization,double *ireal,double *pressure,double *ipressure); @@ -47,15 +47,11 @@ void total_pressure(struct grid_mod grid,struct pressure_mod gradient,struct rea void total_velocity(struct grid_mod grid,double mean,int direction,struct pressure_mod gradient,struct realization_mod *realout); -void clean_real2(struct realization_mod *realin,int n[3],struct grid_mod grid,int solver,double *vectorresult,struct realization_mod *realout); - void normAxes(double *vec, double *normed); void waveVectorCompute1D(int n,double *vec); void waveVectorCompute3D(int nX,int nY, int nZ, /*float dX, float dY, float dZ,*/ double nDir[3], double *waveVect); -void derivReal(struct realization_mod *Z, struct realization_mod *dZ, double *dir, struct grid_mod *grid, struct vario_mod vario); - void mat_vec(double *C, double *x, double *b, int n); diff --git a/fftma_module/gen/lib_src/FFTMAmemoire.c b/fftma_module/gen/lib_src/FFTMAmemoire.c deleted file mode 100755 index 15d7f04..0000000 --- a/fftma_module/gen/lib_src/FFTMAmemoire.c +++ /dev/null @@ -1,110 +0,0 @@ -#include -#include -#include -#include "geostat.h" - - -/*FAST FOURIER TRANSFORM MOVING AVERAGE METHOD */ -/*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 */ -/*output: */ -/*realout: structure defining a realization - */ - -void FFTMA2(struct vario_mod variogram,struct grid_mod grid,int n[3],struct realization_mod *realin,struct realization_mod *realout) -{ - int NTOT,i,j,k,NMAX,NDIM,ntot,nmax,NXYZ,nxyz,maille0,maille1; - int solver; - double temp; - double *ireal,*covar,*workr,*worki,*realization; - string variable; - - /*covariance axis normalization*/ - axes(variogram.ap,variogram.scf,variogram.Nvario); - - /*pseudo-grid definition*/ - cgrid(variogram,grid,n); - - /*constant definition*/ - NTOT = n[0]*n[1]*n[2]; - ntot = NTOT+1; - NMAX = n[0]; - NDIM = 3; - for (i=1;i<3;i++) { - if (n[i] > NMAX) - NMAX = n[i]; - if (n[i] == 1) - NDIM--; - } - nmax = NMAX+1; - NXYZ = grid.NX*grid.NY*grid.NZ; - nxyz = NXYZ+1; - - /*array initialization*/ - covar = (double *) malloc(ntot * sizeof(double)); -/* testmemory(covar); */ - allouememoire(covar,'covar'); - - - - - ireal = (double *) malloc(ntot * sizeof(double)); - testmemory(ireal); - - realization = (double *) malloc(ntot * sizeof(double)); - testmemory(realization); - - workr = (double *) malloc(nmax * sizeof(double)); - testmemory(workr); - - worki = (double *) malloc(nmax * sizeof(double)); - testmemory(worki); - - /*covariance function creation*/ - covariance(covar,variogram,grid,n); - - /*power spectrum*/ - fourt(covar,ireal,n,NDIM,1,0,workr,worki); - - /*organization of the input Gaussian white noise*/ - solver=0; - prebuild_gwn(grid,n,realin,realization,solver); - - /*forward fourier transform of the GWN*/ - fourt(realization,ireal,n,NDIM,1,0,workr,worki); - - /* build realization in spectral domain */ - build_real(n,NTOT,covar,realization,ireal); - - free(covar); - - /*backward fourier transform*/ - fourt(realization,ireal,n,NDIM,0,1,workr,worki); - - - free(ireal); - free(workr); - free(worki); - - /*output realization*/ - clean_real(realin,n,grid,realization,realout); - - free(realization); - - return; -} - - - - diff --git a/fftma_module/gen/lib_src/FFTPSim.c b/fftma_module/gen/lib_src/FFTPSim.c deleted file mode 100755 index 0f65c29..0000000 --- a/fftma_module/gen/lib_src/FFTPSim.c +++ /dev/null @@ -1,162 +0,0 @@ -#include -#include -#include "geostat.h" -#include "toolsludo.h" - - -/*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 FFTPSim(struct vario_mod variogram,struct statistic_mod stat,struct grid_mod grid,int n[3],struct realization_mod *realin,struct pressure_mod gradient,struct realization_mod *realout,struct realization_mod *realout2,struct realization_mod *realout3,struct realization_mod *realout4,struct realization_mod *realout5) - -{ - int NTOT,i,j,k,NMAX,NDIM,ntot,nmax,NXYZ,nxyz,maille0,maille1; - double *workr,*worki,temp,temp2,coeff; - double *covar,*realization,*pressure; - double *icovar,*ireal,*ipressure; - double *xvelocity,*ixvelocity,*yvelocity,*iyvelocity,*zvelocity,*izvelocity; - double ki,kj,kk; - - /*covariance axis normalization*/ - axes(variogram.ap,variogram.scf,variogram.Nvario); - - /*pseudo-grid definition*/ - cgrid(variogram,grid,n); - - /*constant definition*/ - NTOT = n[0]*n[1]*n[2]; - ntot = NTOT+1; - NMAX = n[0]; - NDIM = 3; - for (i=1;i<3;i++) { - if (n[i] > NMAX) - NMAX = n[i]; - if (n[i] == 1) - NDIM--; - } - nmax = NMAX+1; - NXYZ = grid.NX*grid.NY*grid.NZ; - nxyz = NXYZ+1; - - /*array initialization*/ - covar = (double *) malloc(ntot * sizeof(double)); - testmemory(covar); - - icovar = (double *) malloc(ntot * sizeof(double)); - testmemory(icovar); - - realization = (double *) malloc(ntot * sizeof(double)); - testmemory(realization); - - ireal = (double *) malloc(ntot * sizeof(double)); - testmemory(ireal); - - pressure = (double *) malloc(ntot * sizeof(double)); - testmemory(pressure); - - ipressure = (double *) malloc(ntot * sizeof(double)); - testmemory(ipressure); - - xvelocity = (double *) malloc(ntot * sizeof(double)); - testmemory(xvelocity); - - ixvelocity = (double *) malloc(ntot * sizeof(double)); - testmemory(ixvelocity); - - yvelocity = (double *) malloc(ntot * sizeof(double)); - testmemory(yvelocity); - - iyvelocity = (double *) malloc(ntot * sizeof(double)); - testmemory(iyvelocity); - - zvelocity = (double *) malloc(ntot * sizeof(double)); - testmemory(zvelocity); - - izvelocity = (double *) malloc(ntot * sizeof(double)); - testmemory(izvelocity); - - workr = (double *) malloc(nmax * sizeof(double)); - testmemory(workr); - - worki = (double *) malloc(nmax * sizeof(double)); - testmemory(worki); - - /*covariance function creation*/ - covariance(covar,variogram,grid,n); - - /*power spectrum*/ - fourt(covar,icovar,n,NDIM,1,0,workr,worki); - - /*organization of the input Gaussian white noise*/ - - prebuild_gwn(grid,n,realin,realization); - - /*forward fourier transform of the GWN*/ - fourt(realization,ireal,n,NDIM,1,0,workr,worki); - - /* build realization in spectral domain */ - build_real(n,NTOT,covar,realization,ireal); - - free(covar); - - /* pressure calculation in the spectral domain*/ - - build_pressure(n,grid,gradient,realization,ireal,pressure,ipressure); - build_velocity(n,grid,stat,gradient,realization,ireal,xvelocity,ixvelocity,1); - build_velocity(n,grid,stat,gradient,realization,ireal,yvelocity,iyvelocity,2); - build_velocity(n,grid,stat,gradient,realization,ireal,zvelocity,izvelocity,3); - - /*backward fourier transform*/ - fourt(realization,ireal,n,NDIM,0,1,workr,worki); - fourt(pressure,ipressure,n,NDIM,0,1,workr,worki); - fourt(xvelocity,ixvelocity,n,NDIM,0,1,workr,worki); - fourt(yvelocity,iyvelocity,n,NDIM,0,1,workr,worki); - fourt(zvelocity,izvelocity,n,NDIM,0,1,workr,worki); - - free(ireal); - free(ipressure); - free(ixvelocity); - free(iyvelocity); - free(izvelocity); - free(workr); - free(worki); - - /*output realization*/ - /*is the output realization already allocated?*/ - /*if not, memory allocation*/ - - clean_real(realin,n,grid,realization,realout); - clean_real(realin,n,grid,pressure,realout2); - clean_real(realin,n,grid,xvelocity,realout3); - clean_real(realin,n,grid,yvelocity,realout4); - clean_real(realin,n,grid,zvelocity,realout5); - - free(realization); - free(pressure); - free(xvelocity); - free(yvelocity); - free(zvelocity); - - return; -} diff --git a/fftma_module/gen/lib_src/FFTPressure.c b/fftma_module/gen/lib_src/FFTPressure.c deleted file mode 100755 index 15ab392..0000000 --- a/fftma_module/gen/lib_src/FFTPressure.c +++ /dev/null @@ -1,157 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "geostat.h" -#include "pressure.h" - - -/*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 FFTPressure(int n[3],struct grid_mod grid,struct realization_mod *realin,struct statistic_mod stat,struct pressure_mod gradient,struct realization_mod *realout,struct realization_mod *realout2,struct realization_mod *realout3,struct realization_mod *realout4,int solver) - -{ - int NTOT,i,j,k,NMAX,NDIM,ntot,nmax,NXYZ,nxyz,maille0,maille1; - double *workr,*worki,temp,temp2,coeff; - double *realization,*pressure; - double *ireal,*ipressure; - double *xvelocity,*ixvelocity,*yvelocity,*iyvelocity,*zvelocity,*izvelocity; - double ki,kj,kk; - FILE *fp; -/* string nomfichier; */ - - /*constant definition*/ - NTOT = n[0]*n[1]*n[2]; - ntot = NTOT+1; - NMAX = n[0]; - NDIM = 3; - for (i=1;i<3;i++) { - if (n[i] > NMAX) - NMAX = n[i]; - if (n[i] == 1) - NDIM--; - } - nmax = NMAX+1; - NXYZ = grid.NX*grid.NY*grid.NZ; - nxyz = NXYZ+1; - - realization = (double *) malloc(ntot * sizeof(double)); - testmemory(realization); - - ireal = (double *) malloc(ntot * sizeof(double)); - testmemory(ireal); - - pressure = (double *) malloc(ntot * sizeof(double)); - testmemory(pressure); - - ipressure = (double *) malloc(ntot * sizeof(double)); - testmemory(ipressure); - - xvelocity = (double *) malloc(ntot * sizeof(double)); - testmemory(xvelocity); - - ixvelocity = (double *) malloc(ntot * sizeof(double)); - testmemory(ixvelocity); - - yvelocity = (double *) malloc(ntot * sizeof(double)); - testmemory(yvelocity); - - iyvelocity = (double *) malloc(ntot * sizeof(double)); - testmemory(iyvelocity); - - zvelocity = (double *) malloc(ntot * sizeof(double)); - testmemory(zvelocity); - - izvelocity = (double *) malloc(ntot * sizeof(double)); - testmemory(izvelocity); - - workr = (double *) malloc(nmax * sizeof(double)); - testmemory(workr); - - worki = (double *) malloc(nmax * sizeof(double)); - testmemory(worki); - - /*organization of the realization*/ - prebuild_gwn(grid,n,realin,realization,solver); - - /*forward fourier transform of the GWN*/ - fourt(realization,ireal,n,NDIM,1,0,workr,worki); - - /* pressure calculation in the spectral domain*/ - - build_pressure(n,grid,gradient,realization,ireal,pressure,ipressure); - - build_velocity(n,grid,stat,gradient,realization,ireal,xvelocity,ixvelocity,1); - build_velocity(n,grid,stat,gradient,realization,ireal,yvelocity,iyvelocity,2); - build_velocity(n,grid,stat,gradient,realization,ireal,zvelocity,izvelocity,3); - - /*backward fourier transform*/ - fourt(realization,ireal,n,NDIM,0,1,workr,worki); - fourt(pressure,ipressure,n,NDIM,0,1,workr,worki); - fourt(xvelocity,ixvelocity,n,NDIM,0,1,workr,worki); - fourt(yvelocity,iyvelocity,n,NDIM,0,1,workr,worki); - fourt(zvelocity,izvelocity,n,NDIM,0,1,workr,worki); - - free(ireal); - free(ipressure); - free(ixvelocity); - free(iyvelocity); - free(izvelocity); - free(workr); - free(worki); - - for (i=1;i<=NTOT;i++) - realization[i]=realization[i]/(double) NTOT; - - fp = fopen("realization.test", "w"); - for (i=1;i<=NTOT;i++) - fprintf(fp,"%f\n",realization[i]); - fclose(fp); - -/* nomfichier="pression.test"; */ - fp = fopen("pression.test", "w"); - for (i=1;i<=NTOT;i++) - fprintf(fp,"%f\n",pressure[i]); - fclose(fp); - - /*output realization*/ - /*is the output realization already allocated?*/ - /*if not, memory allocation*/ - - clean_real2(realin,n,grid,solver,pressure,realout); - clean_real2(realin,n,grid,solver,xvelocity,realout2); - clean_real2(realin,n,grid,solver,yvelocity,realout3); - clean_real2(realin,n,grid,solver,zvelocity,realout4); - - /* free(realization); */ - /* free(pressure); */ - /* free(xvelocity); */ - /* free(yvelocity); */ - /* free(zvelocity); */ - - return; -} diff --git a/fftma_module/gen/lib_src/FFTtest.c b/fftma_module/gen/lib_src/FFTtest.c deleted file mode 100755 index 9f88ee0..0000000 --- a/fftma_module/gen/lib_src/FFTtest.c +++ /dev/null @@ -1,68 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "geostat.h" - - -/*FAST FOURIER TRANSFORM Test */ - -void FFTtest(int n[3],struct grid_mod grid,struct realization_mod *realin,struct realization_mod *realout,int solver) - -{ - int NTOT,i,j,k,NMAX,NDIM,ntot,nmax,NXYZ,nxyz,maille0,maille1; - double *workr,*worki,temp,temp2,coeff; - double *realization; - double *ireal; - double ki,kj,kk; - FILE *fp; - - /*constant definition*/ - NTOT = n[0]*n[1]*n[2]; - ntot = NTOT+1; - NMAX = n[0]; - NDIM = 3; - for (i=1;i<3;i++) { - if (n[i] > NMAX) - NMAX = n[i]; - if (n[i] == 1) - NDIM--; - } - nmax = NMAX+1; - NXYZ = grid.NX*grid.NY*grid.NZ; - nxyz = NXYZ+1; - - realization = (double *) malloc(ntot * sizeof(double)); - testmemory(realization); - - ireal = (double *) malloc(ntot * sizeof(double)); - testmemory(ireal); - - workr = (double *) malloc(nmax * sizeof(double)); - testmemory(workr); - - worki = (double *) malloc(nmax * sizeof(double)); - testmemory(worki); - - /*organization of the realization*/ - prebuild_gwn(grid,n,realin,realization,solver); - - fp = fopen("perm.test", "w"); - for (i=1;i<=NTOT;i++) - fprintf(fp,"%f\n",realization[i]); - fclose(fp); - - /*forward fourier transform of the GWN*/ - fourt(realization,ireal,n,NDIM,1,0,workr,worki); - - /*backward fourier transform*/ - fourt(realization,ireal,n,NDIM,0,1,workr,worki); - - fp = fopen("perm2.test", "w"); - for (i=1;i<=NTOT;i++) - fprintf(fp,"%f\n",realization[i]); - fclose(fp); - return; -} diff --git a/fftma_module/gen/lib_src/Makefile.libCS106X b/fftma_module/gen/lib_src/Makefile.libCS106X deleted file mode 100755 index ccef6b8..0000000 --- a/fftma_module/gen/lib_src/Makefile.libCS106X +++ /dev/null @@ -1,13 +0,0 @@ -CC = cc -CCFLAG = - -LIB = libCS106X_${ARCH}.a -%.o: %.c - $(CC) $(CCFLAG) -c $< - - -$(LIB) : genlib.o random.o simpio.o strlib.o symtab.o scanadt.o stack.o - ar r $@ $? - -clean : - rm *.o diff --git a/fftma_module/gen/lib_src/Makefile.libFFTMA b/fftma_module/gen/lib_src/Makefile.libFFTMA deleted file mode 100755 index a492b20..0000000 --- a/fftma_module/gen/lib_src/Makefile.libFFTMA +++ /dev/null @@ -1,30 +0,0 @@ - -######################################################################## -# -# Makefile for library -# -######################################################################## - - -INTERFACE = ../include -INCLUDE = -I${INTERFACE} -LIBS = -lm -L../lib -CC = cc -CCFLAGS = - -LIB = libFFTMA_${ARCH}.a - -NOBJS= gammf.o fftma.o addstat.o axes.o cgrid.o covariance.o fourt.o length.o maxfactor.o test_fact.o cov_value.o generate.o gasdev.o ran2.o stable.o gaussian.o power.o cubic.o spherical.o nugget.o exponential.o cardsin.o nor2log.o - - -.c.o: - ${CC} $(INCLUDE) $(CCFLAGS) -c $< - -# LIBRARY -$(LIB) : $(NOBJS) - ar cr $(LIB) $(NOBJS) - ranlib $(LIB) - -clean : - rm *.o - diff --git a/fftma_module/gen/lib_src/Makefile.libFFTMA2 b/fftma_module/gen/lib_src/Makefile.libFFTMA2 deleted file mode 100755 index 09fc204..0000000 --- a/fftma_module/gen/lib_src/Makefile.libFFTMA2 +++ /dev/null @@ -1,30 +0,0 @@ - -######################################################################## -# -# Makefile for library -# -######################################################################## - - -INTERFACE = ../include - -INCLUDE = -I${INTERFACE} -LIBS = -lm -L../lib -CC = cc - CCFLAGS = - -LIB = libFFTMA2_${ARCH}.a - -NOBJS= kgeneration.o kgeneration2.o fftma2.o prebuild_gwn.o build_real.o addstat2.o clean_real.o - -.c.o: - ${CC} $(INCLUDE) $(CCFLAGS) -c $< - -# LIBRARY -$(LIB) : $(NOBJS) - ar cr $(LIB) $(NOBJS) - ranlib $(LIB) - -clean : - rm *.o - diff --git a/fftma_module/gen/lib_src/Makefile.libFFTPSim b/fftma_module/gen/lib_src/Makefile.libFFTPSim deleted file mode 100755 index 49f4e7a..0000000 --- a/fftma_module/gen/lib_src/Makefile.libFFTPSim +++ /dev/null @@ -1,34 +0,0 @@ - -######################################################################## -# -# Makefile for library -# -######################################################################## - - -#INTERFACE = ${BOSSE}/CODES/LIBS_C/Interface -#INTERFACE2= ${BOSSE}/CODES/Geostat/FFTPSim/Version_binaire2/src/Interface - -INTERFACE = ../include -#INTERFACE2= ../Interface - -INCLUDE = -I${INTERFACE} -LIBS = -lm -L../lib -CCFLAGS = -CC = cc - -LIB = libFFTPSIM_${ARCH}.a - -NOBJS= pgeneration.o pgeneration2.o FFTPressure.o FFTtest.o build_pressure.o build_velocity.o total_pressure.o total_velocity.o clean_real2.o waveVectorCompute3D.o mat_vec.o derivReal.o - -.c.o: - ${CC} $(INCLUDE) $(CCFLAGS) -c $< - -# LIBRARY -$(LIB) : $(NOBJS) - ar cr $(LIB) $(NOBJS) - ranlib $(LIB) - -clean : - rm *.o - diff --git a/fftma_module/gen/lib_src/Makefile.libIO b/fftma_module/gen/lib_src/Makefile.libIO deleted file mode 100755 index 6c4b2af..0000000 --- a/fftma_module/gen/lib_src/Makefile.libIO +++ /dev/null @@ -1,31 +0,0 @@ -# -######################################################################## -# -# Makefile for library -# -######################################################################## -# - -#INTERFACE = ${BOSSE}/CODES/LIBS_C/Interface -INTERFACE = ../include - -INCLUDE = -I${INTERFACE} -CC = cc -CCFLAGS = - - -LIB = libIO_${ARCH}.a - -NOBJS= inputdata.o inputfiledata.o debuginput.o readdata.o readfile_bin.o writefile.o writefile_bin.o testmemory.o testopenfile.o readdata2.o readdata3.o - -.c.o: - ${CC} $(INCLUDE) $(CCFLAGS) -c $< - -# LIBRARY -$(LIB) : $(NOBJS) - ar cr $(LIB) $(NOBJS) - ranlib $(LIB) - -clean : - rm *.o - diff --git a/fftma_module/gen/lib_src/Makefile_debug b/fftma_module/gen/lib_src/Makefile_debug deleted file mode 100755 index 0ecafef..0000000 --- a/fftma_module/gen/lib_src/Makefile_debug +++ /dev/null @@ -1,21 +0,0 @@ -# CC = gcc -# CCFLAG = - -ifeq (${ARCH},sun) - CC = cc - CCFLAG = -g -endif -ifeq (${ARCH},linux) - CC = gcc - CCFLAG = -g -endif -LIB = libCS106X_debug_${ARCH}.a -%.o: %.c - $(CC) $(CCFLAG) -c $< - - -$(LIB) : genlib.o random.o simpio.o strlib.o symtab.o scanadt.o stack.o - ar r $@ $? - -clean : - rm *.o diff --git a/fftma_module/gen/lib_src/Py_kgeneration.c b/fftma_module/gen/lib_src/Py_kgeneration.c index 7ed8be7..9c5bf2f 100755 --- a/fftma_module/gen/lib_src/Py_kgeneration.c +++ b/fftma_module/gen/lib_src/Py_kgeneration.c @@ -47,8 +47,8 @@ void Py_kgeneration(long seed,struct grid_mod grid,struct statistic_mod stat,st FFTMA2(variogram,grid,n,Z,Y); /*add the statistics*/ - if (stat.mean[0] != 0 || stat.variance[0]!= 1) - addstat2(Y,stat,Y1,Y); + //if (stat.mean[0] != 0 || stat.variance[0]!= 1) + //addstat2(Y,stat,Y1,Y); /* make a log normal realization */ if (stat.type==1 || stat.type==2){ diff --git a/fftma_module/gen/lib_src/addstat.c b/fftma_module/gen/lib_src/addstat.c deleted file mode 100755 index ffcb781..0000000 --- a/fftma_module/gen/lib_src/addstat.c +++ /dev/null @@ -1,106 +0,0 @@ -#include -#include -#include "geostat.h" -#include "genlib.h" - - -/*addstat */ -/*adds mean and variance effects to the N(0,1) realization*/ -/*input: */ -/*realin: structure defining a realization - */ -/* must have zeio mean and unit variance */ -/*stat: structure defining the mean and variance */ -/*output: */ -/*realout: structure defining a realization - */ -void addstat(struct realization_mod *realin,struct statistic_mod stat ,struct realization_mod *realout) - -{ - - int i,nblockm,nblockv; - double r,moy,var; - - /*Is the output realization allocated ?*/ - /*is its length equal to realin.n?*/ - if ((*realout).vector == NULL || (*realout).n != (*realin).n) { - (*realout).vector = (double *) malloc((*realin).n * sizeof(double)); - if ((*realout).vector == NULL) - Error("No memory available"); - } - (*realout).n = (*realin).n; - - - /*test over the input realization*/ - switch ((*realin).code) { - case 0: - case 1: - (*realout).code = 2; - break; - case 6: - (*realout).code = 7; - break; - default: - (*realout).code = (*realin).code; - break; - } - - for (i = 0; i < (*realin).n; i++) { - - - /*mean*/ - switch (stat.nblock_mean) { - case 1: - /*stationary case*/ - nblockm = 1; - break; - default: - /*number of the cell - nonstationary case*/ - nblockm = i+1; - break; - } - - - /*variance*/ - switch (stat.nblock_var) { - case 1: - /*stationary case*/ - nblockv = 1; - break; - default: - /*number of the cell - nonstationary case*/ - nblockv = i+1; - break; - } - - - switch (stat.type) { - case 0: - /*normal case*/ - moy = stat.mean[nblockm-1]; - var = stat.variance[nblockv-1]; - break; - case 1: - /*lognormal (natural) case*/ - r = (double)sqrt(stat.variance[nblockv-1])/stat.mean[nblockm-1]; - r *= r; - moy = (double)log(stat.mean[nblockm-1]/sqrt(1.0+r)); - var = (double)log(1.0+r); - break; - case 2: - /*lognormal (log10) case*/ - r = (double)sqrt(stat.variance[nblockv-1])/stat.mean[nblockm-1]; - r *= r; - moy = (double)log10(stat.mean[nblockm-1]/sqrt(1.0+r)); - var = (double)log10(1.0+r); - break; - default: - Error("Type not defined in addstat"); - break; - } - - - - (*realout).vector[i] = (double)sqrt(var)*(*realin).vector[i]+moy; - } - - return; -} diff --git a/fftma_module/gen/lib_src/addstat2.c b/fftma_module/gen/lib_src/addstat2.c deleted file mode 100755 index 3096d0f..0000000 --- a/fftma_module/gen/lib_src/addstat2.c +++ /dev/null @@ -1,119 +0,0 @@ -#include -#include -#include "genlib.h" -#include "geostat.h" - -/*addstat */ -/*adds mean and variance effects to the N(0,1) realization*/ -/*input: */ -/*realin: structure defining a realization - */ -/* must have zeio mean and unit variance */ -/*stat: structure defining the mean and variance */ -/*output: */ -/*realout: structure defining a realization - */ - -void addstat2(struct realization_mod *realin,struct statistic_mod stat ,struct realization_mod *realout,struct realization_mod *realout2) - -{ - - int i,nblockm,nblockv; - double r,moy,var; - - /*Is the output realization allocated ?*/ - /*is its length equal to realin.n?*/ - if ((*realout).vector == NULL || (*realout).n != (*realin).n) { - (*realout).vector = (double *) malloc((*realin).n * sizeof(double)); - if ((*realout).vector == NULL) - Error("No memory available"); - } - (*realout).n = (*realin).n; - - if ((*realout2).vector == NULL || (*realout2).n != (*realin).n) { - (*realout2).vector = (double *) malloc((*realin).n * sizeof(double)); - if ((*realout2).vector == NULL) - Error("No memory available"); - } - (*realout2).n = (*realin).n; - - - /*test over the input realization*/ - switch ((*realin).code) { - case 0: - case 1: - (*realout).code = 2; - (*realout2).code = 2; - break; - case 6: - (*realout).code = 7; - (*realout2).code = 7; - break; - default: - (*realout).code = (*realin).code; - (*realout2).code = (*realin).code; - break; - } - - for (i = 0; i < (*realin).n; i++) { - - - /*mean*/ - switch (stat.nblock_mean) { - case 1: - /*stationary case*/ - nblockm = 1; - break; - default: - /*number of the cell - nonstationary case*/ - nblockm = i+1; - break; - } - - - /*variance*/ - switch (stat.nblock_var) { - case 1: - /*stationary case*/ - nblockv = 1; - break; - default: - /*number of the cell - nonstationary case*/ - nblockv = i+1; - break; - } - - - /* switch (stat.type) { */ -/* case 0: */ - - /*normal case*/ - moy = stat.mean[nblockm-1]; - var = stat.variance[nblockv-1]; - -/* break; */ -/* case 1: */ - /*lognormal (natural) case*/ -/* r = (double)sqrt(stat.variance[nblockv-1])/stat.mean[nblockm-1]; */ -/* r *= r; */ -/* moy = (double)log(stat.mean[nblockm-1]/sqrt(1.0+r)); */ -/* var = (double)log(1.0+r); */ -/* break; */ -/* case 2: */ - /*lognormal (log10) case*/ -/* r = (double)sqrt(stat.variance[nblockv-1])/stat.mean[nblockm-1]; */ -/* r *= r; */ -/* moy = (double)log10(stat.mean[nblockm-1]/sqrt(1.0+r)); */ -/* var = (double)log10(1.0+r); */ -/* break; */ -/* default: */ -/* Error("Type not defined in addstat"); */ -/* break; */ -/* } */ - - - - (*realout).vector[i] = (double)sqrt(var)*(*realin).vector[i]; - (*realout2).vector[i] = (double)sqrt(var)*(*realin).vector[i]+moy; - } - - return; -} diff --git a/fftma_module/gen/lib_src/allouememoire.c b/fftma_module/gen/lib_src/allouememoire.c deleted file mode 100755 index 78f6975..0000000 --- a/fftma_module/gen/lib_src/allouememoire.c +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include -#include -#include -#include -#include - -void allouememoire(double *realint, string variable) -{ - - if (realint == NULL) { - printf("Testmemory.c: No memory available for %s\n",variable); - exit; - } - return; -} diff --git a/fftma_module/gen/lib_src/build_pressure.c b/fftma_module/gen/lib_src/build_pressure.c index b9ded34..dd2f7b1 100755 --- a/fftma_module/gen/lib_src/build_pressure.c +++ b/fftma_module/gen/lib_src/build_pressure.c @@ -16,6 +16,8 @@ void build_pressure(int n[3],struct grid_mod grid,struct pressure_mod gradient,d double ki,kj,kk; double coeff,temp,temp2; + printf("build pressure pdslis\n"); + /* pressure calculation in the spectral domain*/ for ( k = 1; k <= n[2]; k++) { for (j = 1; j <= n[1]; j++) { diff --git a/fftma_module/gen/lib_src/build_real.c b/fftma_module/gen/lib_src/build_real.c index 4a0e186..b7fa847 100755 --- a/fftma_module/gen/lib_src/build_real.c +++ b/fftma_module/gen/lib_src/build_real.c @@ -23,6 +23,8 @@ void build_real(int n[3],int NTOT,double *covar,double *realization,double *irea int i,j,k,maille1; double temp; + printf("build real\n"); + /*decomposition and multiplication in the spectral domain*/ for ( k = 1; k <= n[2]; k++) { diff --git a/fftma_module/gen/lib_src/build_velocity.c b/fftma_module/gen/lib_src/build_velocity.c index 7511c4d..12497b0 100755 --- a/fftma_module/gen/lib_src/build_velocity.c +++ b/fftma_module/gen/lib_src/build_velocity.c @@ -18,6 +18,8 @@ void build_velocity(int n[3],struct grid_mod grid,struct statistic_mod stat,stru double coeff,temp,temp2; double grad; + printf("build velocity\n"); + /* x-direction velocity calculation in the spectral domain*/ switch(direction) { diff --git a/fftma_module/gen/lib_src/cardsin.c b/fftma_module/gen/lib_src/cardsin.c index 504f286..0846fea 100755 --- a/fftma_module/gen/lib_src/cardsin.c +++ b/fftma_module/gen/lib_src/cardsin.c @@ -5,6 +5,7 @@ /*cardsin covariance function*/ double cardsin(double h) { + printf("cardsin\n"); float delta = 20.371; double z; diff --git a/fftma_module/gen/lib_src/cgrid.c b/fftma_module/gen/lib_src/cgrid.c index 19baee0..52f2505 100755 --- a/fftma_module/gen/lib_src/cgrid.c +++ b/fftma_module/gen/lib_src/cgrid.c @@ -14,6 +14,8 @@ void cgrid(struct vario_mod variogram, struct grid_mod grid, int n[3]) { int i,N; double D; + + printf("cgrid\n"); if (n == NULL || n[0] == 0 || n[1] == 0 || n[2] == 0) { for (i = 0; i<3; i++) { diff --git a/fftma_module/gen/lib_src/clean_real.c b/fftma_module/gen/lib_src/clean_real.c index d249b18..313710f 100755 --- a/fftma_module/gen/lib_src/clean_real.c +++ b/fftma_module/gen/lib_src/clean_real.c @@ -11,6 +11,8 @@ void clean_real(struct realization_mod *realin,int n[3],struct grid_mod grid,dou int i,j,k,maille0,maille1; double NTOT; + printf("clean_real\n"); + NTOT=n[0]*n[1]*n[2]; /*is the output realization already allocated?*/ /*if not, memory allocation*/ diff --git a/fftma_module/gen/lib_src/clean_real2.c b/fftma_module/gen/lib_src/clean_real2.c deleted file mode 100755 index 058be88..0000000 --- a/fftma_module/gen/lib_src/clean_real2.c +++ /dev/null @@ -1,50 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "geostat.h" - -void clean_real2(struct realization_mod *realin,int n[3],struct grid_mod grid,int solver,double *vectorresult,struct realization_mod *realout) -{ - int i,j,k,maille0,maille1; - double NTOT; - - NTOT=n[0]*n[1]*n[2]; - /*is the output realization already allocated?*/ - /*if not, memory allocation*/ - - if ((*realout).vector == NULL || (*realout).n != (*realin).n) - { - (*realout).vector = (double *) malloc((*realin).n * sizeof(double)); - if ((*realout).vector == NULL) - { - printf("Clean_real2.c: No memory available\n"); - exit; - } - } - - (*realout).n = (*realin).n; - (*realout).code = 1; - if (solver==1) - { - for ( k = 1; k <= NTOT;k++) - { - (*realout).vector[k-1] = vectorresult[k]/(double) NTOT; - } - } - else - { - for ( k = 1; k <= grid.NZ; k++) { - for (j = 1; j <= grid.NY; j++) { - for (i = 1; i <= grid.NX; i++) { - maille1 = i+(j-1+(k-1)*n[1])*n[0]; - maille0 = i-1+(j-1+(k-1)*grid.NY)*grid.NX; - (*realout).vector[maille0] = vectorresult[maille1]/(double) NTOT; - } - } - } - } - return; -} diff --git a/fftma_module/gen/lib_src/cov_value.c b/fftma_module/gen/lib_src/cov_value.c index e7baf5d..a97ea10 100755 --- a/fftma_module/gen/lib_src/cov_value.c +++ b/fftma_module/gen/lib_src/cov_value.c @@ -9,6 +9,8 @@ double cov_value(struct vario_mod variogram,double di,double dj,double dk) double cov; int k; + printf("cov_valueds\n"); + cov = 0.; diff --git a/fftma_module/gen/lib_src/covariance.c b/fftma_module/gen/lib_src/covariance.c index 4678b2a..102f458 100755 --- a/fftma_module/gen/lib_src/covariance.c +++ b/fftma_module/gen/lib_src/covariance.c @@ -7,6 +7,8 @@ void covariance(double *covar, struct vario_mod variogram, struct grid_mod mesh, { int i,j,k,maille,n2[3],symmetric; double di,dj,dk; + + printf("covaridsadsncdse\n"); for (i=0;i<3;i++) diff --git a/fftma_module/gen/lib_src/cubic.c b/fftma_module/gen/lib_src/cubic.c index f4247b2..6aed71a 100755 --- a/fftma_module/gen/lib_src/cubic.c +++ b/fftma_module/gen/lib_src/cubic.c @@ -8,6 +8,8 @@ double cubic(double h) { double z; + printf("cubidsc\n"); + if (h >= 1.) { z = 0.; } else { diff --git a/fftma_module/gen/lib_src/derivReal.c b/fftma_module/gen/lib_src/derivReal.c deleted file mode 100755 index 7e7e02b..0000000 --- a/fftma_module/gen/lib_src/derivReal.c +++ /dev/null @@ -1,216 +0,0 @@ -#include -#include -#include -#include "condor.h" -#include "geostat.h" - -/* Private functions */ -void normAxes(double *vec, double *normed); - - -void derivReal(struct realization_mod *Z, struct realization_mod *dZ, double *dir, struct grid_mod *grid, struct vario_mod vario) { - - int n[3],i,j,k,maille,extMaille; - int NTOT,ntot,NMAX,nmax,NDIM; -// int NXYZ,nxyz; - double nDir[3]; - double *table,*workr,*worki,*realization,*waveVect; - - - int Ngrid; - double tmp; - double *ExtendedWaveVect; - -/* Test the input real*/ -/* if ((*Z).code != 1) { */ -/* printf("Realization should be Standard Normal\n"); */ -/* return; */ -/* } */ - - printf("grid.Nx = %d\n",(*grid).NX); - printf("grid.Ny = %d\n",(*grid).NY); - printf("grid.Nz = %d\n",(*grid).NZ); - - printf("vario.Nvario = %d\n",vario.Nvario); - for(i=0; i NMAX) NMAX = n[i]; - if (n[i] == 1) NDIM = NDIM-1; - } - nmax = NMAX+1; - - printf("NTOT = %d, ntot = %d, NMAX = %d\n",NTOT,ntot,NMAX); - -/* wave vector computation */ - normAxes(dir,nDir); - printf("Derivation direction (normed) %f %f %f\n",nDir[0],nDir[1],nDir[2]); - waveVect = (double *) malloc(Ngrid*sizeof(double)); - if (waveVect == NULL) { - printf("waveVectCompute.cpp : No memory available for waveVect\n"); - return; - } - waveVectorCompute3D((*grid).NX,(*grid).NY,(*grid).NZ,nDir,waveVect); - -/* memory allocation */ - table = (double *) malloc(ntot * sizeof(double)); - if (table == NULL) { - printf("derivReal.cpp: No memory availble for table\n"); - return; - } - - realization = (double *) malloc(ntot * sizeof(double)); - if (realization == NULL) { - printf("derivReal.cpp: No memory availble for realization\n"); - return; - } - - ExtendedWaveVect = (double *) malloc(ntot * sizeof(double)); - if (ExtendedWaveVect == NULL) { - printf("derivReal.cpp: No memory availble for realization\n"); - return; - } - - workr = (double *) malloc(nmax * sizeof(double)); - if (workr == NULL) { - printf("derivReal.cpp: No memory available for workr\n"); - return; - } - - worki = (double *) malloc(nmax * sizeof(double)); - if (worki == NULL) { - printf("derivReal.cpp: No memory available for worki\n"); - return; - } - - extMaille =0; -/* organization of the extended realization */ - for (k=1;k<=n[2];k++) { - for (j=1;j<=n[1];j++) { - for (i=1;i<=n[0];i++) { - extMaille = i + ((j-1) + (((k-1) * n[1]) * n[0])); - if (i <= (*grid).NX && j <= (*grid).NY && k <= (*grid).NZ) { - maille = i-1 + ((j-1) + ((k-1) * (*grid).NY) * (*grid).NX); - realization[extMaille] = (*Z).vector[maille]; - ExtendedWaveVect[extMaille] = waveVect[maille]; - } else { - realization[extMaille] = 0.0; - ExtendedWaveVect[extMaille] = 0.0; - } - } - } - } - -/* forward fourier transform of the realization */ - fourt(realization,table,n,NDIM,1,0,workr,worki); - FILE *wave; - wave = fopen("/home/irsrvshare1/R03/UPS_FLEX/waveVector.eas","w"); - - for (i=1;i -#include -#include "geostat.h" - - -/*FAST FOURIER TRANSFORM MOVING AVERAGE METHOD */ -/*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 */ -/*output: */ -/*realout: structure defining a realization - */ - - - -void FFTMA(struct vario_mod variogram,struct grid_mod grid,int n[3],struct realization_mod *realin,struct realization_mod *realout) - -{ - int NTOT,i,j,k,NMAX,NDIM,ntot,nmax,NXYZ,nxyz,maille0,maille1; - double *table,*covar,*workr,*worki,*realization,temp; - - - /*test over the input realization*/ - /*if ((*realin).code != 0) { - printf("Input realizations in FFTMA must be Gaussian white noises"); - exit; - }*/ - - /*covariance axis normalization*/ - axes(variogram.ap,variogram.scf,variogram.Nvario); - - - /*pseudo-grid definition*/ - cgrid(variogram,grid,n); - - - /*constant definition*/ - NTOT = n[0]*n[1]*n[2]; - ntot = NTOT+1; - NMAX = n[0]; - NDIM = 3; - for (i=1;i<3;i++) { - if (n[i] > NMAX) - NMAX = n[i]; - if (n[i] == 1) - NDIM--; - } - nmax = NMAX+1; - NXYZ = grid.NX*grid.NY*grid.NZ; - nxyz = NXYZ+1; - - - /*array initialization*/ - covar = (double *) malloc(ntot * sizeof(double)); - if (covar == NULL) { - printf("FFTMA.c: No memory available for covar"); - exit; - } - - table = (double *) malloc(ntot * sizeof(double)); - if (table == NULL) { - printf("FFTMA.c: No memory available for table"); - exit; - } - - realization = (double *) malloc(ntot * sizeof(double)); - if (realization == NULL) { - printf("FFTMA.c: No memory available for realization"); - exit; - } - - workr = (double *) malloc(nmax * sizeof(double)); - if (workr == NULL) { - printf("FFTMA.c: No memory available for workr"); - exit; - } - - worki = (double *) malloc(nmax * sizeof(double)); - if (worki == NULL) { - printf("FFTMA.c: No memory available for worki"); - exit; - } - - /*covariance function creation*/ - covariance(covar,variogram,grid,n); - - - /*power spectrum*/ - fourt(covar,table,n,NDIM,1,0,workr,worki); - - - /*organization of the input Gaussian white noise*/ - for ( k = 1; k <= n[2]; k++) { - for (j = 1; j <= n[1]; j++) { - for (i = 1; i <= n[0]; i++) { - maille1 = i+(j-1+(k-1)*n[1])*n[0]; - if (i <= grid.NX && j <= grid.NY && k <= grid.NZ) { - maille0 = i-1+(j-1+(k-1)*grid.NY)*grid.NX; - realization[maille1] = (*realin).vector[maille0]; - } else { - realization[maille1] = 0.; - } - } - } - } - - - /*forward fourier transform of the GWN*/ - fourt(realization,table,n,NDIM,1,0,workr,worki); - - - /*decomposition and multiplication in the spectral domain*/ - for ( k = 1; k <= n[2]; k++) { - for (j = 1; j <= n[1]; j++) { - for (i = 1; i <= n[0]; i++) { - maille1 = i+(j-1+(k-1)*n[1])*n[0]; - temp = covar[maille1]; - if (temp > 0.) { - temp = sqrt(temp)/(double) NTOT; - } else if (temp < 0.) { - temp = sqrt(-temp)/(double) NTOT; - } - realization[maille1] *= temp; - table[maille1] *= temp; - } - } - } - - - free(covar); - - - /*backward fourier transform*/ - fourt(realization,table,n,NDIM,0,1,workr,worki); - - - free(table); - free(workr); - free(worki); - - - /*output realization*/ - - /*is the output realization already allocated?*/ - /*if not, memory allocation*/ - if ((*realout).vector == NULL || (*realout).n != (*realin).n) { - (*realout).vector = (double *) malloc((*realin).n * sizeof(double)); - if ((*realout).vector == NULL) { - printf("FFTMA.c: No memory available"); - exit; - } - } - (*realout).n = (*realin).n; - (*realout).code = 1; - for ( k = 1; k <= grid.NZ; k++) { - for (j = 1; j <= grid.NY; j++) { - for (i = 1; i <= grid.NX; i++) { - maille1 = i+(j-1+(k-1)*n[1])*n[0]; - maille0 = i-1+(j-1+(k-1)*grid.NY)*grid.NX; - (*realout).vector[maille0] = realization[maille1]; - } - } - } - - - free(realization); - - - return; -} - - - - diff --git a/fftma_module/gen/lib_src/fourt.c b/fftma_module/gen/lib_src/fourt.c index fe80035..7ad9f50 100755 --- a/fftma_module/gen/lib_src/fourt.c +++ b/fftma_module/gen/lib_src/fourt.c @@ -95,6 +95,7 @@ void fourt(double *datar,double *datai, int nn[3], int ndim, int ifrwd, int icpl int ifact[21],ntot,idim,np1,n,np2,m,ntwo,iff,idiv,iquot,irem,inon2,non2p,np0,nprev,icase,ifmin,i,j,jmax,np2hf,i2,i1max,i3,j3,i1,ifp1,ifp2,i2max,i1rng,istep,imin,imax,mmax,mmin,mstep,j1,j2max,j2,jmin,j3max,nhalf; double theta,wstpr,wstpi,wminr,wmini,wr,wi,wtemp,thetm,wmstr,wmsti,twowr,sr,si,oldsr,oldsi,stmpr,stmpi,tempr,tempi,difi,difr,sumr,sumi,TWOPI = 6.283185307179586476925286766559; + printf("fourt\n"); ntot = 1; for (idim = 0; idim < ndim; idim++) { ntot *= nn[idim]; diff --git a/fftma_module/gen/lib_src/gammf.c b/fftma_module/gen/lib_src/gammf.c index 97ff3f9..ceae3ff 100755 --- a/fftma_module/gen/lib_src/gammf.c +++ b/fftma_module/gen/lib_src/gammf.c @@ -6,6 +6,7 @@ /*gamma covariance function*/ double gammf(double h, double alpha) { + printf("gadsmmf\n"); float delta; double z; diff --git a/fftma_module/gen/lib_src/gasdev.c b/fftma_module/gen/lib_src/gasdev.c index a25dfa2..e1fefd7 100755 --- a/fftma_module/gen/lib_src/gasdev.c +++ b/fftma_module/gen/lib_src/gasdev.c @@ -8,6 +8,7 @@ double gasdev(long *idum,long *idum2, long *iy, long iv[NTAB]) /*and unit variance, using ran2(idum) as the source */ /*of uniform deviates */ { + printf("gasdev\n"); double ran2(long *idum,long *idum2, long *iy, long iv[NTAB]); static int iset = 0; static double gset; diff --git a/fftma_module/gen/lib_src/inputdata.c b/fftma_module/gen/lib_src/inputdata.c index 259f1dd..6cc4d73 100755 --- a/fftma_module/gen/lib_src/inputdata.c +++ b/fftma_module/gen/lib_src/inputdata.c @@ -26,7 +26,7 @@ void inputdata(long *seed,struct grid_mod *grid,string filename[7],struct vario_ /*seed*/ - printf("Starting seed (integer): \n"); + printf("Starting sedsdsed (integer): \n"); *seed = GetInteger(); /*Grid description*/ diff --git a/fftma_module/gen/lib_src/kgeneration.c b/fftma_module/gen/lib_src/kgeneration.c index 633e4c8..3c4095e 100755 --- a/fftma_module/gen/lib_src/kgeneration.c +++ b/fftma_module/gen/lib_src/kgeneration.c @@ -54,8 +54,8 @@ void kgeneration(long seed,struct grid_mod grid,struct statistic_mod stat,struc /* writefile(file1,Y); */ /*add the statistics*/ - if (stat.mean[0] != 0 || stat.variance[0]!= 1) - addstat2(Y,stat,Y1,Y); + //if (stat.mean[0] != 0 || stat.variance[0]!= 1) + //addstat2(Y,stat,Y1,Y); /* file2="prout2"; */ /* writefile(file2,Y); */ diff --git a/fftma_module/gen/lib_src/kgeneration2.c b/fftma_module/gen/lib_src/kgeneration2.c index a65e8a7..aa1df5c 100755 --- a/fftma_module/gen/lib_src/kgeneration2.c +++ b/fftma_module/gen/lib_src/kgeneration2.c @@ -51,8 +51,8 @@ void kgeneration2(long seed,struct grid_mod grid,struct statistic_mod stat,stru FFTMA2(variogram,grid,n,Z,Y); /*add the statistics*/ - if (stat.mean[0] != 0 || stat.variance[0]!= 1) - addstat2(Y,stat,Y1,Y); + //if (stat.mean[0] != 0 || stat.variance[0]!= 1) + //addstat2(Y,stat,Y1,Y); /* make a log normal realization */ if (stat.type==1 || stat.type==2){ diff --git a/fftma_module/gen/lib_src/makefileFFTMA_debug.lib b/fftma_module/gen/lib_src/makefileFFTMA_debug.lib deleted file mode 100755 index 98f92c5..0000000 --- a/fftma_module/gen/lib_src/makefileFFTMA_debug.lib +++ /dev/null @@ -1,36 +0,0 @@ -# -######################################################################## -# -# Makefile for library -# -######################################################################## -# - -INCLUDE = -I./ -LIBS = -lm -L./ -# CCFLAGS = -fast -ifeq (${ARCH},sun) - CC = cc - CCFLAGS = -g -endif -ifeq (${ARCH},linux) - CC = gcc - CCFLAGS = -g -endif - -LIB = libFFTMA_debug_${ARCH}.a - -NOBJS= gammf.o FFTMA.o addstat.o axes.o cgrid.o covariance.o fourt.o length.o maxfactor.o test_fact.o cov_value.o generate.o gasdev.o ran2.o stable.o gaussian.o power.o cubic.o spherical.o nugget.o exponential.o cardsin.o nor2log.o - - -.c.o: - ${CC} $(INCLUDE) $(CCFLAGS) -c $< - -# LIBRARY -$(LIB) : $(NOBJS) - ar cr $(LIB) $(NOBJS) - ranlib $(LIB) - -clean : - rm *.o - diff --git a/fftma_module/gen/lib_src/pgeneration.c b/fftma_module/gen/lib_src/pgeneration.c index 18e1abb..3502b33 100755 --- a/fftma_module/gen/lib_src/pgeneration.c +++ b/fftma_module/gen/lib_src/pgeneration.c @@ -14,7 +14,7 @@ void pgeneration(int n[3],struct grid_mod grid,struct statistic_mod stat,struct int i,ntot; struct realization_mod GP; - FFTPressure(n,grid,Y,stat,pression,P,VX,VY,VZ,solver); + //FFTPressure(n,grid,Y,stat,pression,P,VX,VY,VZ,solver); /*save the delta-pressure realization*/ writefile(filename[2],P); diff --git a/fftma_module/gen/lib_src/pgeneration2.c b/fftma_module/gen/lib_src/pgeneration2.c index b81df82..51d81e1 100755 --- a/fftma_module/gen/lib_src/pgeneration2.c +++ b/fftma_module/gen/lib_src/pgeneration2.c @@ -14,7 +14,7 @@ void pgeneration2(int n[3],struct grid_mod grid,struct statistic_mod stat,struc int i,ntot; struct realization_mod GP; - FFTPressure(n,grid,Y,stat,pression,P,VX,VY,VZ,solver); + //FFTPressure(n,grid,Y,stat,pression,P,VX,VY,VZ,solver); /*save the delta-pressure realization*/ switch (format_file) diff --git a/fftma_module/gen/lib_src/prebuild_gwn.c b/fftma_module/gen/lib_src/prebuild_gwn.c index 3f01994..590f37e 100755 --- a/fftma_module/gen/lib_src/prebuild_gwn.c +++ b/fftma_module/gen/lib_src/prebuild_gwn.c @@ -42,13 +42,13 @@ void prebuild_gwn(struct grid_mod grid,int n[3],struct realization_mod *realin,d for (j = 1; j <= n[1]; j++) { for (i = 1; i <= n[0]; i++) { maille1 = i+(j-1+(k-1)*n[1])*n[0]; - printf("n[1] es %d y grid.NY %d\n", n[1], grid.NY); - printf("n[0] es %d y grid.NX %d\n", n[0], grid.NX); + //printf("n[1] es %d y grid.NY %d\n", n[1], grid.NY); + //printf("n[0] es %d y grid.NX %d\n", n[0], grid.NX); if (i <= grid.NX && j <= grid.NY && k <= grid.NZ) { maille0 = i-1+(j-1+(k-1)*grid.NY)*grid.NX; - printf("maille0: %d\n", maille0); + //printf("maille0: %d\n", maille0); realization[maille1] = (*realin).vector[maille0]; - printf("en realization maille1 %d pos guarde %f\n", maille1, realization[maille1]); + //printf("en realization maille1 %d pos guarde %f\n", maille1, realization[maille1]); } else { realization[maille1] = 0.; } diff --git a/fftma_module/gen/lib_src/readdata.c b/fftma_module/gen/lib_src/readdata.c index 3a70123..deb2b58 100755 --- a/fftma_module/gen/lib_src/readdata.c +++ b/fftma_module/gen/lib_src/readdata.c @@ -21,7 +21,7 @@ void readdata(long *seed,struct grid_mod *grid,string filename[8],struct vario_m file1=argv[1]; file2=argv[2]; - /* Ouverture du fichier de données principal */ + /* Ouverture du fichier de donn�es principal */ if ((fp=fopen(file1,"r")) == NULL) { @@ -48,7 +48,7 @@ void readdata(long *seed,struct grid_mod *grid,string filename[8],struct vario_m } n=(*grid).NX*(*grid).NY*(*grid).NZ; -/* Ouverture du fichier de données sur le champ de perméabilité */ +/* Ouverture du fichier de donn�es sur le champ de perm�abilit� */ if ((fp=fopen(file2,"r")) == NULL) { @@ -120,7 +120,7 @@ void readdata(long *seed,struct grid_mod *grid,string filename[8],struct vario_m break; case 1: file3=argv[3]; - /* Ouverture du fichier de données de pression*/ + /* Ouverture du fichier de donn�es de pression*/ if ((fp=fopen(file3,"r")) == NULL) { fprintf(stderr,"%s :impossible d'ouvrir %s\n",prog, file3); @@ -158,7 +158,7 @@ void readdata(long *seed,struct grid_mod *grid,string filename[8],struct vario_m break; case 2: - /* Ouverture du fichier de données de pression */ + /* Ouverture du fichier de donn�es de pression */ file3=argv[3]; if ((fp=fopen(file3,"r")) == NULL) { diff --git a/fftma_module/gen/lib_src/readdata2.c b/fftma_module/gen/lib_src/readdata2.c index a51f683..960c12b 100755 --- a/fftma_module/gen/lib_src/readdata2.c +++ b/fftma_module/gen/lib_src/readdata2.c @@ -21,7 +21,7 @@ void readdata2(long *seed,struct grid_mod *grid,string filename[8],struct vario_ file1=argv[1]; file2=argv[2]; - /* Ouverture du fichier de données principal */ + /* Ouverture du fichier de donn�es principal */ if ((fp=fopen(file1,"r")) == NULL) { @@ -49,7 +49,7 @@ void readdata2(long *seed,struct grid_mod *grid,string filename[8],struct vario_ } n=(*grid).NX*(*grid).NY*(*grid).NZ; -/* Ouverture du fichier de données sur le champ de perméabilité */ +/* Ouverture du fichier de donn�es sur le champ de perm�abilit� */ if ((fp=fopen(file2,"r")) == NULL) { @@ -121,7 +121,7 @@ void readdata2(long *seed,struct grid_mod *grid,string filename[8],struct vario_ break; case 1: file3=argv[3]; - /* Ouverture du fichier de données de pression*/ + /* Ouverture du fichier de donn�es de pression*/ if ((fp=fopen(file3,"r")) == NULL) { fprintf(stderr,"%s :impossible d'ouvrir %s\n",prog, file3); @@ -159,7 +159,7 @@ void readdata2(long *seed,struct grid_mod *grid,string filename[8],struct vario_ break; case 2: - /* Ouverture du fichier de données de pression */ + /* Ouverture du fichier de donn�es de pression */ file3=argv[3]; if ((fp=fopen(file3,"r")) == NULL) { diff --git a/fftma_module/gen/lib_src/readdata3.c b/fftma_module/gen/lib_src/readdata3.c index 6e94e40..f347b02 100755 --- a/fftma_module/gen/lib_src/readdata3.c +++ b/fftma_module/gen/lib_src/readdata3.c @@ -21,7 +21,7 @@ void readdata3(long *seed,struct grid_mod *grid,string filename[8],struct vario_ file1=argv[1]; file2=argv[2]; - /* Ouverture du fichier de données principal */ + /* Ouverture du fichier de donn�es principal */ if ((fp=fopen(file1,"r")) == NULL) { @@ -50,7 +50,7 @@ void readdata3(long *seed,struct grid_mod *grid,string filename[8],struct vario_ } n=(*grid).NX*(*grid).NY*(*grid).NZ; -/* Ouverture du fichier de données sur le champ de perméabilité */ +/* Ouverture du fichier de donn�es sur le champ de perm�abilit� */ if ((fp=fopen(file2,"r")) == NULL) { @@ -122,7 +122,7 @@ void readdata3(long *seed,struct grid_mod *grid,string filename[8],struct vario_ break; case 1: file3=argv[3]; - /* Ouverture du fichier de données de pression*/ + /* Ouverture du fichier de donn�es de pression*/ if ((fp=fopen(file3,"r")) == NULL) { fprintf(stderr,"%s :impossible d'ouvrir %s\n",prog, file3); @@ -160,7 +160,7 @@ void readdata3(long *seed,struct grid_mod *grid,string filename[8],struct vario_ break; case 2: - /* Ouverture du fichier de données de pression */ + /* Ouverture du fichier de donn�es de pression */ file3=argv[3]; if ((fp=fopen(file3,"r")) == NULL) { diff --git a/fftma_module/gen/lib_src/scanadt.c b/fftma_module/gen/lib_src/scanadt.c index bd887c5..0572b5c 100755 --- a/fftma_module/gen/lib_src/scanadt.c +++ b/fftma_module/gen/lib_src/scanadt.c @@ -53,12 +53,14 @@ scannerADT NewScanner(void) void FreeScanner(scannerADT scanner) { + printf("FreeScanner llama a FreeBlock\n"); if (scanner->str != NULL) FreeBlock(scanner->str); FreeBlock(scanner); } void SetScannerString(scannerADT scanner, string str) { + printf("SetScannerString llama a FreeBlock\n"); if (scanner->str != NULL) FreeBlock(scanner->str); scanner->str = CopyString(str); scanner->len = StringLength(str); diff --git a/fftma_module/gen/lib_src/simpio.c b/fftma_module/gen/lib_src/simpio.c index 02e4025..07cab6a 100755 --- a/fftma_module/gen/lib_src/simpio.c +++ b/fftma_module/gen/lib_src/simpio.c @@ -44,6 +44,7 @@ int GetInteger(void) line = GetLine(); switch (sscanf(line, " %d %c", &value, &termch)) { case 1: + printf("GetInteger llama a FreeBlock\n"); FreeBlock(line); return (value); case 2: @@ -53,6 +54,7 @@ int GetInteger(void) printf("Please enter an integer\n"); break; } + printf("GetInteger llama a FreeBlock\n"); FreeBlock(line); printf("Retry: "); } @@ -77,6 +79,7 @@ long GetLong(void) printf("Please enter an integer\n"); break; } + printf("GetLong llama a FreeBlock\n"); FreeBlock(line); printf("Retry: "); } @@ -101,6 +104,7 @@ double GetReal(void) printf("Please enter a real number\n"); break; } + printf("GetReal llama a FreeBlock\n"); FreeBlock(line); printf("Retry: "); } diff --git a/fftma_module/gen/lib_src/toolsFFTMA.h b/fftma_module/gen/lib_src/toolsFFTMA.h index 32d5535..07e3305 100755 --- a/fftma_module/gen/lib_src/toolsFFTMA.h +++ b/fftma_module/gen/lib_src/toolsFFTMA.h @@ -11,7 +11,7 @@ /* List of functions: */ /* ------------------ */ -/* kgeneration, FFTMA2, prebuild_gwn, build_real, addstat2, clean_real */ +/* kgeneration, FFTMA2, prebuild_gwn, build_real, clean_real */ /*FUNCTIONS*/ @@ -75,8 +75,6 @@ void prebuild_gwn(struct grid_mod grid,int n[3],struct realization_mod *realin,d void build_real(int n[3],int NTOT,double *covar,double *realization,double *ireal); -void addstat2(struct realization_mod *realin,struct statistic_mod stat ,struct realization_mod *realout,struct realization_mod *realout2); - void clean_real(struct realization_mod *realin,int n[3],struct grid_mod grid,double *vectorresult,struct realization_mod *realout); #endif // define _TOOLSFFTMA_H diff --git a/fftma_module/gen/lib_src/toolsFFTPSIM.h b/fftma_module/gen/lib_src/toolsFFTPSIM.h index 41fd3e3..0270e94 100755 --- a/fftma_module/gen/lib_src/toolsFFTPSIM.h +++ b/fftma_module/gen/lib_src/toolsFFTPSIM.h @@ -21,7 +21,7 @@ void pgeneration2(int n[3],struct grid_mod grid,struct statistic_mod stat,struc void FFTPSim(struct vario_mod variogram,struct statistic_mod stat,struct grid_mod grid,int n[3],struct realization_mod *realin,struct pressure_mod gradient,struct realization_mod *realout,struct realization_mod *realout2,struct realization_mod *realout3,struct realization_mod *realout4,struct realization_mod *realout5); -void FFTPressure(int n[3],struct grid_mod grid,struct realization_mod *realin,struct statistic_mod stat,struct pressure_mod gradient,struct realization_mod *realout,struct realization_mod *realout2,struct realization_mod *realout3,struct realization_mod *realout4, int solver); +//void FFTPressure(int n[3],struct grid_mod grid,struct realization_mod *realin,struct statistic_mod stat,struct pressure_mod gradient,struct realization_mod *realout,struct realization_mod *realout2,struct realization_mod *realout3,struct realization_mod *realout4, int solver); void build_pressure(int n[3],struct grid_mod grid,struct pressure_mod gradient,double *realization,double *ireal,double *pressure,double *ipressure); @@ -44,15 +44,11 @@ void total_pressure(struct grid_mod grid,struct pressure_mod gradient,struct rea void total_velocity(struct grid_mod grid,double mean,int direction,struct pressure_mod gradient,struct realization_mod *realout); -void clean_real2(struct realization_mod *realin,int n[3],struct grid_mod grid,int solver,double *vectorresult,struct realization_mod *realout); - void normAxes(double *vec, double *normed); void waveVectorCompute1D(int n,double *vec); void waveVectorCompute3D(int nX,int nY, int nZ, /*float dX, float dY, float dZ,*/ double nDir[3], double *waveVect); -void derivReal(struct realization_mod *Z, struct realization_mod *dZ, double *dir, struct grid_mod *grid, struct vario_mod vario); - void mat_vec(double *C, double *x, double *b, int n); diff --git a/fftma_module/gen/moduleFFTMA.c b/fftma_module/gen/moduleFFTMA.c index 226d980..0c0bc5d 100755 --- a/fftma_module/gen/moduleFFTMA.c +++ b/fftma_module/gen/moduleFFTMA.c @@ -32,7 +32,7 @@ static PyObject* genFunc(PyObject* self, PyObject* args) PyObject* out_array; npy_intp out_dims[NPY_MAXDIMS]; - printf("estoy en genfunc"); + printf("estoy edsn genfunc"); if(!Py_getvalues(args, &seed, &grid, &variogram, &stat)) return NULL; diff --git a/fftma_module/gen/setup.py b/fftma_module/gen/setup.py index 5855a50..7e18a24 100644 --- a/fftma_module/gen/setup.py +++ b/fftma_module/gen/setup.py @@ -8,7 +8,6 @@ module_FFTMA = Extension( "moduleFFTMA.c", "./lib_src/Py_getvalues.c", "./lib_src/Py_kgeneration.c", - "./lib_src/genlib.c", "./lib_src/random.c", "./lib_src/simpio.c", "./lib_src/strlib.c", @@ -16,8 +15,6 @@ module_FFTMA = Extension( "./lib_src/scanadt.c", "./lib_src/stack.c", "./lib_src/gammf.c", - "./lib_src/fftma.c", - "./lib_src/addstat.c", "./lib_src/axes.c", "./lib_src/cgrid.c", "./lib_src/covariance.c", @@ -43,20 +40,15 @@ module_FFTMA = Extension( "./lib_src/fftma2.c", "./lib_src/prebuild_gwn.c", "./lib_src/build_real.c", - "./lib_src/addstat2.c", "./lib_src/clean_real.c", "./lib_src/pgeneration.c", "./lib_src/pgeneration2.c", - "./lib_src/FFTPressure.c", - "./lib_src/FFTtest.c", "./lib_src/build_pressure.c", "./lib_src/build_velocity.c", "./lib_src/total_pressure.c", "./lib_src/total_velocity.c", - "./lib_src/clean_real2.c", "./lib_src/waveVectorCompute3D.c", "./lib_src/mat_vec.c", - "./lib_src/derivReal.c", "./lib_src/inputdata.c", "./lib_src/inputfiledata.c", "./lib_src/debuginput.c",