Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
IFOS2D
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
GPIAG-Software
IFOS2D
Commits
6f89f6bd
Commit
6f89f6bd
authored
Dec 09, 2015
by
laura.gassner
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'development' of git.scc.kit.edu:GPIAG-Software/DENISE into development
parents
bd997067
d653a65d
Changes
110
Hide whitespace changes
Inline
Side-by-side
Showing
110 changed files
with
498 additions
and
215 deletions
+498
-215
src/LBFGS.c
src/LBFGS.c
+1
-1
src/PCG.c
src/PCG.c
+1
-1
src/PCG_SH.c
src/PCG_SH.c
+1
-1
src/PML_pro.c
src/PML_pro.c
+1
-1
src/apply_workflow.c
src/apply_workflow.c
+1
-1
src/av_mue.c
src/av_mue.c
+4
-21
src/av_rho.c
src/av_rho.c
+1
-3
src/av_tau.c
src/av_tau.c
+3
-9
src/calc_energy.c
src/calc_energy.c
+1
-1
src/calc_envelope.c
src/calc_envelope.c
+1
-1
src/calc_hilbert.c
src/calc_hilbert.c
+1
-1
src/calc_mat_change_test.c
src/calc_mat_change_test.c
+1
-1
src/calc_misfit.c
src/calc_misfit.c
+1
-1
src/calc_opt_step.c
src/calc_opt_step.c
+1
-1
src/calc_res.c
src/calc_res.c
+1
-1
src/catseis.c
src/catseis.c
+1
-1
src/checkfd.c
src/checkfd.c
+1
-1
src/checkfd_ssg_elastic.c
src/checkfd_ssg_elastic.c
+1
-1
src/checkfd_ssg_visc.c
src/checkfd_ssg_visc.c
+1
-1
src/comm_ini.c
src/comm_ini.c
+1
-1
src/conv_FD.c
src/conv_FD.c
+1
-1
src/count_killed_traces.c
src/count_killed_traces.c
+1
-1
src/denise.c
src/denise.c
+13
-26
src/exchange_p.c
src/exchange_p.c
+1
-1
src/exchange_par.c
src/exchange_par.c
+1
-1
src/exchange_s.c
src/exchange_s.c
+1
-1
src/exchange_v.c
src/exchange_v.c
+1
-1
src/fd.h
src/fd.h
+5
-7
src/filter_frequencies.c
src/filter_frequencies.c
+1
-1
src/holbergcoeff.c
src/holbergcoeff.c
+1
-1
src/info.c
src/info.c
+1
-1
src/initproc.c
src/initproc.c
+1
-1
src/inseis.c
src/inseis.c
+1
-1
src/inseis_source_wavelet.c
src/inseis_source_wavelet.c
+1
-1
src/interpol.c
src/interpol.c
+1
-1
src/joint_inversion.c
src/joint_inversion.c
+1
-1
src/json_parser.c
src/json_parser.c
+1
-1
src/matcopy.c
src/matcopy.c
+1
-1
src/matcopy_acoustic.c
src/matcopy_acoustic.c
+1
-1
src/matcopy_elastic.c
src/matcopy_elastic.c
+1
-1
src/matrix_operations.c
src/matrix_operations.c
+1
-1
src/max_grad.c
src/max_grad.c
+1
-1
src/merge.c
src/merge.c
+1
-1
src/mergemod.c
src/mergemod.c
+1
-1
src/norm.c
src/norm.c
+1
-1
src/note.c
src/note.c
+1
-1
src/output_source_signal.c
src/output_source_signal.c
+1
-1
src/outseis.c
src/outseis.c
+1
-1
src/outseis_glob.c
src/outseis_glob.c
+1
-1
src/outseis_vector.c
src/outseis_vector.c
+1
-1
src/prepare_update_s.c
src/prepare_update_s.c
+1
-3
src/psource.c
src/psource.c
+1
-1
src/rd_sour.c
src/rd_sour.c
+1
-1
src/read_par_json.c
src/read_par_json.c
+1
-1
src/read_workflow.c
src/read_workflow.c
+1
-1
src/readbufs.c
src/readbufs.c
+1
-1
src/readbufv.c
src/readbufv.c
+1
-1
src/readdsk.c
src/readdsk.c
+1
-1
src/readmod.c
src/readmod.c
+1
-1
src/readmod_acoustic.c
src/readmod_acoustic.c
+1
-1
src/readmod_elastic.c
src/readmod_elastic.c
+1
-1
src/receiver.c
src/receiver.c
+1
-1
src/saveseis.c
src/saveseis.c
+1
-1
src/saveseis_glob.c
src/saveseis_glob.c
+1
-1
src/seismo_ssg.c
src/seismo_ssg.c
+1
-1
src/smooth.c
src/smooth.c
+1
-1
src/snap_rsg.c
src/snap_rsg.c
+1
-1
src/snap_ssg.c
src/snap_ssg.c
+1
-1
src/snap_ssg_SH.c
src/snap_ssg_SH.c
+1
-1
src/snapmerge.c
src/snapmerge.c
+1
-1
src/solvelin.c
src/solvelin.c
+1
-1
src/sources.c
src/sources.c
+1
-1
src/spat_filt.c
src/spat_filt.c
+1
-1
src/splitrec.c
src/splitrec.c
+1
-1
src/splitsrc.c
src/splitsrc.c
+1
-1
src/splitsrc_back.c
src/splitsrc_back.c
+1
-1
src/stalta.c
src/stalta.c
+1
-1
src/stf.c
src/stf.c
+1
-1
src/surface_PML.c
src/surface_PML.c
+11
-6
src/surface_acoustic_PML.c
src/surface_acoustic_PML.c
+1
-1
src/surface_elastic_PML.c
src/surface_elastic_PML.c
+1
-1
src/taper.c
src/taper.c
+1
-1
src/taper_grad.c
src/taper_grad.c
+1
-1
src/taper_grad_shot.c
src/taper_grad_shot.c
+1
-1
src/time_window.c
src/time_window.c
+1
-1
src/timedomain_filt.c
src/timedomain_filt.c
+1
-1
src/timedomain_filt_vector.c
src/timedomain_filt_vector.c
+1
-1
src/update_p_PML.c
src/update_p_PML.c
+1
-3
src/update_s_elastic_PML.c
src/update_s_elastic_PML.c
+1
-2
src/update_s_elastic_PML_SH.c
src/update_s_elastic_PML_SH.c
+1
-1
src/update_s_elastic_ssg.c
src/update_s_elastic_ssg.c
+1
-2
src/update_s_visc_PML.c
src/update_s_visc_PML.c
+2
-3
src/update_s_visc_PML_SH.c
src/update_s_visc_PML_SH.c
+354
-17
src/update_v_PML.c
src/update_v_PML.c
+1
-3
src/update_v_PML_SH.c
src/update_v_PML_SH.c
+4
-10
src/update_v_acoustic_PML.c
src/update_v_acoustic_PML.c
+1
-3
src/update_v_ssg.c
src/update_v_ssg.c
+1
-3
src/util.c
src/util.c
+1
-1
src/wavelet.c
src/wavelet.c
+1
-1
src/wavelet_stf.c
src/wavelet_stf.c
+1
-1
src/window_cos.c
src/window_cos.c
+1
-1
src/wolfe_condition.c
src/wolfe_condition.c
+1
-1
src/write_par.c
src/write_par.c
+1
-1
src/writebufs.c
src/writebufs.c
+1
-1
src/writebufv.c
src/writebufv.c
+1
-1
src/writedsk.c
src/writedsk.c
+1
-1
src/writemod.c
src/writemod.c
+1
-1
src/zero_fdveps.c
src/zero_fdveps.c
+1
-1
src/zero_fdveps_ac.c
src/zero_fdveps_ac.c
+1
-1
src/zero_fdveps_visc.c
src/zero_fdveps_visc.c
+1
-1
No files found.
src/LBFGS.c
View file @
6f89f6bd
/*------------------------------------------------------------------------
/*------------------------------------------------------------------------
* Copyright (C) 201
5
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/PCG.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/PCG_SH.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/PML_pro.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/apply_workflow.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
5
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/av_mue.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
@@ -19,9 +19,9 @@
...
@@ -19,9 +19,9 @@
#include "fd.h"
#include "fd.h"
void
av_mue
(
float
**
u
,
float
**
uipjp
,
float
**
uip
,
float
**
ujp
,
float
**
rho
){
void
av_mue
(
float
**
u
,
float
**
uipjp
,
float
**
rho
){
extern
int
NX
,
NY
,
INVMAT1
,
WAVETYPE
;
extern
int
NX
,
NY
,
INVMAT1
;
int
i
,
j
;
int
i
,
j
;
float
u1
,
u2
,
u3
,
u4
;
float
u1
,
u2
,
u3
,
u4
;
...
@@ -31,17 +31,9 @@ void av_mue(float ** u, float ** uipjp, float ** uip, float ** ujp, float ** rho
...
@@ -31,17 +31,9 @@ void av_mue(float ** u, float ** uipjp, float ** uip, float ** ujp, float ** rho
for
(
i
=
1
;
i
<=
NX
;
i
++
){
for
(
i
=
1
;
i
<=
NX
;
i
++
){
uipjp
[
j
][
i
]
=
4
.
0
/
((
1
.
0
/
u
[
j
][
i
])
+
(
1
.
0
/
u
[
j
][
i
+
1
])
+
(
1
.
0
/
u
[
j
+
1
][
i
])
+
(
1
.
0
/
u
[
j
+
1
][
i
+
1
]));
uipjp
[
j
][
i
]
=
4
.
0
/
((
1
.
0
/
u
[
j
][
i
])
+
(
1
.
0
/
u
[
j
][
i
+
1
])
+
(
1
.
0
/
u
[
j
+
1
][
i
])
+
(
1
.
0
/
u
[
j
+
1
][
i
+
1
]));
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
uip
[
j
][
i
]
=
0
.
5
*
(
u
[
j
][
i
+
1
]
+
u
[
j
][
i
]);
ujp
[
j
][
i
]
=
0
.
5
*
(
u
[
j
+
1
][
i
]
+
u
[
j
][
i
]);
}
if
((
u
[
j
][
i
]
==
0
.
0
)
||
(
u
[
j
][
i
+
1
]
==
0
.
0
)
||
(
u
[
j
+
1
][
i
]
==
0
.
0
)
||
(
u
[
j
+
1
][
i
+
1
]
==
0
.
0
)){
if
((
u
[
j
][
i
]
==
0
.
0
)
||
(
u
[
j
][
i
+
1
]
==
0
.
0
)
||
(
u
[
j
+
1
][
i
]
==
0
.
0
)
||
(
u
[
j
+
1
][
i
+
1
]
==
0
.
0
)){
uipjp
[
j
][
i
]
=
0
.
0
;
uipjp
[
j
][
i
]
=
0
.
0
;
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
uip
[
j
][
i
]
=
0
.
0
;
ujp
[
j
][
i
]
=
0
.
0
;
}
}
}
...
@@ -61,19 +53,10 @@ void av_mue(float ** u, float ** uipjp, float ** uip, float ** ujp, float ** rho
...
@@ -61,19 +53,10 @@ void av_mue(float ** u, float ** uipjp, float ** uip, float ** ujp, float ** rho
u4
=
rho
[
j
+
1
][
i
+
1
]
*
u
[
j
+
1
][
i
+
1
]
*
u
[
j
+
1
][
i
+
1
];
u4
=
rho
[
j
+
1
][
i
+
1
]
*
u
[
j
+
1
][
i
+
1
]
*
u
[
j
+
1
][
i
+
1
];
uipjp
[
j
][
i
]
=
4
.
0
/
((
1
.
0
/
u1
)
+
(
1
.
0
/
u2
)
+
(
1
.
0
/
u3
)
+
(
1
.
0
/
u4
));
uipjp
[
j
][
i
]
=
4
.
0
/
((
1
.
0
/
u1
)
+
(
1
.
0
/
u2
)
+
(
1
.
0
/
u3
)
+
(
1
.
0
/
u4
));
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
uip
[
j
][
i
]
=
0
.
5
*
(
u1
+
u2
);
ujp
[
j
][
i
]
=
0
.
5
*
(
u3
+
u1
);
}
if
((
u1
==
0
.
0
)
||
(
u2
==
0
.
0
)
||
(
u3
==
0
.
0
)
||
(
u4
==
0
.
0
)){
if
((
u1
==
0
.
0
)
||
(
u2
==
0
.
0
)
||
(
u3
==
0
.
0
)
||
(
u4
==
0
.
0
)){
uipjp
[
j
][
i
]
=
0
.
0
;
uipjp
[
j
][
i
]
=
0
.
0
;
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
uip
[
j
][
i
]
=
0
.
0
;
ujp
[
j
][
i
]
=
0
.
0
;
}
}
}
}
}
}
}
...
...
src/av_rho.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
@@ -16,8 +16,6 @@
...
@@ -16,8 +16,6 @@
* along with DENISE. See file COPYING and/or <http://www.gnu.org/licenses/gpl-2.0.html>.
* along with DENISE. See file COPYING and/or <http://www.gnu.org/licenses/gpl-2.0.html>.
-----------------------------------------------------------------------------------------*/
-----------------------------------------------------------------------------------------*/
/* $Id: av_rho.c,v 1.1.1.1 2007/11/21 22:44:52 koehn Exp $*/
#include "fd.h"
#include "fd.h"
void
av_rho
(
float
**
rho
,
float
**
rip
,
float
**
rjp
){
void
av_rho
(
float
**
rho
,
float
**
rip
,
float
**
rjp
){
...
...
src/av_tau.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
@@ -16,22 +16,16 @@
...
@@ -16,22 +16,16 @@
* along with DENISE. See file COPYING and/or <http://www.gnu.org/licenses/gpl-2.0.html>.
* along with DENISE. See file COPYING and/or <http://www.gnu.org/licenses/gpl-2.0.html>.
-----------------------------------------------------------------------------------------*/
-----------------------------------------------------------------------------------------*/
/* $Id: av_tau.c,v 2.4 2007/08/21 13:16:19 tbohlen Exp $*/
#include "fd.h"
#include "fd.h"
void
av_tau
(
float
**
taus
,
float
**
tausipjp
,
float
**
tausip
,
float
**
tausjp
){
void
av_tau
(
float
**
taus
,
float
**
tausipjp
){
extern
int
NX
,
NY
,
WAVETYPE
;
extern
int
NX
,
NY
;
int
i
,
j
;
int
i
,
j
;
for
(
j
=
1
;
j
<=
NY
;
j
++
){
for
(
j
=
1
;
j
<=
NY
;
j
++
){
for
(
i
=
1
;
i
<=
NX
;
i
++
){
for
(
i
=
1
;
i
<=
NX
;
i
++
){
tausipjp
[
j
][
i
]
=
0
.
25
*
(
taus
[
j
][
i
]
+
taus
[
j
][
i
+
1
]
+
taus
[
j
+
1
][
i
]
+
taus
[
j
+
1
][
i
+
1
]);
tausipjp
[
j
][
i
]
=
0
.
25
*
(
taus
[
j
][
i
]
+
taus
[
j
][
i
+
1
]
+
taus
[
j
+
1
][
i
]
+
taus
[
j
+
1
][
i
+
1
]);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
tausip
[
j
][
i
]
=
0
.
5
*
(
taus
[
j
][
i
+
1
]
+
taus
[
j
][
i
]);
tausjp
[
j
][
i
]
=
0
.
5
*
(
taus
[
j
+
1
][
i
]
+
taus
[
j
][
i
]);
}
}
}
}
}
}
}
src/calc_energy.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/calc_envelope.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/calc_hilbert.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/calc_mat_change_test.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/calc_misfit.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/calc_opt_step.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/calc_res.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/catseis.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/checkfd.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/checkfd_ssg_elastic.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/checkfd_ssg_visc.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/comm_ini.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/conv_FD.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/count_killed_traces.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
...
src/denise.c
View file @
6f89f6bd
/*-----------------------------------------------------------------------------------------
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
6
For the list of authors, see file AUTHORS.
*
*
* This file is part of DENISE.
* This file is part of DENISE.
*
*
...
@@ -68,7 +68,6 @@ int main(int argc, char **argv){
...
@@ -68,7 +68,6 @@ int main(int argc, char **argv){
float
**
gradg
,
**
gradp
,
**
gradg_rho
,
**
gradp_rho
,
**
gradg_u
,
**
gradp_u
,
**
gradp_u_z
,
**
gradp_rho_z
;
float
**
gradg
,
**
gradp
,
**
gradg_rho
,
**
gradp_rho
,
**
gradg_u
,
**
gradp_u
,
**
gradp_u_z
,
**
gradp_rho_z
;
float
**
prho
,
**
prhonp1
,
**
prip
=
NULL
,
**
prjp
=
NULL
,
**
pripnp1
=
NULL
,
**
prjpnp1
=
NULL
,
**
ppi
,
**
pu
,
**
punp1
,
**
puipjp
,
**
ppinp1
;
float
**
prho
,
**
prhonp1
,
**
prip
=
NULL
,
**
prjp
=
NULL
,
**
pripnp1
=
NULL
,
**
prjpnp1
=
NULL
,
**
ppi
,
**
pu
,
**
punp1
,
**
puipjp
,
**
ppinp1
;
float
**
vpmat
,
***
forward_prop_x
,
***
forward_prop_y
,
***
forward_prop_rho_x
,
***
forward_prop_u
,
***
forward_prop_rho_y
,
***
forward_prop_p
;
float
**
vpmat
,
***
forward_prop_x
,
***
forward_prop_y
,
***
forward_prop_rho_x
,
***
forward_prop_u
,
***
forward_prop_rho_y
,
***
forward_prop_p
;
float
**
puip
,
**
pujp
;
float
***
forward_prop_z_xz
,
***
forward_prop_z_yz
,
***
forward_prop_rho_z
,
**
waveconv_mu_z
;
float
***
forward_prop_z_xz
,
***
forward_prop_z_yz
,
***
forward_prop_rho_z
,
**
waveconv_mu_z
;
float
**
uxz
,
**
uyz
;
float
**
uxz
,
**
uyz
;
...
@@ -93,7 +92,7 @@ int main(int argc, char **argv){
...
@@ -93,7 +92,7 @@ int main(int argc, char **argv){
/* Variables for viscoelastic modeling */
/* Variables for viscoelastic modeling */
float
**
ptaus
=
NULL
,
**
ptaup
=
NULL
,
*
etaip
=
NULL
,
*
etajm
=
NULL
,
*
peta
=
NULL
,
**
ptausipjp
=
NULL
,
**
fipjp
=
NULL
,
***
dip
=
NULL
,
*
bip
=
NULL
,
*
bjm
=
NULL
;
float
**
ptaus
=
NULL
,
**
ptaup
=
NULL
,
*
etaip
=
NULL
,
*
etajm
=
NULL
,
*
peta
=
NULL
,
**
ptausipjp
=
NULL
,
**
fipjp
=
NULL
,
***
dip
=
NULL
,
*
bip
=
NULL
,
*
bjm
=
NULL
;
float
*
cip
=
NULL
,
*
cjm
=
NULL
,
***
d
=
NULL
,
***
e
=
NULL
,
***
pr
=
NULL
,
***
pp
=
NULL
,
***
pq
=
NULL
,
**
f
=
NULL
,
**
g
=
NULL
;
float
*
cip
=
NULL
,
*
cjm
=
NULL
,
***
d
=
NULL
,
***
e
=
NULL
,
***
pr
=
NULL
,
***
pp
=
NULL
,
***
pq
=
NULL
,
**
f
=
NULL
,
**
g
=
NULL
;
float
**
tausjp
,
**
tausip
,
**
*
pt
=
NULL
,
***
po
=
NULL
;
// SH Simulation
float
***
pt
=
NULL
,
***
po
=
NULL
;
// SH Simulation
/* Variables for step length calculation */
/* Variables for step length calculation */
int
step1
,
step2
,
step3
=
0
,
itests
,
iteste
,
stepmax
,
countstep
;
int
step1
,
step2
,
step3
=
0
,
itests
,
iteste
,
stepmax
,
countstep
;
...
@@ -472,10 +471,6 @@ int main(int argc, char **argv){
...
@@ -472,10 +471,6 @@ int main(int argc, char **argv){
pu
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
pu
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
punp1
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
punp1
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
puipjp
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
puipjp
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
puip
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
pujp
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
}
}
}
vpmat
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
vpmat
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
...
@@ -507,8 +502,6 @@ int main(int argc, char **argv){
...
@@ -507,8 +502,6 @@ int main(int argc, char **argv){
ptaus
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
ptaus
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
ptausipjp
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
ptausipjp
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
tausip
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
tausjp
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
pt
=
f3tensor
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
,
1
,
L
);
pt
=
f3tensor
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
,
1
,
L
);
po
=
f3tensor
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
,
1
,
L
);
po
=
f3tensor
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
,
1
,
L
);
}
}
...
@@ -1033,9 +1026,9 @@ int main(int argc, char **argv){
...
@@ -1033,9 +1026,9 @@ int main(int argc, char **argv){
/* end of MPI split for processors with ntr>0 */
/* end of MPI split for processors with ntr>0 */
if
(
!
ACOUSTIC
)
av_mue
(
pu
,
puipjp
,
p
uip
,
pujp
,
p
rho
);
if
(
!
ACOUSTIC
)
av_mue
(
pu
,
puipjp
,
prho
);
av_rho
(
prho
,
prip
,
prjp
);
av_rho
(
prho
,
prip
,
prjp
);
if
(
!
ACOUSTIC
&&
L
)
av_tau
(
ptaus
,
ptausipjp
,
tausip
,
tausjp
);
if
(
!
ACOUSTIC
&&
L
)
av_tau
(
ptaus
,
ptausipjp
);
/* Preparing memory variables for update_s (viscoelastic) */
/* Preparing memory variables for update_s (viscoelastic) */
...
@@ -1295,7 +1288,7 @@ int main(int argc, char **argv){
...
@@ -1295,7 +1288,7 @@ int main(int argc, char **argv){
if
(
!
ACOUSTIC
){
if
(
!
ACOUSTIC
){
if
(
L
){
if
(
L
){
/* viscoelastic */
/* viscoelastic */
surface_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
pp
,
pq
,
ppi
,
pu
,
prho
,
ptaup
,
ptaus
,
etajm
,
peta
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
);
surface_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
pp
,
pq
,
ppi
,
pu
,
prho
,
ptaup
,
ptaus
,
etajm
,
peta
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
,
uyz
,
psxz
,
uxz
);
}
else
{
}
else
{
/* elastic */
/* elastic */
surface_elastic_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
ppi
,
pu
,
prho
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
,
uyz
,
psxz
,
uxz
);
surface_elastic_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
ppi
,
pu
,
prho
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
,
uyz
,
psxz
,
uxz
);
...
@@ -1753,7 +1746,7 @@ int main(int argc, char **argv){
...
@@ -1753,7 +1746,7 @@ int main(int argc, char **argv){
}
}
}
}
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
update_s_visc_PML_SH
(
1
,
NX
,
1
,
NY
,
pvz
,
psxz
,
psyz
,
pt
,
po
,
puip
,
pujp
,
tausip
,
tausjp
,
bip
,
bjm
,
cip
,
cjm
,
etajm
,
etaip
,
hc
,
infoout
,
K_x
,
a_x
,
b_x
,
K_x_half
,
a_x_half
,
b_x_half
,
K_y
,
a_y
,
b_y
,
K_y_half
,
a_y_half
,
b_y_half
,
psi_vzx
,
psi_vzy
);
update_s_visc_PML_SH
(
1
,
NX
,
1
,
NY
,
pvz
,
psxz
,
psyz
,
pt
,
po
,
bip
,
bjm
,
cip
,
cjm
,
d
,
dip
,
fipjp
,
f
,
hc
,
infoout
,
K_x
,
a_x
,
b_x
,
K_x_half
,
a_x_half
,
b_x_half
,
K_y
,
a_y
,
b_y
,
K_y_half
,
a_y_half
,
b_y_half
,
psi_vzx
,
psi_vzy
);
}
}
}
else
{
/* elastic */
}
else
{
/* elastic */
if
(
WAVETYPE
==
1
||
WAVETYPE
==
3
)
{
if
(
WAVETYPE
==
1
||
WAVETYPE
==
3
)
{
...
@@ -1779,7 +1772,7 @@ int main(int argc, char **argv){
...
@@ -1779,7 +1772,7 @@ int main(int argc, char **argv){
if
(
!
ACOUSTIC
){
if
(
!
ACOUSTIC
){
if
(
L
){
if
(
L
){
/* viscoelastic */
/* viscoelastic */
surface_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
pp
,
pq
,
ppi
,
pu
,
prho
,
ptaup
,
ptaus
,
etajm
,
peta
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
);
surface_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
pp
,
pq
,
ppi
,
pu
,
prho
,
ptaup
,
ptaus
,
etajm
,
peta
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
,
uyz
,
psxz
,
uxz
);
}
else
{
}
else
{
/* elastic */
/* elastic */
surface_elastic_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
ppi
,
pu
,
prho
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
,
uyz
,
psxz
,
uxz
);
surface_elastic_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
ppi
,
pu
,
prho
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
,
uyz
,
psxz
,
uxz
);
...
@@ -2243,7 +2236,7 @@ int main(int argc, char **argv){
...
@@ -2243,7 +2236,7 @@ int main(int argc, char **argv){
}
}
}
}
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
update_s_visc_PML_SH
(
1
,
NX
,
1
,
NY
,
pvz
,
psxz
,
psyz
,
pt
,
po
,
puip
,
pujp
,
tausip
,
tausjp
,
bip
,
bjm
,
cip
,
cjm
,
etajm
,
etaip
,
hc
,
infoout
,
K_x
,
a_x
,
b_x
,
K_x_half
,
a_x_half
,
b_x_half
,
K_y
,
a_y
,
b_y
,
K_y_half
,
a_y_half
,
b_y_half
,
psi_vzx
,
psi_vzy
);
update_s_visc_PML_SH
(
1
,
NX
,
1
,
NY
,
pvz
,
psxz
,
psyz
,
pt
,
po
,
bip
,
bjm
,
cip
,
cjm
,
d
,
dip
,
fipjp
,
f
,
hc
,
infoout
,
K_x
,
a_x
,
b_x
,
K_x_half
,
a_x_half
,
b_x_half
,
K_y
,
a_y
,
b_y
,
K_y_half
,
a_y_half
,
b_y_half
,
psi_vzx
,
psi_vzy
);
}
}
}
else
{
}
else
{
/* elastic */
/* elastic */
...
@@ -2268,7 +2261,7 @@ int main(int argc, char **argv){
...
@@ -2268,7 +2261,7 @@ int main(int argc, char **argv){
if
(
!
ACOUSTIC
){
if
(
!
ACOUSTIC
){
if
(
L
){
if
(
L
){
/* viscoelastic */
/* viscoelastic */
surface_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
pp
,
pq
,
ppi
,
pu
,
prho
,
ptaup
,
ptaus
,
etajm
,
peta
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
);
surface_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
pp
,
pq
,
ppi
,
pu
,
prho
,
ptaup
,
ptaus
,
etajm
,
peta
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
,
uyz
,
psxz
,
uxz
);
}
else
{
}
else
{
/* elastic */
/* elastic */
surface_elastic_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
ppi
,
pu
,
prho
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
,
uyz
,
psxz
,
uxz
);
surface_elastic_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
ppi
,
pu
,
prho
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
,
uyz
,
psxz
,
uxz
);
...
@@ -2882,7 +2875,7 @@ int main(int argc, char **argv){
...
@@ -2882,7 +2875,7 @@ int main(int argc, char **argv){
waveconv_rho
=
joint_inversion_grad
(
waveconv_rho
,
waveconv_rho_z
,
JOINT_INVERSION_PSV_SH_ALPHA_RHO
,
JOINT_INVERSION_PSV_SH_TYPE
);
waveconv_rho
=
joint_inversion_grad
(
waveconv_rho
,
waveconv_rho_z
,
JOINT_INVERSION_PSV_SH_ALPHA_RHO
,
JOINT_INVERSION_PSV_SH_TYPE
);
/* Output joint gradient to disk */
/* Output joint gradient to disk */
sprintf
(
jac
,
"%s_joint_
u
_it%i"
,
JACOBIAN
,
iter
);
sprintf
(
jac
,
"%s_joint_
vs
_it%i"
,
JACOBIAN
,
iter
);
write_matrix_disk
(
waveconv_u
,
jac
);
write_matrix_disk
(
waveconv_u
,
jac
);
/* Output joint gradient to disk */
/* Output joint gradient to disk */
...
@@ -3172,7 +3165,7 @@ int main(int argc, char **argv){
...
@@ -3172,7 +3165,7 @@ int main(int argc, char **argv){
MPI_Barrier
(
MPI_COMM_WORLD
);
MPI_Barrier
(
MPI_COMM_WORLD
);
if
(
!
ACOUSTIC
)
av_mue
(
punp1
,
puipjp
,
p
uip
,
pujp
,
p
rhonp1
);
if
(
!
ACOUSTIC
)
av_mue
(
punp1
,
puipjp
,
prhonp1
);
av_rho
(
prhonp1
,
prip
,
prjp
);
av_rho
(
prhonp1
,
prip
,
prjp
);
/* Preparing memory variables for update_s (viscoelastic) */
/* Preparing memory variables for update_s (viscoelastic) */
...
@@ -3343,7 +3336,7 @@ int main(int argc, char **argv){
...
@@ -3343,7 +3336,7 @@ int main(int argc, char **argv){
}
}
}
}
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
update_s_visc_PML_SH
(
1
,
NX
,
1
,
NY
,
pvz
,
psxz
,
psyz
,
pt
,
po
,
puip
,
pujp
,
tausip
,
tausjp
,
bip
,
bjm
,
cip
,
cjm
,
etajm
,
etaip
,
hc
,
infoout
,
K_x
,
a_x
,
b_x
,
K_x_half
,
a_x_half
,
b_x_half
,
K_y
,
a_y
,
b_y
,
K_y_half
,
a_y_half
,
b_y_half
,
psi_vzx
,
psi_vzy
);
update_s_visc_PML_SH
(
1
,
NX
,
1
,
NY
,
pvz
,
psxz
,
psyz
,
pt
,
po
,
bip
,
bjm
,
cip
,
cjm
,
d
,
dip
,
fipjp
,
f
,
hc
,
infoout
,
K_x
,
a_x
,
b_x
,
K_x_half
,
a_x_half
,
b_x_half
,
K_y
,
a_y
,
b_y
,
K_y_half
,
a_y_half
,
b_y_half
,
psi_vzx
,
psi_vzy
);
}
}
}
else
{
/* elastic */
}
else
{
/* elastic */
if
(
!
ACOUSTIC
){
if
(
!
ACOUSTIC
){
...
@@ -3373,7 +3366,7 @@ int main(int argc, char **argv){
...
@@ -3373,7 +3366,7 @@ int main(int argc, char **argv){
if
(
!
ACOUSTIC
){
if
(
!
ACOUSTIC
){
if
(
L
){
if
(
L
){
/* viscoelastic */
/* viscoelastic */
surface_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
pp
,
pq
,
ppinp1
,
punp1
,
prhonp1
,
ptaup
,
ptaus
,
etajm
,
peta
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
);
surface_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
pp
,
pq
,
ppinp1
,
punp1
,
prhonp1
,
ptaup
,
ptaus
,
etajm
,
peta
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
,
uyz
,
psxz
,
uxz
);
}
else
{
}
else
{
/* elastic */
/* elastic */
surface_elastic_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
ppinp1
,
punp1
,
prhonp1
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
,
uyz
,
psxz
,
uxz
);
surface_elastic_PML
(
1
,
pvx
,
pvy
,
psxx
,
psyy
,
psxy
,
psyz
,
ppinp1
,
punp1
,
prhonp1
,
hc
,
K_x
,
a_x
,
b_x
,
psi_vxxs
,
ux
,
uy
,
uxy
,
uyz
,
psxz
,
uxz
);
...
@@ -4251,15 +4244,9 @@ int main(int argc, char **argv){
...
@@ -4251,15 +4244,9 @@ int main(int argc, char **argv){
free_matrix
(
gradp_u_z
,
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
free_matrix
(
gradp_u_z
,
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
free_matrix
(
gradp_rho_z
,
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
free_matrix
(
gradp_rho_z
,
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
if
(
L
){
if
(
L
){
free_matrix
(
tausip
,
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
free_matrix
(
tausjp
,
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
free_f3tensor
(
pt
,
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
,
1
,
L
);
free_f3tensor
(
pt
,
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
,
1
,
L
);
free_f3tensor
(
po
,
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
,
1
,
L
);
free_f3tensor
(
po
,
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
,
1
,
L
);
}
}
if
(
!
ACOUSTIC
){
free_matrix
(
puip
,
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
free_matrix
(
pujp
,
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
}
}
}