Changeset 67
- Timestamp:
- 08/09/11 17:46:09 (13 years ago)
- Location:
- branches/branche-mb/src
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branche-mb/src/cost.dat
r63 r67 2 2 0.0000000000000000e+00 3 3 0.0000000000000000e+00 4 2.1474823164582097e+025 1.2958901480355472e+016 2.4208867493170015e+017 9.5310667871496211e+008 6.1790369949928481e+009 4.0542139095518230e+0010 2.3555976045385250e+0011 1.8747388242251850e+0012 1.6582963346427140e+0013 1.4291909107170053e+0014 1.2994902018124086e+0015 1.3334911336228903e+0016 1.2859361879963762e+0017 1.5496856239892498e+0018 1.2418585591044098e+0019 2.0442371997362545e+0020 1.2971715810562954e+0021 1.2975780013916505e+0022 1.2986727516755405e+0023 1.3057984268538101e+0024 1.2852046369970458e+0025 1.2266854183064928e+0026 1.2247496446634496e+0027 1.2151832426274585e+0028 1.2154570853596762e+0029 1.2858728960761006e+0030 1.2152605999261445e+0031 1.2152356639508144e+0032 1.2858909584114377e+0033 1.2859036070737340e+0034 1.2859124488276841e+00 -
branches/branche-mb/src/dta_lfil.h
r62 r67 18 18 19 19 if(Yt==1){ 20 double zdep; 21 if (Yk==0) 22 zdep=fsdept( Yi , Yj , 1 ) - fsdept( Yi , Yj , 0 ); 23 else 24 zdep=fsdept( Yi , Yj , Yk ) - fsdept( Yi , Yj , Yk-1 ); 25 double wm12=1./(106000*sqrt(zdep)); //1/sqrt(ds1*ds2*ds3) 20 double zbtr = zbtr2(Yi,Yj); 21 double wm12=sqrt(zbtr);//1./(106000.); //1/sqrt(ds1*ds2) 26 22 YS1=wm12*x1; 27 23 } … … 36 32 } 37 33 // 38 if(Yt==1 && Yk==0 && Yi<26 && Yi>22 && Yj<17 && Yj>13)34 /* if(Yt==1 && Yk==0 && Yi<26 && Yi>22 && Yj<17 && Yj>13) 39 35 printf("nul1(%d,%d) = %24.16e \n",Yi+1,Yj+1,YS1); 40 36 if(Yt==40 && Yk==0 && Yi<26 && Yi>22 && Yj<17 && Yj>13) 41 printf("nul40(%d,%d) = %24.16e \n",Yi+1,Yj+1,YS1);37 printf("nul40(%d,%d) = %24.16e \n",Yi+1,Yj+1,YS1);*/ 42 38 } 43 39 … … 51 47 52 48 if(Yt==1){ 53 double zdep; 54 if (Yk==0) 55 zdep=fsdept( Yi , Yj , 1 ) - fsdept( Yi , Yj , 0 ); 56 else 57 zdep=fsdept( Yi , Yj , Yk ) - fsdept( Yi , Yj , Yk-1 ); 58 double wm12=1./(106000*sqrt(zdep)); //1/sqrt(ds1*ds2*ds3) 49 double zbtr = zbtr2(Yi,Yj); 50 double wm12=sqrt(zbtr);//(106000.); //1/sqrt(ds1*ds2) 51 // double wm12=1./(106000.); //1/sqrt(ds1*ds2) 59 52 YJ1I1=wm12; 60 53 } … … 70 63 } 71 64 // 72 if(Ycurward==BACKWARD){65 /* if(Ycurward==BACKWARD){ 73 66 if(Yt==10 && Yk==0 && Yi<26 && Yi>22 && Yj<17 && Yj>13) 74 67 printf("YG_1L(%d,%d) = %24.16e \n",Yi+1,Yj+1,YG1); 75 } 68 }*/ 76 69 } -
branches/branche-mb/src/sinobad.d
r63 r67 1 1 defval K_NEU 2 #define FZIMP 2 3 #define FILTER 3 #define FILZNOL4 //#define FILNOZL 4 //#define FILZNOL 5 #define FILLNOZ 5 6 //#define SOLSORYAO 6 7 //#define OPTIMORDER … … 21 22 defval TU 2 | start time step 22 23 #ifdef FILTER 23 defval OFTL 024 defval OFTZ 2525 defval OFT 2524 defval OFTL 10 25 defval OFTZ 0 26 defval OFT 10 26 27 #endif 27 28 #ifndef FILTER … … 29 30 #endif 30 31 //#exec disp_valdef 32 #ifdef FZIMP 33 defval K_FZIMP 34 #endif 31 35 #ifdef FILTER 32 36 defval K_FILTER … … 35 39 defval K_FILZNOL 36 40 #endif 37 #ifdef FIL NOZL38 defval K_FIL NOZL41 #ifdef FILLNOZ 42 defval K_FILLNOZ 39 43 #endif 40 44 #ifdef SOLSORYAO … … 62 66 #ifdef FILTER 63 67 traj Tcstf M 0 1 64 #ifndef FILNOZL65 68 #ifndef FILZNOL 66 69 traj Tlfil M 1 0 1 OFTL 67 70 #endif 71 #ifndef FILLNOZ 68 72 traj Tzfil M 1 OFTL 1 OFTZ 69 73 #endif … … 75 79 #ifdef FILTER 76 80 space S3df M NX NY NZ Tcstf 77 #ifndef FILNOZL78 81 #ifndef FILZNOL 79 82 space S3dtlf M NX NY NZ Tlfil 80 83 #endif 84 #ifndef FILLNOZ 81 85 space S3dtzf M NX NY NZ Tzfil 82 86 #endif … … 112 116 #ifdef FILTER 113 117 modul nu space S3df noward output 1 target 114 #ifndef FILNOZL115 118 #ifndef FILZNOL 116 modul dta_lfil space S3dtlf input 6 output 1 tempo 117 modul ztuv_lfil space S3dtlf input 3 output 2 tempo 118 #endif 119 modul dta_zfilt space S3dtzf input 4 output 1 tempo 120 //modul dta_zfil space S3dtzf input 4 output 1 tempo 121 //modul zwy_zfil space S3dtzf input 2 output 1 tempo 122 #endif 119 modul dta_lfexp space S3dtlf input 6 output 1 tempo 120 #endif 121 122 #ifndef FILLNOZ 123 #ifdef FZIMP 124 modul dta_zfimp_t space S3dtzf input 2 output 1 tempo 125 modul dta_zfimp space S3dtzf input 3 output 1 tempo 126 #endif 127 #ifndef FZIMP 128 modul dta_zfexp space S3dtzf input 4 output 1 tempo 129 #endif 130 131 #endif 132 123 133 modul ta_c space S3d input 1 output 1 124 134 #endif … … 306 316 307 317 #ifdef FILTER 308 #ifndef FILNOZL 318 309 319 #ifndef FILZNOL 310 //#---------->dta_lfil 311 ctin dta_lfil 1 from nu 1 i j k 312 ctin dta_lfil 2 from dta_lfil 1 i j k-1 t-1 313 ctin dta_lfil 3 from ztuv_lfil 1 i-1 j k t 314 ctin dta_lfil 4 from ztuv_lfil 1 i j k t 315 ctin dta_lfil 5 from ztuv_lfil 2 i j-1 k t 316 ctin dta_lfil 6 from ztuv_lfil 2 i j k t 317 318 //#---------->ztuv_lfil 319 ctin ztuv_lfil 1 from dta_lfil 1 i+1 j k t-1 320 ctin ztuv_lfil 2 from dta_lfil 1 i j k t-1 321 ctin ztuv_lfil 3 from dta_lfil 1 i j+1 k t-1 320 //#---------->dta_lfexp 321 ctin dta_lfexp 1 from nu 1 i j k 322 ctin dta_lfexp 2 from dta_lfexp 1 i j k t-1 323 ctin dta_lfexp 3 from dta_lfexp 1 i-1 j k t-1 324 ctin dta_lfexp 4 from dta_lfexp 1 i+1 j k t-1 325 ctin dta_lfexp 5 from dta_lfexp 1 i j-1 k t-1 326 ctin dta_lfexp 6 from dta_lfexp 1 i j+1 k t-1 322 327 #endif 323 328 324 329 //#---------->dta_zfil 330 #ifndef FILLNOZ 331 #ifndef FILZNOL 332 #ifndef FZIMP 333 ctin dta_zfexp 1 from dta_lfexp 1 i j k t 334 #endif 335 #ifdef FZIMP 336 ctin dta_zfimp 1 from dta_lfexp 1 i j k t 337 #endif 338 #endif 339 325 340 #ifdef FILZNOL 326 ctin dta_zfilt 1 from nu 1 i j k 327 //ctin dta_zfil 1 from nu 1 i j k 328 #endif 329 #ifndef FILZNOL 330 ctin dta_zfil 1 from dta_lfil 1 i j k t 331 #endif 332 ctin dta_zfilt 2 from dta_zfilt 1 i j k-1 t-1 333 ctin dta_zfilt 3 from dta_zfilt 1 i j k t-1 334 ctin dta_zfilt 4 from dta_zfilt 1 i j k+1 t-1 335 //ctin dta_zfil 2 from dta_zfil 1 i j k t-1 336 //ctin dta_zfil 3 from zwy_zfil 1 i j k+1 t 337 //ctin dta_zfil 4 from zwy_zfil 1 i j k t 338 339 //#---------->zwy_zfil 340 //ctin zwy_zfil 1 from dta_zfil 1 i j k-1 t-1 341 //ctin zwy_zfil 2 from dta_zfil 1 i j k t-1 341 #ifndef FZIMP 342 ctin dta_zfexp 1 from nu 1 i j k 343 #endif 344 #ifdef FZIMP 345 ctin dta_zfimp 1 from nu 1 i j k 346 #endif 347 #endif 348 349 #ifdef FZIMP 350 ctin dta_zfimp 2 from dta_zfimp 1 i j k+1 t 351 ctin dta_zfimp 3 from dta_zfimp_t 1 i j k t 352 353 ctin dta_zfimp_t 1 from dta_zfimp_t 1 i j k-1 t 354 ctin dta_zfimp_t 2 from dta_zfimp 1 i j k t-1 355 #endif 356 #ifndef FZIMP 357 ctin dta_zfexp 2 from dta_zfexp 1 i j k-1 t-1 358 ctin dta_zfexp 3 from dta_zfexp 1 i j k t-1 359 ctin dta_zfexp 4 from dta_zfexp 1 i j k+1 t-1 360 #endif 342 361 343 362 //#---------->ta_c 344 ctin ta_c 1 from dta_zfilt 1 i j k t 345 //ctin ta_c 1 from dta_zfil 1 i j k t 346 #endif 347 #ifdef FILNOZL 348 ctin ta_c 1 from nu 1 i j k 349 #endif 350 #endif 363 #ifdef FZIMP 364 ctin ta_c 1 from dta_zfimp 1 i j k t 365 #endif 366 #ifndef FZIMP 367 ctin ta_c 1 from dta_zfexp 1 i j k t 368 #endif 369 #endif 370 #ifdef FILLNOZ 371 ctin ta_c 1 from dta_lfexp 1 i j k t 372 #endif 373 374 375 #endif 376 351 377 //#ctin ta_c 1..NPCA from pca_ta 1..NPCA 1 352 378 353 379 //#exec disp_ct_in 354 exec disp_modul380 //exec disp_modul 355 381 356 382 … … 916 942 #ifdef FILTER 917 943 // calcul du filtre 918 #ifndef FILNOZL919 944 #ifndef FILZNOL 920 945 order modinspace S3dtlf 921 order YA3 922 order YA2 YA1 923 ztuv_lfil 924 forder 925 order YA2 YA1 926 dta_lfil 927 forder 928 forder 929 forder 930 #endif 946 order YA3 YA2 YA1 947 dta_lfexp 948 forder 949 forder 950 #endif 951 #ifndef FILLNOZ 931 952 order modinspace S3dtzf 932 // order YA3 YA2 YA1 933 // zwy_zfil 934 // forder 953 #ifdef FZIMP 954 order YA2 YA1 955 order YA3 956 dta_zfimp_t 957 forder 958 order YB3 959 dta_zfimp 960 forder 961 forder 962 #endif 963 #ifndef FZIMP 935 964 order YA3 YA2 YA1 936 // dta_zfil 937 dta_zfilt 965 dta_zfexp 938 966 forder 939 forder 940 #endif 967 #endif 968 forder 969 #endif 970 941 971 order modinspace S3d 942 972 order YA3 YA2 YA1 … … 1145 1175 #ifdef FILTER 1146 1176 1147 #ifndef FILNOZL1148 1177 #ifndef FILZNOL 1149 1178 order spaceintraj Tlfil … … 1151 1180 forder 1152 1181 #endif 1182 #ifndef FILLNOZ 1153 1183 order spaceintraj Tzfil 1154 1184 S3dtzf 1155 1185 forder 1156 1186 #endif 1187 1157 1188 order spaceintraj Tcst 1158 1189 S3d -
branches/branche-mb/src/sinobad.h
r62 r67 14 14 15 15 #ifdef K_FILTER 16 #ifdef K_FZIMP 17 void luzimp_init(); // initialise tab_luzimp 18 #define tab_luzimp( i, j, k , t ) (tab_luzimp[(i)*(NY*NZ)+(j)*(NZ)+(k)][t]) // factorisation LU 19 double tab_luzimp[NZ*NY*NX][2]; // tableau factorisation LU 20 #endif 16 21 #define ta_eb( i, j, k ) (ta_eb[(i)*(NY*NZ)+(j)*(NZ)+(k)]) // ebauche 17 22 double ta_eb[NZ*NY*NX]; // ebauche … … 81 86 #ifdef K_FILTER 82 87 double pdth_fil=100.;//7200.; 83 double pdtz_fil=100.;//7200.; 84 double fsaht_fil= 1.2e+2;//1000.; 85 double avt_fil=1.2e-5; 86 double lscale= 212000.; // length-scale 88 double pdtz_fil=100.;//100.;//7200.; 89 double fsaht_fil= 5.e+2;//1000.; 90 double avt_fil=1.2e-05;//1.2e-5; 91 //double lscale= 212000.; // length-scale 92 double norm_fil; //coef de normalisation 93 void normfil();// calcul du coef de normalisation norm_fil 87 94 #endif 88 95 … … 146 153 cal_ff(); 147 154 xdom_init(); 155 #ifdef K_FILTER 156 #ifdef K_FZIMP 157 luzimp_init(); 158 #endif 159 normfil(); 160 #endif 148 161 xsolmat_init(); 149 162 xflt_rst(); … … 151 164 xdisplay(); 152 165 xtraqsr_init(); 153 154 166 } 155 167 //____________________________________________________________________________ … … 244 256 normsup_alla_c(); 245 257 } 258 259 //_____________________________________________________________________________ 246 260 #ifdef K_FILTER 261 void normfil(){ 262 double norm_zfil=1.; 263 double norm_lfil=1.; 264 #if defined (K_FILZNOL) /* && !defined (K_FILLNOZ)*/ 265 norm_zfil= 2.*sqrt(PI*avt_fil*pdtz_fil*2.*OFTZ); 266 #ifdef K_FZIMP 267 double fact=1.; 268 int M=2*(OFTZ-1); 269 for(int i=1;i<M;i++) 270 fact = 4.*fact * (double) i / (double) (M+i-1); 271 norm_zfil=2.*fact*sqrt(avt_fil*pdtz_fil); 272 #endif 273 #elif defined (K_FILLNOZ) /*&& !defined (K_FILZNOL)*/ 274 norm_lfil= 2.*sqrt(PI*fsaht_fil*pdth_fil*2.*OFTL); 275 #endif 276 norm_fil= norm_zfil*norm_lfil; 277 printf("norm_fil = %23.16e\n",norm_fil); 278 } 279 //_____________________________________________________________________________ 247 280 void init_nu(){ 248 281 … … 251 284 for(int j=0;j<NY;j++) 252 285 for(int i=0;i<NX;i++){ 253 YS_nu(0,i,j,k)=YS_nu(0,i,j,k)+ 1.*exp(-((i+1.-(3.*NX)/4.)*(i+1.-(3.*NX)/4.)+286 YS_nu(0,i,j,k)=YS_nu(0,i,j,k)+0.1*exp(-((i+1.-(3.*NX)/4.)*(i+1.-(3.*NX)/4.)+ 254 287 (j+1.-(3.*NY)/4.)*(j+1.-(3.*NY)/4.))/4.) 255 288 *(1.-exp(-double(k+1.-NZ)/NZ))*(1.-exp(-double(tt)/24.)); 256 289 } 257 290 } 291 //_____________________________________________________________________________ 292 #ifdef K_FZIMP 293 //_____________________________________________________________________________ 294 void luzimp_init(){ 295 for(int j=0;j<NY;j++) 296 for(int i=0;i<NX;i++) 297 for(int k=0;k<NZ;k++){ // init a 0 298 tab_luzimp( i, j, k , 0 ) = 0.;// 0-->gam 299 tab_luzimp( i, j, k , 1 ) = 0.;// 1-->bet 300 } 301 double a0,a1; 302 for(int j=1;j<NY-1;j++) 303 for(int i=1;i<NX-1;i++){ 304 a1=avt_fil*pdtz_fil/fse3w(i,j,1); 305 tab_luzimp( i, j, 0 , 0 ) = 0.;// 0-->gam 306 tab_luzimp( i, j, 0 , 1 ) = fse3t(i,j,0)+a1;// 1-->bet 307 #ifndef K_NEUM 308 a0=avt_fil*pdtz_fil/fse3w(i,j,0); 309 tab_luzimp( i, j, 0 , 1 ) += a0;// 1-->bet 310 #endif 311 for(int k=1;k<NZ-2;k++){ 312 a0=avt_fil*pdtz_fil/fse3w(i,j,k); 313 a1=avt_fil*pdtz_fil/fse3w(i,j,k+1); 314 tab_luzimp( i, j, k , 0 ) = -a0/tab_luzimp( i, j, k-1 , 1); 315 tab_luzimp( i, j, k , 1 ) = fse3t(i,j,k)+a1+a0 + a0 * tab_luzimp( i, j, k , 0 ); 316 } 317 a0=avt_fil*pdtz_fil/fse3w(i,j,NZ-2); 318 tab_luzimp( i, j, NZ-2 , 0 ) = -a0/tab_luzimp( i, j, NZ-3 , 1); 319 tab_luzimp( i, j, NZ-2 , 1 ) = fse3t(i,j,NZ-2)+a0 + a0 * tab_luzimp( i, j, NZ-2 , 0 ); 320 #ifndef K_NEUM 321 a1=avt_fil*pdtz_fil/fse3w(i,j,NZ-1); 322 tab_luzimp( i, j, NZ-2 , 1 ) += a1; 323 #endif 324 } 325 /* for(int k=0;k<NZ;k++){ // init a 0 326 printf("gam(%d)=%f \t",k+1,tab_luzimp( 5, 5, k , 0 )); 327 printf("bet(%d)=%f \n",k+1,tab_luzimp( 5, 5, k , 1 )); 328 }*/ 329 } 330 #endif 258 331 #endif 259 332 //_____________________________________________________________________________ … … 678 751 679 752 //---------------------------------------------- 680 #if defined (YE_ta_c) || defined (YE_pca_ta) 753 #if defined (YE_ta_c) || defined (YE_pca_ta) || defined (YE_nu) 681 754 #define true_tac( i, j, k ) (true_tac[(k)*(NY*NX)+(j)*(NX)+(i)]) 682 755 double true_tac[NZ*NY*NX]; … … 701 774 int i,j,k; 702 775 if(!strcmp(argv[1],"ta_c")){ 703 #if defined (YE_ta_c) || defined (YE_pca_ta) 776 #if defined (YE_ta_c) || defined (YE_pca_ta) || defined (YE_nu) 704 777 for(i=0;i<NX;i++) 705 778 for(j=0;j<NY;j++) … … 743 816 int i,j,k; 744 817 745 #if defined (YE_ta_c) || defined (YE_pca_ta) 818 #if defined (YE_ta_c) || defined (YE_pca_ta) || defined (YE_nu) 746 819 sum=0.;sumn=0.; 747 820 for(i=0;i<NX;i++) -
branches/branche-mb/src/ta_c.h
r62 r67 8 8 forward (YREAL x1) 9 9 { 10 11 //if(Yk==0 && Yi<14 && Yi>10 && Yj<14 && Yj>10) printf("nu(%d,%d) = %24.16e \n",Yi+1,Yj+1,x1); 12 13 double norm_fac; 14 #ifdef K_FILZNOL 15 norm_fac= 2.*sqrt(PI*avt_fil*pdtz_fil*2.*OFTZ);///1.e-01;//1./sqrt(2.*PI)/lscale; 16 #elif defined (K_FILNOZL) 17 norm_fac= 1.e+00; 18 #else 19 norm_fac= 1.e+00; 20 #endif 21 YS1 = ta_eb(Yi,Yj,Yk) +norm_fac*x1; 10 YS1 = ta_eb(Yi,Yj,Yk) +norm_fil*x1; 22 11 if(Yi==0 || Yi==NX-1 || Yj==0 || Yj==NY-1 || Yk==NZ-1){ 23 12 YS1=0.; … … 30 19 //YS1=sum; 31 20 //// 32 /* if(fabs(x1)>0.1) 33 printf("increm(%d,%d,%d) = %24.16e (%24.16e) \n",Yi+1,Yj+1,Yk+1,x1,YS1);*/ 21 // printf("norm_fac= %24.16e\n",norm_fac); 22 if(fabs(norm_fil*x1)>5.) 23 printf("increm(%d,%d,%d) = %24.16e (%24.16e) \n",Yi+1,Yj+1,Yk+1,norm_fil*x1,YS1); 34 24 } 35 25 //=========================================================================== … … 38 28 backward (YREAL x1) 39 29 { 40 double norm_fac; 41 #ifdef K_FILZNOL 42 norm_fac= 2.*sqrt(PI*avt_fil*pdtz_fil*2.*OFTZ);///1.e-01;//1./sqrt(2.*PI)/lscale; 43 #elif defined (K_FILNOZL) 44 norm_fac= 1.e+00; 45 #else 46 norm_fac= 1.e+00; 47 #endif 48 YJ1I1=norm_fac; 30 YJ1I1=norm_fil; 49 31 if(Yi==0 || Yi==NX-1 || Yj==0 || Yj==NY-1 || Yk==NZ-1){ 50 32 YJ1I1=0.;
Note: See TracChangeset
for help on using the changeset viewer.