exchange_par.c 17.7 KB
Newer Older
Tilman Steinweg's avatar
Tilman Steinweg committed
1
/*-----------------------------------------------------------------------------------------
Florian Wittkamp's avatar
Florian Wittkamp committed
2
 * Copyright (C) 2016  For the list of authors, see file AUTHORS.
Tilman Steinweg's avatar
Tilman Steinweg committed
3
 *
Florian Wittkamp's avatar
Florian Wittkamp committed
4
 * This file is part of IFOS.
5
 *
Florian Wittkamp's avatar
Florian Wittkamp committed
6
 * IFOS is free software: you can redistribute it and/or modify
Tilman Steinweg's avatar
Tilman Steinweg committed
7
8
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 2.0 of the License only.
9
 *
Florian Wittkamp's avatar
Florian Wittkamp committed
10
 * IFOS is distributed in the hope that it will be useful,
Tilman Steinweg's avatar
Tilman Steinweg committed
11
12
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
14
 *
Tilman Steinweg's avatar
Tilman Steinweg committed
15
 * You should have received a copy of the GNU General Public License
Florian Wittkamp's avatar
Florian Wittkamp committed
16
 * along with IFOS. See file COPYING and/or <http://www.gnu.org/licenses/gpl-2.0.html>.
17
 -----------------------------------------------------------------------------------------*/
Tilman Steinweg's avatar
Tilman Steinweg committed
18
19

/*------------------------------------------------------------------------
20
 *   Exchange FD-Parameters between PEs
Tilman Steinweg's avatar
Tilman Steinweg committed
21
22
23
24
25
 *  ----------------------------------------------------------------------*/

#include "fd.h"

void exchange_par(void){
26
27
    
    /* declaration of extern variables */
28
29
    extern int   NX, NY, FDORDER, MAXRELERROR, SOURCE_SHAPE, SOURCE_TYPE, SNAP, SNAP_FORMAT, L;
    extern float DH, TIME, DT, TS, *FL, TAU, VPPML, PLANE_WAVE_DEPTH, PHI, F_REF;
30
31
32
    extern float XREC1, XREC2, YREC1, YREC2, FPML;
    extern float REC_ARRAY_DEPTH, REC_ARRAY_DIST, MUN, EPSILON, EPSILON_u, EPSILON_rho;
    extern int SEISMO, NDT, NGEOPH, SEIS_FORMAT, FREE_SURF, READMOD, READREC, SRCREC;
Florian Wittkamp's avatar
Florian Wittkamp committed
33
    extern int BOUNDARY, REC_ARRAY, DRX, FW;
34
35
36
37
    extern int SNAPSHOT_START,SNAPSHOT_END,SNAPSHOT_INCR;
    extern float TSNAP1, TSNAP2, TSNAPINC, REFREC[4];
    extern char  MFILE[STRING_SIZE], SIGNAL_FILE[STRING_SIZE],SIGNAL_FILE_SH[STRING_SIZE], LOG_FILE[STRING_SIZE];
    extern char SNAP_FILE[STRING_SIZE], SOURCE_FILE[STRING_SIZE], REC_FILE[STRING_SIZE];
38
    extern char SEIS_FILE[STRING_SIZE];
39
40
    extern char JACOBIAN[STRING_SIZE], DATA_DIR[STRING_SIZE], INV_MODELFILE[STRING_SIZE], FREQ_FILE[STRING_SIZE];
    extern int RUN_MULTIPLE_SHOTS, TAPERLENGTH, INVTYPE;
41
    extern int NPROC, NPROCX, NPROCY, MYID, IDX, IDY;
42
    extern int GRADT1, GRADT2, GRADT3, GRADT4, ITERMAX, PARAMETERIZATION, FORWARD_ONLY, ADJOINT_TYPE;
Florian Wittkamp's avatar
Florian Wittkamp committed
43
44
    extern int GRAD_METHOD;
    extern float TSHIFT_back;
45
46
47
48
49
50
51
    extern int MODEL_FILTER, FILT_SIZE;
    extern int FILT_SIZE_GRAD, GRAD_FILTER;
    
    extern int TESTSHOT_START, TESTSHOT_END, TESTSHOT_INCR, NO_OF_TESTSHOTS;
    extern int SWS_TAPER_GRAD_VERT, SWS_TAPER_GRAD_HOR, SWS_TAPER_GRAD_SOURCES, SWS_TAPER_CIRCULAR_PER_SHOT, SRTSHAPE, FILTSIZE;
    extern int SWS_TAPER_FILE, SWS_TAPER_FILE_PER_SHOT;
    extern float SRTRADIUS;
52
    extern char TAPER_FILE_NAME[STRING_SIZE];
53
54
55
56
57
58
59
60
61
    extern int SPATFILTER, SPAT_FILT_SIZE, SPAT_FILT_1, SPAT_FILT_ITER;
    extern int INV_RHO_ITER, INV_VP_ITER, INV_VS_ITER;
    extern int MIN_ITER;
    extern int nfstart, nf;
    extern int nfstart_jac, nf_jac;
    extern float VPUPPERLIM, VPLOWERLIM, VSUPPERLIM, VSLOWERLIM, RHOUPPERLIM, RHOLOWERLIM;
    extern float npower, k_max_PML;
    extern int INV_STF, N_STF, N_STF_START;
    extern char PARA[STRING_SIZE];
62
    extern int TIME_FILT, ORDER, ZERO_PHASE,WRITE_FILTERED_DATA;
63
64
65
66
67
68
69
    extern float FC_START, FC_END, FC_INCR, F_HP;
    extern int LNORM, DTINV;
    extern int STEPMAX;
    extern float EPS_SCALE, SCALEFAC;
    extern float PRO;
    extern int TRKILL, TRKILL_STF;
    extern char TRKILL_FILE[STRING_SIZE], TRKILL_FILE_STF[STRING_SIZE];
70
71
    extern int TAPER_STF;
    extern int TIMEWIN, NORMALIZE, TW_IND;
72
73
74
75
76
77
78
79
80
81
82
83
84
    extern float TWLENGTH_PLUS, TWLENGTH_MINUS, GAMMA;
    extern char PICKS_FILE[STRING_SIZE];
    extern char MISFIT_LOG_FILE[STRING_SIZE];
    extern int VELOCITY;
    extern float WATERLEVEL_LNORM8;
    extern float VP_VS_RATIO;
    extern int S;
    extern float S_VP, S_VS, S_RHO;
    extern int GRAD_FILT_WAVELENGTH;
    extern float A;
    extern int ACOUSTIC;
    extern int VERBOSE;
    
85
86
87
88
89
90
91
92
    extern int TRKILL_STF_OFFSET;
    extern float TRKILL_STF_OFFSET_LOWER;
    extern float TRKILL_STF_OFFSET_UPPER;
    
    extern int TRKILL_OFFSET;
    extern float TRKILL_OFFSET_LOWER;
    extern float TRKILL_OFFSET_UPPER;
    
93
94
    // Parameter for inversion of SH waves and joint inversion
    extern int WAVETYPE;
95
    extern int SOURCE_SHAPE_SH;
96
97
98
99
100
101
102
103
104
105
    extern int JOINT_INVERSION_PSV_SH_TYPE;
    /* Workflow  */
    extern char FILE_WORKFLOW[STRING_SIZE];
    extern int USE_WORKFLOW;
    
    extern float JOINT_INVERSION_PSV_SH_ALPHA_VS;
    extern float JOINT_INVERSION_PSV_SH_ALPHA_RHO;
    
    extern int EPRECOND;
    extern int EPRECOND_ITER;
106
    extern float EPSILON_WE,EPSILON_WE_SH;
107
    extern int EPRECOND_PER_SHOT;
108
    extern int EPRECOND_PER_SHOT_SH;
109
110
111
112
113
114
115
116
117
    
    extern int LBFGS_SURFACE;
    extern int LBFGS_STEP_LENGTH;
    
    extern int N_LBFGS;
    
    extern int WOLFE_CONDITION;
    extern int WOLFE_NUM_TEST;
    extern int WOLFE_TRY_OLD_STEPLENGTH;
118
119
    extern float WOLFE_C1_SL;
    extern float WOLFE_C2_SL;
niklas.thiel's avatar
niklas.thiel committed
120
121
122
		
	extern int WAVESEP;
	extern float VEL, DENS, ANGTAPI, ANGTAPO;
123
124
    
    
125
    /* definition of local variables */
126
127
128
129
130
131
132
    /* NPAR is set in fd.h and must be set to the max. number of elements in idum/fdum +1 (because vector index starts at 0) */
    int idum[NPAR];
    float fdum[NPAR];
    
    
    if (MYID == 0){
        
133
134
135
        /***********/
        /*  Float  */
        /***********/
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
        fdum[1]  = DH;
        fdum[2]  = TIME;
        fdum[3]  = DT;
        fdum[4]  = TS;
        fdum[5]  = 0.0;
        fdum[6]  = 0.0;
        
        fdum[8]  = TAU;
        fdum[10]  = TSNAP1;
        fdum[11]  = TSNAP2;
        fdum[12]  = TSNAPINC;
        fdum[13]  = REFREC[1];
        fdum[14]  = REFREC[2];
        fdum[15]  = PHI;
        
        fdum[16]  = XREC1;
        fdum[17]  = YREC1;
        
        fdum[19]  = XREC2;
        fdum[20]  = YREC2;
        
157
        fdum[22]  = VPPML;
158
159
        fdum[23]  = REC_ARRAY_DEPTH;
        fdum[24]  = REC_ARRAY_DIST;
Tilman Steinweg's avatar
Tilman Steinweg committed
160
        fdum[25]  = PLANE_WAVE_DEPTH;
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
        
        fdum[26]  = MUN;
        fdum[27]  = EPSILON;
        fdum[28]  = EPSILON_u;
        fdum[29]  = EPSILON_rho;
        fdum[31]  = FPML;
        
        fdum[32]  = SRTRADIUS;
        
        fdum[33]  = VPUPPERLIM;
        fdum[34]  = VPLOWERLIM;
        fdum[35]  = VSUPPERLIM;
        fdum[36]  = VSLOWERLIM;
        fdum[37]  = RHOUPPERLIM;
        fdum[38]  = RHOLOWERLIM;
        
        fdum[39]  = npower;
        fdum[40]  = k_max_PML;
Florian Wittkamp's avatar
Florian Wittkamp committed
179

180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
        fdum[42]  = FC_START;
        fdum[43]  = FC_END;
        fdum[44]  = FC_INCR;
        
        fdum[45]  = EPS_SCALE;
        fdum[46]  = SCALEFAC;
        fdum[47]  = PRO;
        
        fdum[48]  = TWLENGTH_PLUS;
        fdum[49]  = TWLENGTH_MINUS;
        fdum[50]  = GAMMA;
        
        fdum[51]  = F_REF;
        
        fdum[52]  = TSHIFT_back;
        
        fdum[53]  = WATERLEVEL_LNORM8;
        
        fdum[54]  = VP_VS_RATIO;
        
        fdum[55]  = S_VS;
        
        fdum[56]  = S_VP;
        
        fdum[57]  = S_RHO;
        
        fdum[58]  = A;
        
        fdum[59]  = F_HP;
        
        fdum[60] = JOINT_INVERSION_PSV_SH_ALPHA_VS;
        fdum[61] = JOINT_INVERSION_PSV_SH_ALPHA_RHO;
        
        fdum[62]=EPSILON_WE;
214
        fdum[63]=EPSILON_WE_SH;
215
        
216
217
        fdum[64]=WOLFE_C1_SL;
        fdum[65]=WOLFE_C2_SL;
218
        
219
220
221
222
223
        fdum[66]=TRKILL_STF_OFFSET_LOWER;
        fdum[67]=TRKILL_STF_OFFSET_UPPER;
        fdum[68]=TRKILL_OFFSET_LOWER;
        fdum[69]=TRKILL_OFFSET_UPPER;

niklas.thiel's avatar
niklas.thiel committed
224
225
226
227
228
229
        fdum[70]=VEL;
        fdum[71]=DENS;
        fdum[72]=ANGTAPI;
        fdum[73]=ANGTAPO;


230
231
232
        /***********/
        /* Integer */
        /***********/
233
234
235
236
237
238
239
        idum[1]  = NPROCX;
        idum[2]  = NPROCY;
        
        idum[4]  = NPROCX*NPROCY;
        idum[5]  = NX;
        idum[6]  = NY;
        
240
241
        idum[8]  = SOURCE_SHAPE;
        idum[9]  = SOURCE_TYPE;
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
        idum[10]  = READMOD;
        idum[11]  = L;
        idum[12]  = FREE_SURF;
        idum[13]  = SNAP;
        idum[14]  = DRX;
        
        idum[16]  = BOUNDARY;
        idum[17]  = REC_ARRAY;
        idum[18]  = SRCREC;
        idum[19]  = IDX;
        idum[20]  = IDY;
        idum[21]  = TRKILL_STF;
        idum[22]  = 0;
        idum[23]  = SNAP_FORMAT;
        idum[24]  = SEISMO;
        idum[25]  = READREC;
        idum[26]  = NGEOPH;
        idum[27]  = NDT;
        idum[28]  = SEIS_FORMAT;
261

262
263
264
265
        
        idum[31]  = FDORDER;
        idum[32]  = MAXRELERROR;
        idum[33]  = RUN_MULTIPLE_SHOTS;
Tilman Steinweg's avatar
Tilman Steinweg committed
266
        idum[34]  = TAPERLENGTH;
267
268
269
270
271
272
        idum[35]  = INVTYPE;
        idum[36]  = GRADT1;
        idum[37]  = GRADT2;
        idum[38]  = GRADT3;
        idum[39]  = GRADT4;
        idum[40]  = ITERMAX;
273
        idum[41]  = PARAMETERIZATION;
274
        idum[42]  = FW;
275
        idum[43]  = FORWARD_ONLY;
276
        idum[44]  = ADJOINT_TYPE;
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
        
        idum[45]  = TESTSHOT_START;
        idum[46]  = TESTSHOT_END;
        idum[47]  = TESTSHOT_INCR;
        
        idum[48]  = SWS_TAPER_GRAD_VERT;
        idum[49]  = SWS_TAPER_GRAD_HOR;
        idum[50]  = SWS_TAPER_GRAD_SOURCES;
        idum[51]  = SWS_TAPER_CIRCULAR_PER_SHOT;
        idum[52]  = SRTSHAPE;
        idum[53]  = FILTSIZE;
        
        idum[54]  = SPATFILTER;
        idum[55]  = SPAT_FILT_SIZE;
        idum[56]  = SPAT_FILT_1;
        idum[57]  = SPAT_FILT_ITER;
        
        idum[58]  = INV_RHO_ITER;
        idum[59]  = nfstart;
        idum[60]  = nf;
        
        idum[61]  = nfstart_jac;
        idum[62]  = nf_jac;
        idum[63]  = SWS_TAPER_FILE;
        idum[65]  = GRAD_METHOD;
        
        idum[66]  = MODEL_FILTER;
        idum[67]  = FILT_SIZE;
        
        idum[69]  = INV_STF;
        idum[70]  = N_STF;
        idum[71]  = N_STF_START;
        
        idum[72]  = TIME_FILT;
        idum[73]  = ORDER;
        
        idum[74]  = LNORM;
        idum[75]  = DTINV;
        
        idum[76]  = STEPMAX;
        
        idum[77]  = TRKILL;
        
        idum[78]  = TIMEWIN;
        
        idum[79]  = NORMALIZE;
        
        idum[80]  = INV_VP_ITER;
        idum[81]  = INV_VS_ITER;
        
        idum[82]  = MIN_ITER;
        
        idum[83]  = GRAD_FILTER;
        idum[84]  = FILT_SIZE_GRAD;
        
        idum[85]  = NO_OF_TESTSHOTS;
        
        idum[86]  = ZERO_PHASE;
        
        idum[87]  = VELOCITY;
        
        idum[88]  = SWS_TAPER_FILE_PER_SHOT;
        
        idum[89]  = S;
        
        idum[90]  = GRAD_FILT_WAVELENGTH;
        
        idum[91]  = ACOUSTIC;
        
        
        idum[92]  = VERBOSE;
        
        idum[93]  = WAVETYPE;
        
351
        idum[94]  = SOURCE_SHAPE_SH;
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
        
        idum[95] = JOINT_INVERSION_PSV_SH_TYPE;
        
        idum[96]  = SNAPSHOT_START;
        idum[97]  = SNAPSHOT_END;
        idum[98]  = SNAPSHOT_INCR;
        
        idum[100]=USE_WORKFLOW;
        
        idum[101]=EPRECOND;
        idum[102]=EPRECOND_ITER;
        
        idum[103]=LBFGS_SURFACE;
        idum[104]=LBFGS_STEP_LENGTH;
        
        idum[105]=EPRECOND_PER_SHOT;
368
        idum[106]=EPRECOND_PER_SHOT_SH;
369
        
370
        idum[107]=N_LBFGS;
371

372
373
374
        idum[108]=WOLFE_CONDITION;
        idum[109]=WOLFE_NUM_TEST;
        idum[110]=WOLFE_TRY_OLD_STEPLENGTH;
375
        
376
        idum[111]=WRITE_FILTERED_DATA;
377
        
378
379
        idum[112]=TAPER_STF;
        idum[113]=TW_IND;
380
        
381
382
        idum[114]=TRKILL_OFFSET;
        idum[115]=TRKILL_STF_OFFSET;
niklas.thiel's avatar
niklas.thiel committed
383
384
385
386
		
		idum[116]=WAVESEP;
		
		
387
        
388
389
390
391
392
393
394
395
396
397
398
399
400
401
    } /** if (MYID == 0) **/
    
    if (MYID != 0) FL=vector(1,L);
    MPI_Barrier(MPI_COMM_WORLD);
    
    MPI_Bcast(&idum,NPAR,MPI_INT,0,MPI_COMM_WORLD);
    MPI_Bcast(&fdum,NPAR,MPI_FLOAT,0,MPI_COMM_WORLD);
    
    
    MPI_Bcast(&FILE_WORKFLOW,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&SOURCE_FILE,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&MFILE,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&SNAP_FILE,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&REC_FILE,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
402
    MPI_Bcast(&SEIS_FILE,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
    MPI_Bcast(&LOG_FILE,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&SIGNAL_FILE,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&SIGNAL_FILE_SH,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&JACOBIAN,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&DATA_DIR,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&INV_MODELFILE,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&FREQ_FILE,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    
    
    MPI_Bcast(&PARA,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    
    MPI_Bcast(&MISFIT_LOG_FILE,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    
    MPI_Bcast(&TRKILL_FILE,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&TRKILL_FILE_STF,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    
    MPI_Bcast(&PICKS_FILE,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    
    MPI_Bcast(&TAPER_FILE_NAME,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    
    MPI_Barrier(MPI_COMM_WORLD);
    
425
426
427
    /***********/
    /*  Float  */
    /***********/
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
    DH=fdum[1];
    TIME=fdum[2];
    DT=fdum[3];
    TS=fdum[4];
    
    TAU=fdum[8];
    TSNAP1=fdum[10];
    TSNAP2=fdum[11];
    TSNAPINC=fdum[12];
    REFREC[1]=fdum[13];
    REFREC[2]=fdum[14];
    PHI=fdum[15];
    XREC1=fdum[16];
    YREC1=fdum[17];
    
    XREC2=fdum[19];
    YREC2=fdum[20];
    
446
    VPPML=fdum[22];
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
    REC_ARRAY_DEPTH=fdum[23];
    REC_ARRAY_DIST=fdum[24];
    PLANE_WAVE_DEPTH=fdum[25];
    
    MUN = fdum[26];
    EPSILON = fdum[27];
    EPSILON_u = fdum[28];
    EPSILON_rho = fdum[29];
    FPML = fdum[31];
    
    SRTRADIUS = fdum[32];
    
    VPUPPERLIM = fdum[33];
    VPLOWERLIM = fdum[34];
    VSUPPERLIM = fdum[35];
    VSLOWERLIM = fdum[36];
    RHOUPPERLIM = fdum[37];
    RHOLOWERLIM = fdum[38];
    
    npower = fdum[39];
    k_max_PML = fdum[40];
    
    
    FC_START = fdum[42];
    FC_END = fdum[43];
    FC_INCR = fdum[44];
    
    EPS_SCALE = fdum[45];
    SCALEFAC = fdum[46];
    
    PRO = fdum[47];
    
    TWLENGTH_PLUS = fdum[48];
    TWLENGTH_MINUS = fdum[49];
    GAMMA = fdum[50];
    
    F_REF = fdum[51];
    
    TSHIFT_back = fdum[52];
    
    WATERLEVEL_LNORM8 = fdum[53];
    
    VP_VS_RATIO = fdum[54];
    
    S_VS = fdum[55];
    
    S_VP = fdum[56];
    
    S_RHO = fdum[57];
    
    A = fdum[58];
    
    F_HP = fdum[59];
    
    JOINT_INVERSION_PSV_SH_ALPHA_VS = fdum[60];
    JOINT_INVERSION_PSV_SH_ALPHA_RHO = fdum[61];
    
    EPSILON_WE=fdum[62];
505
506
507
508
    EPSILON_WE_SH=fdum[63];
    
    WOLFE_C1_SL=fdum[64];
    WOLFE_C2_SL=fdum[65];
509
    
510
511
512
513
    TRKILL_STF_OFFSET_LOWER=fdum[66];
    TRKILL_STF_OFFSET_UPPER=fdum[67];
    TRKILL_OFFSET_LOWER=fdum[68];
    TRKILL_OFFSET_UPPER=fdum[69];
niklas.thiel's avatar
niklas.thiel committed
514
515
516
517
518
519
	
	VEL=fdum[70];
	DENS=fdum[71];
	ANGTAPI=fdum[72];
	ANGTAPO=fdum[73];
	
520
    
521
522
523
    /***********/
    /* Integer */
    /***********/
524
    
525
526
527
528
529
530
    NPROCX = idum[1];
    NPROCY = idum[2];
    NPROC  = idum[4];
    NX = idum[5];
    NY = idum[6];
    
531
532
    SOURCE_SHAPE = idum[8];
    SOURCE_TYPE = idum[9];
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
    READMOD = idum[10];
    L = idum[11];
    FREE_SURF = idum[12];
    SNAP = idum[13];
    DRX = idum[14];
    
    BOUNDARY = idum[16];
    REC_ARRAY = idum[17];
    SRCREC = idum[18];
    IDX = idum[19];
    IDY = idum[20];
    TRKILL_STF=idum[21];
    
    SNAP_FORMAT = idum[23];
    SEISMO = idum[24];
    READREC = idum[25];
    NGEOPH = idum[26];
    NDT = idum[27];
    SEIS_FORMAT = idum[28];
552

553
554
555
556
557
558
559
560
561
562
563
    
    FDORDER = idum[31];
    MAXRELERROR = idum[32];
    RUN_MULTIPLE_SHOTS = idum[33];
    TAPERLENGTH = idum[34];
    INVTYPE = idum[35];
    GRADT1 = idum[36];
    GRADT2 = idum[37];
    GRADT3 = idum[38];
    GRADT4 = idum[39];
    ITERMAX = idum[40];
564
    PARAMETERIZATION = idum[41];
565
    FW = idum[42];
566
    FORWARD_ONLY  = idum[43];  
567
    ADJOINT_TYPE = idum[44];
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
    
    TESTSHOT_START = idum[45];
    TESTSHOT_END = idum[46];
    TESTSHOT_INCR = idum[47];
    
    SWS_TAPER_GRAD_VERT = idum[48];
    SWS_TAPER_GRAD_HOR = idum[49];
    SWS_TAPER_GRAD_SOURCES = idum[50];
    SWS_TAPER_CIRCULAR_PER_SHOT = idum[51];
    SRTSHAPE = idum[52];
    FILTSIZE = idum[53];
    
    SPATFILTER = idum[54];
    SPAT_FILT_SIZE = idum[55];
    SPAT_FILT_1 = idum[56];
    SPAT_FILT_ITER = idum[57];
    
    INV_RHO_ITER = idum[58];
    nfstart = idum[59];
    nf = idum[60];
    
    nfstart_jac = idum[61];
    nf_jac = idum[62];
    SWS_TAPER_FILE = idum[63];
    GRAD_METHOD = idum[65];
    
    
    MODEL_FILTER = idum[66];
    FILT_SIZE = idum[67];
    
    
    INV_STF = idum[69];
    N_STF = idum[70];
    N_STF_START = idum[71];
    
    TIME_FILT = idum[72];
    ORDER = idum[73];
    
    LNORM = idum[74];
    DTINV = idum[75];
    
    STEPMAX = idum[76];
    
    TRKILL = idum[77];
    
    TIMEWIN = idum[78];
    
    NORMALIZE = idum[79];
    
    INV_VP_ITER = idum[80];
    INV_VS_ITER = idum[81];
    
    MIN_ITER = idum[82];
    
    GRAD_FILTER = idum[83];
    FILT_SIZE_GRAD = idum[84];
    
    NO_OF_TESTSHOTS = idum[85];
    
    ZERO_PHASE = idum[86];
    
    VELOCITY = idum[87];
    
    SWS_TAPER_FILE_PER_SHOT = idum[88];
    
    S = idum[89];
    
    GRAD_FILT_WAVELENGTH = idum[90];
    
    ACOUSTIC = idum[91];
    
    VERBOSE = idum[92];
    
    WAVETYPE = idum[93];
    
643
    SOURCE_SHAPE_SH = idum[94];
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
    
    JOINT_INVERSION_PSV_SH_TYPE = idum[95];
    
    SNAPSHOT_START=idum[96];
    SNAPSHOT_END=idum[97];
    SNAPSHOT_INCR=idum[98];
    
    USE_WORKFLOW=idum[100];
    
    EPRECOND=idum[101];
    EPRECOND_ITER=idum[102];
    
    LBFGS_SURFACE=idum[103];
    LBFGS_STEP_LENGTH=idum[104];
    
    EPRECOND_PER_SHOT= idum[105];
660
    EPRECOND_PER_SHOT_SH= idum[106];
661
    
662
    N_LBFGS=idum[107];
663
    
664
    WOLFE_CONDITION=idum[108];
665
    
666
    WOLFE_NUM_TEST=idum[109];
667
    
668
    WOLFE_TRY_OLD_STEPLENGTH=idum[110];
669
    
670
    WRITE_FILTERED_DATA=idum[111];
671
    
672
673
    TAPER_STF=idum[112];
    TW_IND=idum[113];
674
    
675
676
    TRKILL_OFFSET=idum[114];
    TRKILL_STF_OFFSET=idum[115];
niklas.thiel's avatar
niklas.thiel committed
677
678
	
	WAVESEP=idum[116];
679
    
680
681
    MPI_Bcast(&FL[1],L,MPI_FLOAT,0,MPI_COMM_WORLD);
    
Tilman Steinweg's avatar
Tilman Steinweg committed
682
}