Commit 7035bed9 authored by niklas.thiel's avatar niklas.thiel

Merge branch 'develop' into develop

parents c4bdb2df d1e91345
......@@ -487,12 +487,12 @@ Default values are:
With the use of a workflow file, you can define different FWI stages. For instance, one FWI stage could refer to one corner frequency of a low-pass filter or to a specific time window. Every line in the workflow file corresponds to one FWI stage. To use a workflow file the switch USE\_WORKFLOW have to be set to 1. The algorithm will automatically change to the next line of the workflow file if the abort criterium of the current line is reached or if no step length could be found which reduces the misfit. The structure of the variables inside the workflow file is as follow: \\
\noindent
\begin{tabular}{llllllllllll}
\# & INV\_VS & INV\_VP & INV\_RHO & PRO & TIME\_FILT & FC & WAVETYPE & 0 & 0 & EPRECOND & EPSILON\_WE\\
\begin{tabular}{lllllllllllll}
\# & INV\_VS & INV\_VP & INV\_RHO & PRO & TIME\_FILT & F\_HIGH\_PASS & F\_LOW\_PASS & WAVETYPE & 0 & 0 & EPRECOND & EPSILON\_WE\\
\end{tabular}
\ \\
The first column is the number of the line. With INV\_* etc. you can activate the inversion for VS, VP or RHO, respectively. The abort criterium in percent for this FWI stage will be the declared in the variable PRO. With TIME\_FILT you can activate the frequency filtering with the corner frequency FC. WAVETYPE can be used to switch between PSV and SH modeling, however it is recommended to use PSV modeling (WAVETYPE==1) due to the current development on SH modeling. The following to zeros are placeholders for an upcoming update. With EPRECOND and EPSILON\_WE you can control the approx. Hessian. Please note, that all features which are used eg. TIME\_FILT (see section \ref{sec:filtering}) within the workflow have to be activated in the .JSON file.
The first column is the number of the line. With INV\_* etc. you can activate the inversion for VS, VP or RHO, respectively. The abort criterium in percent for this FWI stage will be the declared in the variable PRO. With TIME\_FILT you can activate the frequency filtering with the corner frequency F\_HIGH\_PASS of the high-pass and F\_LOW\_PASS of the low-pass filter. WAVETYPE can be used to switch between PSV and SH modeling, however it is recommended to use PSV modeling (WAVETYPE==1) due to the current development on SH modeling. The following to zeros are placeholders for an upcoming update. With EPRECOND and EPSILON\_WE you can control the approx. Hessian. Please note, that all features which are used eg. TIME\_FILT (see section \ref{sec:filtering}) within the workflow have to be activated in the .JSON file.
For an example of a workflow file, have a look in the par/ folder.
......@@ -840,7 +840,7 @@ For GRAD\_FILT\_WAVELENGTH = 1 (and TIME\_FILT=1) a new wavelength dependent fil
\begin{equation}
\mbox{FILT\_SIZE\_GRAD} = \frac{V_{s,\text{average}}\cdot \text{A}}{\text{FC}}
\end{equation}
where FC is the corner frequency of TIME\_FILT and A is a weighting factor.
where F\_LOW\_PASS is the corner frequency of TIME\_FILT and A is a weighting factor.
\section{Model manipulation}
......
# VS VP RHO PRO FIL FC WT J J EPRE EPSI
1 1 0 0 0.01 0 0 2 0 0 0 0.005
2 1 0 0 0.01 0 0 2 0 0 0 0.005
3 1 0 0 0.01 0 0 2 0 0 0 0.005
4 1 0 0 0.01 0 0 2 0 0 0 0.005
# VS VP RHO PRO F_FILT F_HIGH F_LOW WT J J EPRE EPSI
1 1 0 0 0.01 0 0 0 2 0 0 0 0.005
2 1 0 0 0.01 0 0 0 2 0 0 0 0.005
3 1 0 0 0.01 0 0 0 2 0 0 0 0.005
4 1 0 0 0.01 0 0 0 2 0 0 0 0.005
......@@ -31,6 +31,7 @@ void apply_workflow(float ** workflow,int workflow_lines,char workflow_header[ST
/* extern variables */
extern int INV_RHO_ITER,INV_VS_ITER,INV_VP_ITER;
extern int TIME_FILT,MYID;
extern float F_HIGH_PASS;
extern float PRO;
extern int WAVETYPE;
extern float JOINT_INVERSION_PSV_SH_ALPHA_VS;
......@@ -88,42 +89,45 @@ void apply_workflow(float ** workflow,int workflow_lines,char workflow_header[ST
PRO=workflow[WORKFLOW_STAGE][5];
/* Frequency filtering */
if(TIME_FILT==1) {
if( TIME_FILT == 1 ) {
TIME_FILT=workflow[WORKFLOW_STAGE][6];
if(*F_LOW_PASS>workflow[WORKFLOW_STAGE][7]&&(workflow[WORKFLOW_STAGE][6]>0)) {
if(MYID==0)printf("\n Due to the abort criteriom F_LOW_PASS is already higher than specified in workflow\n");
if(MYID==0)printf(" therefore instead of %.2f HZ F_LOW_PASS=%.2f HZ is used\n",workflow[WORKFLOW_STAGE][7],*F_LOW_PASS);
} else {
if(*F_LOW_PASS!=workflow[WORKFLOW_STAGE][7]) *LBFGS_iter_start=*iter;
*F_LOW_PASS=workflow[WORKFLOW_STAGE][7];
if( TIME_FILT > 0 ) {
if( F_HIGH_PASS != workflow[WORKFLOW_STAGE][7] ) *LBFGS_iter_start=*iter;
F_HIGH_PASS=workflow[WORKFLOW_STAGE][7];
if( *F_LOW_PASS != workflow[WORKFLOW_STAGE][8] ) *LBFGS_iter_start=*iter;
*F_LOW_PASS=workflow[WORKFLOW_STAGE][8];
}
} else {
if(MYID==0&&(workflow[WORKFLOW_STAGE][6]>0))printf("\n TIME_FILT cannot be activated due to it is not activated in the JSON File \n");
}
/* Change of wavetype */
if(wavetype_start!=3&&(WAVETYPE!=workflow[WORKFLOW_STAGE][8])){
if(wavetype_start!=3&&(WAVETYPE!=workflow[WORKFLOW_STAGE][9])){
if(MYID==0)printf("\n Sorry, change of WAVETYPE with workflow only possible if WAVETYPE==3 in *.json");
if(MYID==0)printf("\n WAVETYPE will remain unchanged %i",WAVETYPE);
} else {
/* detect change and reset some things */
if(WAVETYPE!=workflow[WORKFLOW_STAGE][8]) {
if(WAVETYPE!=workflow[WORKFLOW_STAGE][9]) {
*change_wavetype_iter=*iter;
*LBFGS_iter_start=*iter;
}
WAVETYPE=workflow[WORKFLOW_STAGE][8];
WAVETYPE=workflow[WORKFLOW_STAGE][9];
}
/* Joint inversion PSV and SH */
JOINT_INVERSION_PSV_SH_ALPHA_VS=workflow[WORKFLOW_STAGE][9];
JOINT_INVERSION_PSV_SH_ALPHA_RHO=workflow[WORKFLOW_STAGE][10];
JOINT_INVERSION_PSV_SH_ALPHA_VS=workflow[WORKFLOW_STAGE][10];
JOINT_INVERSION_PSV_SH_ALPHA_RHO=workflow[WORKFLOW_STAGE][11];
/* Approx. Hessian */
if(EPRECOND==0 && workflow[WORKFLOW_STAGE][11]!=0){
if(EPRECOND==0 && workflow[WORKFLOW_STAGE][12]!=0){
if(MYID==0) printf(" WARNING: EPRECOND have to be set >0 in JSON (if so, ignore this message)");
}
EPRECOND=workflow[WORKFLOW_STAGE][11];
EPSILON_WE=workflow[WORKFLOW_STAGE][12];
EPRECOND=workflow[WORKFLOW_STAGE][12];
EPSILON_WE=workflow[WORKFLOW_STAGE][13];
if(*LBFGS_iter_start==*iter && GRAD_METHOD==2){
if(MYID==0)printf("\n L-BFGS will be used from iteration %d on.",*LBFGS_iter_start+1);
......
......@@ -22,7 +22,7 @@
#define STRING_SIZE 74
#define STRING_SIZE2 256
#define REQUEST_COUNT 4
#define WORKFLOW_MAX_VAR 12
#define WORKFLOW_MAX_VAR 13
/* declaration of functions */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment