exchange_par.c 16.6 KB
Newer Older
Tilman Steinweg's avatar
Tilman Steinweg committed
1
2
3
4
/*-----------------------------------------------------------------------------------------
 * Copyright (C) 2013  For the list of authors, see file AUTHORS.
 *
 * This file is part of DENISE.
5
 *
Tilman Steinweg's avatar
Tilman Steinweg committed
6
7
8
 * DENISE is free software: you can redistribute it and/or modify
 * 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
 *
Tilman Steinweg's avatar
Tilman Steinweg committed
10
11
12
13
 * DENISE is distributed in the hope that it will be useful,
 * 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
16
 * You should have received a copy of the GNU General Public License
 * along with DENISE. 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

/**/
/*------------------------------------------------------------------------
21
 *   Exchange FD-Parameters between PEs
Tilman Steinweg's avatar
Tilman Steinweg committed
22
23
24
25
26
27
28
29
 *   last update 29/06/2002
 *
 *  T. Bohlen
 *  ----------------------------------------------------------------------*/

#include "fd.h"

void exchange_par(void){
30
31
32
33
34
35
36
    
    /* declaration of extern variables */
    extern int   NX, NY, FDORDER, MAXRELERROR, QUELLART, QUELLTYP, SNAP, SNAP_FORMAT, L;
    extern float DH, TIME, DT, TS, *FL, TAU, DAMPING, PLANE_WAVE_DEPTH, PHI, F_REF;
    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
37
    extern int BOUNDARY, REC_ARRAY, DRX, FW;
38
39
40
41
    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];
42
    extern char SEIS_FILE_VX[STRING_SIZE], SEIS_FILE_VY[STRING_SIZE];
43
44
45
    extern char SEIS_FILE_CURL[STRING_SIZE], SEIS_FILE_DIV[STRING_SIZE], SEIS_FILE_P[STRING_SIZE];
    extern char JACOBIAN[STRING_SIZE], DATA_DIR[STRING_SIZE], INV_MODELFILE[STRING_SIZE], FREQ_FILE[STRING_SIZE];
    extern int RUN_MULTIPLE_SHOTS, TAPERLENGTH, INVTYPE;
46
    extern int NPROC, NPROCX, NPROCY, MYID, IDX, IDY;
47
    extern int GRADT1, GRADT2, GRADT3, GRADT4, ITERMAX, INVMAT1, INVMAT, QUELLTYPB;
Florian Wittkamp's avatar
Florian Wittkamp committed
48
49
    extern int GRAD_METHOD;
    extern float TSHIFT_back;
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
    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;
    extern char TAPER_FILE_NAME[STRING_SIZE], TAPER_FILE_NAME_U[STRING_SIZE], TAPER_FILE_NAME_RHO[STRING_SIZE];
    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];
67
    extern int TIME_FILT, ORDER, ZERO_PHASE,WRITE_FILTERED_DATA;
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
    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];
    extern int TIMEWIN, NORMALIZE;
    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;
    
    // Parameter for inversion of SH waves and joint inversion
    extern int WAVETYPE;
    extern int QUELLART_SH;
    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;
    extern float EPSILON_WE;
    extern int EPRECOND_PER_SHOT;
    
    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;
    
    /* definition of local variables */
    
    /* 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){
        
        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;
        
        fdum[22]  = DAMPING;
        fdum[23]  = REC_ARRAY_DEPTH;
        fdum[24]  = REC_ARRAY_DIST;
Tilman Steinweg's avatar
Tilman Steinweg committed
148
        fdum[25]  = PLANE_WAVE_DEPTH;
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
        
        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
167

168
169
170
171
172
173
174
175
176
177
178
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
        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;
        
        idum[1]  = NPROCX;
        idum[2]  = NPROCY;
        
        idum[4]  = NPROCX*NPROCY;
        idum[5]  = NX;
        idum[6]  = NY;
        
        idum[8]  = QUELLART;
        idum[9]  = QUELLTYP;
        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;
231

232
233
234
235
        
        idum[31]  = FDORDER;
        idum[32]  = MAXRELERROR;
        idum[33]  = RUN_MULTIPLE_SHOTS;
Tilman Steinweg's avatar
Tilman Steinweg committed
236
        idum[34]  = TAPERLENGTH;
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
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
        idum[35]  = INVTYPE;
        idum[36]  = GRADT1;
        idum[37]  = GRADT2;
        idum[38]  = GRADT3;
        idum[39]  = GRADT4;
        idum[40]  = ITERMAX;
        idum[41]  = INVMAT1;
        idum[42]  = FW;
        idum[43]  = INVMAT;
        idum[44]  = QUELLTYPB;
        
        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;
        
        idum[94]  = QUELLART_SH;
        
        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;
        
        idum[106]=N_LBFGS;

        idum[107]=WOLFE_CONDITION;
        idum[108]=WOLFE_NUM_TEST;
        idum[109]=WOLFE_TRY_OLD_STEPLENGTH;
        
345
346
        idum[110]=WRITE_FILTERED_DATA;
        
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
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
    } /** 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);
    MPI_Bcast(&SEIS_FILE_VX,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&SEIS_FILE_VY,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&SEIS_FILE_CURL,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&SEIS_FILE_DIV,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&SEIS_FILE_P,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    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_Bcast(&TAPER_FILE_NAME_U,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    MPI_Bcast(&TAPER_FILE_NAME_RHO,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
    
    MPI_Barrier(MPI_COMM_WORLD);
    
    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];
    
    DAMPING=fdum[22];
    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];
    
    NPROCX = idum[1];
    NPROCY = idum[2];
    NPROC  = idum[4];
    NX = idum[5];
    NY = idum[6];
    
    QUELLART = idum[8];
    QUELLTYP = idum[9];
    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];
495

496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
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
    
    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];
    INVMAT1 = idum[41];
    FW = idum[42];
    INVMAT  = idum[43];  
    QUELLTYPB = idum[44];
    
    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];
    
    QUELLART_SH = idum[94];
    
    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];
    
    N_LBFGS=idum[106];
    
    WOLFE_CONDITION=idum[107];
    
    WOLFE_NUM_TEST=idum[108];
    
    WOLFE_TRY_OLD_STEPLENGTH=idum[109];
    
612
613
    WRITE_FILTERED_DATA=idum[110];
    
614
615
    MPI_Bcast(&FL[1],L,MPI_FLOAT,0,MPI_COMM_WORLD);
    
Tilman Steinweg's avatar
Tilman Steinweg committed
616
}