Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GPIAG-Software
IFOS2D
Commits
37dc3095
Commit
37dc3095
authored
Dec 08, 2015
by
Florian Wittkamp
Browse files
SH: Viscoelastic modelling and free surface
Updated SH viscoelastic modelling to the new grid.
parent
09f6740a
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
src/av_mue.c
View file @
37dc3095
...
...
@@ -19,9 +19,9 @@
#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
;
float
u1
,
u2
,
u3
,
u4
;
...
...
@@ -31,17 +31,9 @@ void av_mue(float ** u, float ** uipjp, float ** uip, float ** ujp, float ** rho
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
]));
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
)){
uipjp
[
j
][
i
]
=
0
.
0
;
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
uip
[
j
][
i
]
=
0
.
0
;
ujp
[
j
][
i
]
=
0
.
0
;
}
}
...
...
@@ -61,18 +53,9 @@ 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
];
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
)){
uipjp
[
j
][
i
]
=
0
.
0
;
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
uip
[
j
][
i
]
=
0
.
0
;
ujp
[
j
][
i
]
=
0
.
0
;
}
}
}
}
...
...
src/av_tau.c
View file @
37dc3095
...
...
@@ -20,18 +20,14 @@
#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
;
for
(
j
=
1
;
j
<=
NY
;
j
++
){
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
]);
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/denise.c
View file @
37dc3095
...
...
@@ -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
**
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
**
puip
,
**
pujp
;
float
***
forward_prop_z_xz
,
***
forward_prop_z_yz
,
***
forward_prop_rho_z
,
**
waveconv_mu_z
;
float
**
uxz
,
**
uyz
;
...
...
@@ -93,7 +92,7 @@ int main(int argc, char **argv){
/* 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
*
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 */
int
step1
,
step2
,
step3
=
0
,
itests
,
iteste
,
stepmax
,
countstep
;
...
...
@@ -472,10 +471,6 @@ int main(int argc, char **argv){
pu
=
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
);
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
);
...
...
@@ -507,8 +502,6 @@ int main(int argc, char **argv){
ptaus
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
ptausipjp
=
matrix
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
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
);
po
=
f3tensor
(
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
,
1
,
L
);
}
...
...
@@ -1033,9 +1026,9 @@ int main(int argc, char **argv){
/* end of MPI split for processors with ntr>0 */
if
(
!
ACOUSTIC
)
av_mue
(
pu
,
puipjp
,
puip
,
pujp
,
prho
);
if
(
!
ACOUSTIC
)
av_mue
(
pu
,
puipjp
,
prho
);
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) */
...
...
@@ -1295,7 +1288,7 @@ int main(int argc, char **argv){
if
(
!
ACOUSTIC
){
if
(
L
){
/* 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
{
/* 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
);
...
...
@@ -1753,7 +1746,7 @@ int main(int argc, char **argv){
}
}
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 */
if
(
WAVETYPE
==
1
||
WAVETYPE
==
3
)
{
...
...
@@ -1779,7 +1772,7 @@ int main(int argc, char **argv){
if
(
!
ACOUSTIC
){
if
(
L
){
/* 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
{
/* 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
);
...
...
@@ -2243,7 +2236,7 @@ int main(int argc, char **argv){
}
}
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 */
...
...
@@ -2268,7 +2261,7 @@ int main(int argc, char **argv){
if
(
!
ACOUSTIC
){
if
(
L
){
/* 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
{
/* 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
);
...
...
@@ -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
);
/* 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
);
/* Output joint gradient to disk */
...
...
@@ -3172,7 +3165,7 @@ int main(int argc, char **argv){
MPI_Barrier
(
MPI_COMM_WORLD
);
if
(
!
ACOUSTIC
)
av_mue
(
punp1
,
puipjp
,
puip
,
pujp
,
prhonp1
);
if
(
!
ACOUSTIC
)
av_mue
(
punp1
,
puipjp
,
prhonp1
);
av_rho
(
prhonp1
,
prip
,
prjp
);
/* Preparing memory variables for update_s (viscoelastic) */
...
...
@@ -3343,7 +3336,7 @@ int main(int argc, char **argv){
}
}
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 */
if
(
!
ACOUSTIC
){
...
...
@@ -3373,7 +3366,7 @@ int main(int argc, char **argv){
if
(
!
ACOUSTIC
){
if
(
L
){
/* 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
{
/* 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
);
...
...
@@ -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_rho_z
,
-
nd
+
1
,
NY
+
nd
,
-
nd
+
1
,
NX
+
nd
);
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
(
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
);
}
}
...
...
src/fd.h
View file @
37dc3095
...
...
@@ -53,11 +53,11 @@ float norm(float ** waveconv, int iter, int sws);
void
av_mat
(
float
**
pi
,
float
**
u
,
float
**
ppijm
,
float
**
puip
,
float
**
pujm
);
void
av_mue
(
float
**
u
,
float
**
uipjp
,
float
**
uip
,
float
**
ujp
,
float
**
rho
);
void
av_mue
(
float
**
u
,
float
**
uipjp
,
float
**
rho
);
void
av_rho
(
float
**
rho
,
float
**
rip
,
float
**
rjp
);
void
av_tau
(
float
**
taus
,
float
**
tausipjp
,
float
**
tausip
,
float
**
tausjp
);
void
av_tau
(
float
**
taus
,
float
**
tausipjp
);
float
median2d
(
float
**
mat
,
int
ny
,
int
nx
);
...
...
@@ -283,10 +283,9 @@ void surface(int ndepth, float ** pvx, float ** pvy,
void
surface_elastic
(
int
ndepth
,
float
**
vx
,
float
**
vy
,
float
**
sxx
,
float
**
syy
,
float
**
sxy
,
float
**
pi
,
float
**
u
,
float
**
rho
,
float
*
hc
);
void
surface_elastic_PML
(
int
ndepth
,
float
**
vx
,
float
**
vy
,
float
**
sxx
,
float
**
syy
,
float
**
sxy
,
float
**
syz
,
float
**
pi
,
float
**
u
,
float
**
rho
,
float
*
hc
,
float
*
K_x
,
float
*
a_x
,
float
*
b_x
,
float
**
psi_vxx
,
float
**
ux
,
float
**
uy
,
float
**
uxy
,
float
**
uyz
,
float
**
sxz
,
float
**
uxz
);
void
surface_elastic_PML
(
int
ndepth
,
float
**
vx
,
float
**
vy
,
float
**
sxx
,
float
**
syy
,
float
**
sxy
,
float
**
syz
,
float
**
pi
,
float
**
u
,
float
**
rho
,
float
*
hc
,
float
*
K_x
,
float
*
a_x
,
float
*
b_x
,
float
**
psi_vxx
,
float
**
ux
,
float
**
uy
,
float
**
uxy
,
float
**
uyz
,
float
**
sxz
,
float
**
uxz
);
void
surface_PML
(
int
ndepth
,
float
**
vx
,
float
**
vy
,
float
**
sxx
,
float
**
syy
,
float
**
sxy
,
float
**
syz
,
float
***
p
,
float
***
q
,
float
**
ppi
,
float
**
pu
,
float
**
prho
,
float
**
ptaup
,
float
**
ptaus
,
float
*
etajm
,
float
*
peta
,
float
*
hc
,
float
*
K_x
,
float
*
a_x
,
float
*
b_x
,
float
**
psi_vxx
,
float
**
ux
,
float
**
uy
,
float
**
uxy
);
void
surface_PML
(
int
ndepth
,
float
**
vx
,
float
**
vy
,
float
**
sxx
,
float
**
syy
,
float
**
sxy
,
float
**
syz
,
float
***
p
,
float
***
q
,
float
**
ppi
,
float
**
pu
,
float
**
prho
,
float
**
ptaup
,
float
**
ptaus
,
float
*
etajm
,
float
*
peta
,
float
*
hc
,
float
*
K_x
,
float
*
a_x
,
float
*
b_x
,
float
**
psi_vxx
,
float
**
ux
,
float
**
uy
,
float
**
uxy
,
float
**
uyz
,
float
**
sxz
,
float
**
uxz
);
void
timedomain_filt
(
float
**
data
,
float
fc
,
int
order
,
int
ntr
,
int
ns
,
int
method
);
void
timedomain_filt_vector
(
float
*
data
,
float
fc
,
int
order
,
int
ntr
,
int
ns
,
int
method
);
...
...
@@ -313,8 +312,7 @@ void update_s_visc_hc(int nx1, int nx2, int ny1, int ny2,
void
update_s_elastic_PML_SH
(
int
nx1
,
int
nx2
,
int
ny1
,
int
ny2
,
float
**
vz
,
float
**
sxz
,
float
**
syz
,
float
**
uxz
,
float
**
uyz
,
float
*
hc
,
int
infoout
,
float
*
K_x
,
float
*
a_x
,
float
*
b_x
,
float
*
K_x_half
,
float
*
a_x_half
,
float
*
b_x_half
,
float
*
K_y
,
float
*
a_y
,
float
*
b_y
,
float
*
K_y_half
,
float
*
a_y_half
,
float
*
b_y_half
,
float
**
psi_vzx
,
float
**
psi_vzy
,
float
**
uipjp
,
float
**
u
,
float
**
rho
);
void
update_s_visc_PML_SH
(
int
nx1
,
int
nx2
,
int
ny1
,
int
ny2
,
float
**
vz
,
float
**
sxz
,
float
**
syz
,
float
***
t
,
float
***
o
,
float
**
uip
,
float
**
ujp
,
float
**
tausip
,
float
**
tausjp
,
float
*
bip
,
float
*
bjm
,
float
*
cip
,
float
*
cjm
,
float
*
etajm
,
float
*
etaip
,
float
*
hc
,
int
infoout
,
float
*
K_x
,
float
*
a_x
,
float
*
b_x
,
float
*
K_x_half
,
float
*
a_x_half
,
float
*
b_x_half
,
float
*
K_y
,
float
*
a_y
,
float
*
b_y
,
float
*
K_y_half
,
float
*
a_y_half
,
float
*
b_y_half
,
float
**
psi_vzx
,
float
**
psi_vzy
);
void
update_s_visc_PML_SH
(
int
nx1
,
int
nx2
,
int
ny1
,
int
ny2
,
float
**
vz
,
float
**
sxz
,
float
**
syz
,
float
***
t
,
float
***
o
,
float
*
bip
,
float
*
bjm
,
float
*
cip
,
float
*
cjm
,
float
***
d
,
float
***
dip
,
float
**
fipjp
,
float
**
f
,
float
*
hc
,
int
infoout
,
float
*
K_x
,
float
*
a_x
,
float
*
b_x
,
float
*
K_x_half
,
float
*
a_x_half
,
float
*
b_x_half
,
float
*
K_y
,
float
*
a_y
,
float
*
b_y
,
float
*
K_y_half
,
float
*
a_y_half
,
float
*
b_y_half
,
float
**
psi_vzx
,
float
**
psi_vzy
);
void
update_s_rsg
(
int
nx1
,
int
nx2
,
int
ny1
,
int
ny2
,
float
**
pvx
,
float
**
pvy
,
float
**
psxx
,
float
**
psyy
,
...
...
src/surface_PML.c
View file @
37dc3095
...
...
@@ -27,7 +27,7 @@
void
surface_PML
(
int
ndepth
,
float
**
vx
,
float
**
vy
,
float
**
sxx
,
float
**
syy
,
float
**
sxy
,
float
**
syz
,
float
***
p
,
float
***
q
,
float
**
ppi
,
float
**
pu
,
float
**
prho
,
float
**
ptaup
,
float
**
ptaus
,
float
*
etajm
,
float
*
peta
,
float
*
hc
,
float
*
K_x
,
float
*
a_x
,
float
*
b_x
,
float
**
psi_vxx
,
float
**
ux
,
float
**
uy
,
float
**
uxy
){
float
**
ux
,
float
**
uy
,
float
**
uxy
,
float
**
uyz
,
float
**
sxz
,
float
**
uxz
){
int
i
,
j
,
m
,
h
,
h1
,
l
;
...
...
@@ -162,10 +162,15 @@ void surface_PML(int ndepth, float ** vx, float ** vy, float ** sxx, float ** sy
}
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
){
for
(
i
=
1
;
i
<=
NX
;
i
++
){
for
(
m
=
0
;
m
<=
fdoh
-
1
;
m
++
)
{
/* mirroring of stress components for syz
to make a stress free surface in depth y=jsurf*h */
syz
[
j
-
m
][
i
]
=-
syz
[
j
+
m
+
1
][
i
];
syz
[
j
][
i
]
=
0
.
0
;
uyz
[
j
][
i
]
=
0
.
0
;
for
(
m
=
1
;
m
<=
fdoh
;
m
++
)
{
syz
[
j
-
m
][
i
]
=-
syz
[
j
+
m
][
i
];
sxz
[
j
-
m
][
i
]
=-
sxz
[
j
+
m
-
1
][
i
];
uyz
[
j
-
m
][
i
]
=-
uyz
[
j
+
m
][
i
];
uxz
[
j
-
m
][
i
]
=-
uxz
[
j
+
m
-
1
][
i
];
}
}
}
...
...
src/update_s_visc_PML.c
View file @
37dc3095
...
...
@@ -16,7 +16,6 @@
* along with DENISE. See file COPYING and/or <http://www.gnu.org/licenses/gpl-2.0.html>.
-----------------------------------------------------------------------------------------*/
/* $Id: update_s_visc_PML.c,v 1.1.1.1 2011/10/06 22:44:52 groos Exp $*/
/*------------------------------------------------------------------------
* updating stress components at gridpoints [nx1...nx2][ny1...ny2]
* by a staggered grid finite difference scheme of arbitrary (FDORDER) order accuracy in space
...
...
src/update_s_visc_PML_SH.c
View file @
37dc3095
This diff is collapsed.
Click to expand it.
src/update_v_PML_SH.c
View file @
37dc3095
/*-----------------------------------------------------------------------------------------
* Copyright (C) 201
3
For the list of authors, see file AUTHORS.
* Copyright (C) 201
5
For the list of authors, see file AUTHORS.
*
* This file is part of DENISE.
*
...
...
@@ -16,13 +16,11 @@
* along with DENISE. See file COPYING and/or <http://www.gnu.org/licenses/gpl-2.0.html>.
-----------------------------------------------------------------------------------------*/
/* $Id: update_v_ssg.c,v 1.1.1.1 2007/11/21 22:44:52 koehn Exp $*/
/*------------------------------------------------------------------------
* updating particle velocities at gridpoints [nx1...nx2][ny1...ny2]
* by a staggered grid finite difference scheme of FDORDER accuracy in space
* and second order accuracy in time
* T. Bohlen
*
* SH-Version F. Wittkamp
* ----------------------------------------------------------------------*/
#include "fd.h"
...
...
@@ -34,8 +32,8 @@ void update_v_PML_SH(int nx1, int nx2, int ny1, int ny2, int nt,
float
*
hc
,
int
infoout
,
int
sw
,
float
*
K_x
,
float
*
a_x
,
float
*
b_x
,
float
*
K_x_half
,
float
*
a_x_half
,
float
*
b_x_half
,
float
*
K_y
,
float
*
a_y
,
float
*
b_y
,
float
*
K_y_half
,
float
*
a_y_half
,
float
*
b_y_half
,
float
**
psi_sxz_x
,
float
**
psi_syz_y
){
int
i
,
j
,
l
,
fdoh
,
m
,
h
,
h1
;
float
amp
,
dtdh
,
azi_rad
;
int
i
,
j
,
l
,
fdoh
,
h
,
h1
;
float
dtdh
;
float
sxz_x
,
syz_y
;
extern
float
DT
,
DH
;
double
time1
,
time2
;
...
...
@@ -46,13 +44,9 @@ void update_v_PML_SH(int nx1, int nx2, int ny1, int ny2, int nt,
extern
FILE
*
FP
;
extern
int
VELOCITY
;
fdoh
=
FDORDER
/
2
;
dtdh
=
DT
*
DT
/
DH
;
/* drad = PI/180.0;
angle = 135.0; */
if
(
infoout
&&
(
MYID
==
0
)){
time1
=
MPI_Wtime
();
fprintf
(
FP
,
"
\n
**Message from update_v_SH (printed by PE %d):
\n
"
,
MYID
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment