globvar.h 3.82 KB
Newer Older
Tilman Steinweg's avatar
Tilman Steinweg committed
1
/*------------------------------------------------------------------------
2
 *   globvar.h - global variables of viscoelastic FD programs
Tilman Steinweg's avatar
Tilman Steinweg committed
3 4 5 6 7 8 9 10
 *
 *  ----------------------------------------------------------------------*/

/* definition of global variables used in the finite difference programs*/
/* generally, for the names of the global variables uppercase letters are used */

/* Add new variables also in exchange_par.c and read_par_json.c */

11
float XS, YS, DH, TIME, DT, TS, VPPML, PLANE_WAVE_DEPTH, PHI;
Tilman Steinweg's avatar
Tilman Steinweg committed
12 13 14 15 16
float TSNAP1, TSNAP2, TSNAPINC, *FL, TAU, F_REF;
float XREC1, XREC2, YREC1, YREC2;
float REC_ARRAY_DEPTH, REC_ARRAY_DIST;
float REFREC[4]={0.0, 0.0, 0.0, 0.0}, FPML;
int   SEISMO, NDT, NGEOPH, NSRC=1, SEIS_FORMAT, FREE_SURF, READMOD, READREC, SRCREC, FW=0;
17
int   NX, NY, NT, SOURCE_SHAPE,SOURCE_SHAPE_SH, SOURCE_TYPE, SNAP, SNAP_FORMAT, REC_ARRAY, RUN_MULTIPLE_SHOTS, NTRG,STF_FULL;
18
int   L, BOUNDARY, DC, DRX, NXG, NYG, IDX, IDY, FDORDER, MAXRELERROR;
19
char  SNAP_FILE[STRING_SIZE], SOURCE_FILE[STRING_SIZE], SIGNAL_FILE[STRING_SIZE], SIGNAL_FILE_SH[STRING_SIZE];
20
char  MFILE[STRING_SIZE], REC_FILE[STRING_SIZE];
21 22
char  LOG_FILE[STRING_SIZE];
char  SEIS_FILE[STRING_SIZE];
Tilman Steinweg's avatar
Tilman Steinweg committed
23 24
FILE *FP;

25
int VERBOSE;
Tilman Steinweg's avatar
Tilman Steinweg committed
26 27 28 29 30 31 32 33 34
/* Mpi-variables */
int   NP, NPSP, NPROC, NPROCX, NPROCY, MYID, IENDX, IENDY;
int   POS[3], INDEX[5];     
const int TAG1=1,TAG2=2, TAG3=3, TAG4=4, TAG5=5,TAG6=6; 

/* spatial adaptive Code variables*/
int   check_id, cfgt_id, cfgt, jumpid;
float DH1;

Florian Wittkamp's avatar
Florian Wittkamp committed
35
/* TDFWI Code IFOS_elastic*/
Tilman Steinweg's avatar
Tilman Steinweg committed
36
char JACOBIAN[STRING_SIZE], DATA_DIR[STRING_SIZE], FREQ_FILE[STRING_SIZE];
37 38 39

int USE_WORKFLOW;
char FILE_WORKFLOW[STRING_SIZE];
40
int WORKFLOW_STAGE;
41

Tilman Steinweg's avatar
Tilman Steinweg committed
42 43
int TAPER, TAPERLENGTH, INVTYPE;
int GRADT1,GRADT2,GRADT3,GRADT4;
44
int ITERMAX, REC1, REC2, PARAMETERIZATION, FORWARD_ONLY, ADJOINT_TYPE;
45 46
int  GRAD_METHOD;
float TSHIFT_back;
Tilman Steinweg's avatar
Tilman Steinweg committed
47 48 49 50 51 52 53
int MODEL_FILTER, FILT_SIZE;
float EPSILON, MUN, EPSILON_u, EPSILON_rho;

int TESTSHOT_START, TESTSHOT_END, TESTSHOT_INCR, NO_OF_TESTSHOTS; 
int SWS_TAPER_GRAD_VERT, SWS_TAPER_GRAD_HOR, SWS_TAPER_GRAD_SOURCES, SWS_TAPER_CIRCULAR_PER_SHOT, SRTSHAPE, FILTSIZE;
int SWS_TAPER_FILE, SWS_TAPER_FILE_PER_SHOT;
float SRTRADIUS;
54
char TAPER_FILE_NAME[STRING_SIZE];
Tilman Steinweg's avatar
Tilman Steinweg committed
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70

int SPATFILTER, SPAT_FILT_SIZE, SPAT_FILT_1, SPAT_FILT_ITER;

int INV_RHO_ITER, INV_VS_ITER, INV_VP_ITER;

int MIN_ITER;

char INV_MODELFILE[STRING_SIZE];
int nfstart, nf;

int nfstart_jac, nf_jac;

float VPUPPERLIM, VPLOWERLIM, VSUPPERLIM, VSLOWERLIM, RHOUPPERLIM, RHOLOWERLIM;

float npower, k_max_PML;

Florian Wittkamp's avatar
Florian Wittkamp committed
71 72
int TAPER_STF;
int INV_STF, N_STF, N_STF_START,TW_IND;
Tilman Steinweg's avatar
Tilman Steinweg committed
73 74
char PARA[STRING_SIZE];

75
int TIME_FILT, ORDER;
76
int WRITE_FILTERED_DATA;
77
float F_LOW_PASS_START, F_LOW_PASS_END, F_LOW_PASS_INCR, F_HIGH_PASS;
Tilman Steinweg's avatar
Tilman Steinweg committed
78 79 80 81 82 83 84 85

int LNORM, DTINV;

int STEPMAX;
float EPS_SCALE, SCALEFAC;

float PRO;

86
int EPRECOND;
87
float EPSILON_WE,EPSILON_WE_SH;
88 89
int EPRECOND_ITER;
int EPRECOND_PER_SHOT;
90
int EPRECOND_PER_SHOT_SH;
91 92 93 94

int N_LBFGS;
int LBFGS_STEP_LENGTH;

95
float LBFGS_SCALE_GRADIENTS;
96 97 98
int WOLFE_CONDITION=0;
int WOLFE_NUM_TEST=5;
int WOLFE_TRY_OLD_STEPLENGTH=1;
99 100
float WOLFE_C1_SL;
float WOLFE_C2_SL;
101

Tilman Steinweg's avatar
Tilman Steinweg committed
102 103 104 105
/* trace kill variables */
int TRKILL;
char TRKILL_FILE[STRING_SIZE];

106
int TRKILL_OFFSET;
107
int TRKILL_STF_OFFSET_INVERT;
108 109 110
float TRKILL_OFFSET_LOWER;
float TRKILL_OFFSET_UPPER;

Tilman Steinweg's avatar
Tilman Steinweg committed
111 112 113 114
/* trace kill STF variables */
int TRKILL_STF;
char TRKILL_FILE_STF[STRING_SIZE];

115 116 117 118
int TRKILL_STF_OFFSET;
float TRKILL_STF_OFFSET_LOWER;
float TRKILL_STF_OFFSET_UPPER;

119
int TIMEWIN, NORMALIZE;
Tilman Steinweg's avatar
Tilman Steinweg committed
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
float TWLENGTH_PLUS, TWLENGTH_MINUS, GAMMA;
char PICKS_FILE[STRING_SIZE];
char MISFIT_LOG_FILE[STRING_SIZE]; 

int GRAD_FILTER, FILT_SIZE_GRAD;

int VELOCITY;

float WATERLEVEL_LNORM8;

float VP_VS_RATIO;

int S;

float S_VP, S_VS, S_RHO;

int GRAD_FILT_WAVELENGTH;
float A;

int ACOUSTIC;
140 141 142 143 144 145

int VERBOSE;

int WAVETYPE;
int JOINT_INVERSION_PSV_SH_TYPE;

146 147
int JOINT_EQUAL_WEIGHTING;

148 149
float JOINT_INVERSION_PSV_SH_ALPHA_VS;
float JOINT_INVERSION_PSV_SH_ALPHA_RHO;
150
int SNAPSHOT_START,SNAPSHOT_END,SNAPSHOT_INCR;