diff --git a/fftma_module/gen/include/geostat.h b/fftma_module/gen/include/geostat.h index 5d48919..df1b2c7 100755 --- a/fftma_module/gen/include/geostat.h +++ b/fftma_module/gen/include/geostat.h @@ -38,7 +38,7 @@ /* gammln, gammp, gasdev, gaussian, gcf, */ /* gen_cov_matrix, Ginv, gradual, cgrid, */ /* gser, invtrun1, krig_stat, length, */ -/* LtimeZ, mat_vec, maxfactor, metrop, norm */ +/* LtimeZ, maxfactor, metrop, norm */ /* normal, nugget, power, ran2, scal_vect, */ /* solve3, sort, spherical, stable, statlog2nor */ /* test_fract, trun1, trungasdev,vec_vec, */ @@ -563,19 +563,6 @@ int length(int N, int i, double *scf, double *ap, double D, int Nvari); /* The solution vector is returned in b */ void LtimeZ(double *L, float *Z, float *b, int n); - -/*calculates C.x/ -/* C : symmetric positive-definite matrix recorded */ -/* (per raws) as a vector with only components */ -/* Cij so that j <= i, i = [0...n-1] */ -/* x : vector, xi avec i = [0...n-1] */ -/* b : vector, bi avec i = [0...n-1] */ -/* n : dimension of matrix Cij */ -/* */ -/* The result vector is returned in b */ -void mat_vec(double *C, double *x, double *b, int n); - - /*determines the greatest prime factor of an integer*/ int maxfactor(int n); diff --git a/fftma_module/gen/include/toolsFFTPSIM.h b/fftma_module/gen/include/toolsFFTPSIM.h index 1c77c88..801a290 100755 --- a/fftma_module/gen/include/toolsFFTPSIM.h +++ b/fftma_module/gen/include/toolsFFTPSIM.h @@ -10,21 +10,14 @@ /* List of functions: */ /* ------------------ */ -/* FFTPSim, FFTPressure, build_pressure, build_velocity, clean_real2 */ +/* FFTPSim, FFTPressure, clean_real2 */ /*Functions */ /*----------*/ 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 build_pressure(int n[3],struct grid_mod grid,struct pressure_mod gradient,double *realization,double *ireal,double *pressure,double *ipressure); - -void build_velocity(int n[3],struct grid_mod grid,struct statistic_mod stat,struct pressure_mod gradient,double *realization,double *ireal,double *xvelocity,double *ixvelocity,int direction); - void normAxes(double *vec, double *normed); void waveVectorCompute1D(int n,double *vec); -void mat_vec(double *C, double *x, double *b, int n); - - #endif // define _TOOLSFFTPSIM_H diff --git a/fftma_module/gen/lib_src/build_pressure.c b/fftma_module/gen/lib_src/build_pressure.c deleted file mode 100755 index 06f548b..0000000 --- a/fftma_module/gen/lib_src/build_pressure.c +++ /dev/null @@ -1,68 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "geostat.h" -#include "pressure.h" - -/* Build_pressure */ -/* build pressure in spectral domain */ - -void build_pressure(int n[3],struct grid_mod grid,struct pressure_mod gradient,double *realization,double *ireal,double *pressure,double *ipressure) -{ - int i,j,k,maille1; - double ki,kj,kk; - double coeff,temp,temp2; - - printf("build pdsdsressure pdslis\n"); - - /* pressure calculation 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]; - if (n[0]==1) - { - ki=0.; - } - else - { - ki =(double)(i-1)/(double)(grid.NX*grid.DX); - } - if (n[1]==1) - { - kj=0.; - } - else - { - kj =(double)j/(double)(grid.NY*grid.DY); - } - if (n[2]==1) - { - kk=0.; - } - else - { - kk =(double)k/(double)(grid.NZ*grid.DZ); - } - - coeff = (gradient.x*ki+gradient.y*kj+gradient.z*kk)/(ki*ki+kj*kj+kk*kk); - temp = realization[maille1]; - temp2= ireal[maille1]; - if (maille1==1) - { - pressure[maille1] =0.; - ipressure[maille1]=0.; - } - else - { - pressure[maille1] =-1./(2*3.14)*coeff*temp2; - ipressure[maille1]= 1./(2*3.14)*coeff*temp; - } - } - } - } - return; -} diff --git a/fftma_module/gen/lib_src/build_velocity.c b/fftma_module/gen/lib_src/build_velocity.c deleted file mode 100755 index 12497b0..0000000 --- a/fftma_module/gen/lib_src/build_velocity.c +++ /dev/null @@ -1,119 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "geostat.h" -#include "pressure.h" - -/* Build_velocity */ -/* Build velocity in spectral domain */ - -void build_velocity(int n[3],struct grid_mod grid,struct statistic_mod stat,struct pressure_mod gradient,double *realization,double *ireal,double *xvelocity,double *ixvelocity,int direction) -{ - int i,j,k,maille1; - int x,y,z; - double ki,kj,kk; - double coeff,temp,temp2; - double grad; - - printf("build velocity\n"); - - /* x-direction velocity calculation in the spectral domain*/ - switch(direction) - { - case 1: - grad = gradient.x; - x=1; - y=0; - z=0; - break; - case 2: - grad = gradient.y; - x=0; - y=1; - z=0; - break; - case 3: - grad = gradient.z; - x=0; - y=0; - z=1; - break; - default : - printf("build_velocity.c: wrong velocity direction!!! direction: %d\n",direction); - break; - } - - 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