Changeset 327
- Timestamp:
- 05/26/10 19:42:00 (14 years ago)
- Location:
- trunk/yao/src
- Files:
-
- 5 added
- 40 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/yao/src/test.h
r326 r327 8 8 void adjust_target(){} 9 9 void after_it(int nit){ 10 xdisplay();11 10 } 12 11 void forward_before(int ctrp){ 13 if(Yt==1) {svdedt=dedt;dedt=0.0;}14 if(Yt==2) dedt /= 2;15 12 } 16 13 void forward_after(int ctrp){ 17 if(Yt==1) dedt=svdedt;18 if(Yt==2) dedt *= 2;19 14 } 20 15 21 16 void backward_before(int ctrp){ 22 if(Yt==2) dedt /=2;23 if(Yt==1) {svdedt = dedt;dedt = 0.0;}24 17 } 25 18 26 19 void backward_after(int ctrp){ 27 if(Yt==2) dedt *=2;28 if(Yt==1) dedt = svdedt;29 20 } 30 21 31 short select_io(int indic, char *nmod, int sortie, int iaxe, 32 int jaxe, int kaxe, int pdt, YREAL *val){ 33 if(indic==YIO_SAVESTATE){ 34 if(iaxe == 0 && jaxe == 0) fprintf(Yiofp, "\n\n"); 35 else if (jaxe == 0) fprintf(Yiofp, "\n"); 36 } 37 return(1); 38 } 39 40 void xdisplay(){ 41 int i,j; 42 i=(int)(SZX/2); 43 j=(int)(SZY/2); 44 printf("point:%i,%i, Hfil=% -23.15e @J/@Hfil=% -23.15e\n", i,j, 45 YS_Hfil(0,i,j,0), YG_Hfil(0,i,j,0)); 46 } 47 48 void xgauss(int argc, char *argv[]){ 49 gb = atof(argv[1]); 50 gmx = atof(argv[2]); gsx = atof(argv[3]); 51 gmy = atof(argv[4]); gsy = atof(argv[5]); 52 for (int j = 0; j<SZY; j++) 53 for (int i = 0; i<SZX; i++) 54 YS_Hfil(0,i,j,0) = gb*(exp( -pow((i*dx-gmx)/gsx,2) /2.)) 55 *(exp(-pow((j*dy-gmy)/gsy,2) /2.)); 56 } 57 58 void xvitgeo(){ 59 double gf, gfh; 60 gf = (grav / pcor); 61 for(int j=0; j<SZY; j++) 62 for(int i=0; i<SZX; i++){ 63 gfh=gf*YS_Hfil(0,i,j,0); 64 YS_Ufil(0,i,j,0)=gfh*(j*dy-gmy)/(gsy*gsy); 65 YS_Vfil(0,i,j,0)=gfh*-(i*dx-gmx)/(gsx*gsx); 66 } 67 } 68 69 void xivg(int argc,char *argv[]){ 70 double val; 71 val = atof(argv[2]); 72 73 if (strcmp(argv[1], "dt") == 0) dedt=val; 74 else if (strcmp(argv[1], "dx") == 0) dx=val; 75 else if (strcmp(argv[1], "dy") == 0) dy=val; 76 else if (strcmp(argv[1], "pcor") == 0) pcor=val; 77 else if (strcmp(argv[1], "grav") == 0) grav=val; 78 else if (strcmp(argv[1], "dissip") == 0) dissip=val; 79 else if (strcmp(argv[1], "hmoy") == 0) hmoy=val; 80 else if (strcmp(argv[1], "alpha") == 0) alpha=val; 22 short select_io(int indic, char *nmod, int sortie, int iaxe, int jaxe, int kaxe, int pdt, YREAL *val){ 23 return 0; 81 24 } 82 25 83 26 27 -
trunk/yao/src/testExampleAutomaticGeneration/1D_EX1.d
r326 r327 4 4 defval SZT 100 5 5 6 hat_name " shalw.h"6 hat_name "test.h" 7 7 8 8 traj Toce M SZU SZT -
trunk/yao/src/testExampleAutomaticGeneration/1D_EX2.d
r326 r327 4 4 defval SZT 100 5 5 6 hat_name " shalw.h"6 hat_name "test.h" 7 7 8 8 traj Toce M SZU SZT -
trunk/yao/src/testExampleAutomaticGeneration/1D_EX3.d
r326 r327 4 4 defval SZT 100 5 5 6 hat_name " shalw.h"6 hat_name "test.h" 7 7 8 8 traj Toce M SZU SZT -
trunk/yao/src/testExampleAutomaticGeneration/1D_EX4.d
r326 r327 4 4 defval SZT 100 5 5 6 hat_name " shalw.h"6 hat_name "test.h" 7 7 8 8 traj Toce M SZU SZT -
trunk/yao/src/testExampleAutomaticGeneration/1D_EX5.d
r326 r327 4 4 defval SZT 100 5 5 6 hat_name " shalw.h"6 hat_name "test.h" 7 7 8 8 traj Toce M SZU SZT -
trunk/yao/src/testExampleAutomaticGeneration/2D_EX1.d
r326 r327 6 6 defval SZA 101 7 7 8 hat_name " shalw.h"8 hat_name "test.h" 9 9 10 10 traj Toce M SZU SZT -
trunk/yao/src/testExampleAutomaticGeneration/2D_EX2.d
r326 r327 6 6 defval SZA 101 7 7 8 hat_name " shalw.h"8 hat_name "test.h" 9 9 10 10 traj Toce M SZU SZT -
trunk/yao/src/testExampleAutomaticGeneration/2D_EX3.d
r326 r327 6 6 defval SZA 101 7 7 8 hat_name " shalw.h"8 hat_name "test.h" 9 9 10 10 traj Toce M SZU SZT -
trunk/yao/src/testExampleAutomaticGeneration/2D_EX4.d
r326 r327 6 6 defval SZA 101 7 7 8 hat_name " shalw.h"8 hat_name "test.h" 9 9 10 10 traj Toce M SZU SZT -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX1.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 traj Toce M SZU SZT -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX10.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX11.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX12.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX13.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX14.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX15.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX16.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX17.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX18.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX19.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX2.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX3.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX4.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX5.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX6.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX7.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX8.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest -
trunk/yao/src/testExampleAutomaticGeneration/3D_EX9.d
r326 r327 7 7 defval SZA 101 8 8 9 hat_name " shalw.h"9 hat_name "test.h" 10 10 11 11 option o_gradtest
Note: See TracChangeset
for help on using the changeset viewer.