Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GPIAG-Software
IFOS2D
Commits
f85ec539
Commit
f85ec539
authored
Dec 03, 2015
by
Florian Wittkamp
Browse files
CLEANUP: Free surface and small Bugfix
parent
5944d0e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/denise.c
View file @
f85ec539
...
...
@@ -1042,6 +1042,7 @@ int main(int argc, char **argv){
}
}
/* Do some initia calculations */
if
(
iter
==
1
){
/* Calculationg material parameters according to INVMAT1 */
...
...
@@ -1276,14 +1277,18 @@ int main(int argc, char **argv){
if
((
QUELLTYP
==
1
))
psource
(
nt
,
psxx
,
psyy
,
psp
,
srcpos_loc
,
signals
,
nsrc_loc
,
0
);
/* Applying free surface condition */
if
((
FREE_SURF
)
&&
(
POS
[
2
]
==
0
)){
if
(
!
ACOUSTIC
){
if
(
L
){
/* viscoelastic */
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
);
}
else
{
/* elastic */
}
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
);
}
}
else
{
/* viscoelastic and elastic ACOUSTIC */
}
else
{
/* viscoelastic and elastic ACOUSTIC */
surface_acoustic_PML
(
1
,
psp
);
}
}
...
...
@@ -1757,22 +1762,19 @@ int main(int argc, char **argv){
if
((
QUELLTYP
==
1
)
&&
(
WAVETYPE
==
1
||
WAVETYPE
==
3
))
psource
(
nt
,
psxx
,
psyy
,
psp
,
srcpos_loc
,
signals
,
nsrc_loc
,
0
);
/*
a
pply free surface */
/*
A
pply
ing
free surface
condition
*/
if
((
FREE_SURF
)
&&
(
POS
[
2
]
==
0
)){
if
(
L
)
{
/* viscoelastic */
if
(
!
ACOUSTIC
)
{
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
);
}
else
{
surface_acoustic_PML
(
1
,
psp
);
}
}
else
{
/* elastic */
if
(
!
ACOUSTIC
)
{
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
);
}
else
{
surface_acoustic_PML
(
1
,
psp
);
/* 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
);
}
}
else
{
/* viscoelastic and elastic ACOUSTIC */
surface_acoustic_PML
(
1
,
psp
);
}
}
...
...
@@ -2232,23 +2234,19 @@ int main(int argc, char **argv){
if
((
QUELLTYPB
==
4
))
psource
(
nt
,
psxx
,
psyy
,
psp
,
srcpos_loc_back
,
sectionpdiff
,
ntr1
,
1
);
/* Applying free surface condition */
if
((
FREE_SURF
)
&&
(
POS
[
2
]
==
0
)){
if
(
L
)
{
/* viscoelastic */
if
(
!
ACOUSTIC
)
{
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
);
}
else
{
/* acoustic */
surface_acoustic_PML
(
1
,
psp
);
}
}
else
{
/* elastic */
if
(
!
ACOUSTIC
){
/* 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
);
}
else
{
/* acoustic */
surface_acoustic_PML
(
1
,
psp
);
}
}
else
{
/* viscoelastic and elastic ACOUSTIC */
surface_acoustic_PML
(
1
,
psp
);
}
}
...
...
@@ -3313,19 +3311,20 @@ int main(int argc, char **argv){
if
((
QUELLTYP
==
1
))
psource
(
nt
,
psxx
,
psyy
,
psp
,
srcpos_loc
,
signals
,
nsrc_loc
,
0
);
/* Applying free surface condition */
if
((
FREE_SURF
)
&&
(
POS
[
2
]
==
0
)){
if
(
L
)
/* viscoelastic */
if
(
!
ACOUSTIC
){
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
);
}
else
{
surface_acoustic_PML
(
1
,
psp
);
}
else
{
if
(
!
ACOUSTIC
)
/* 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
);
else
surface_acoustic_PML
(
1
,
psp
);
/* 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
);
}
}
else
{
/* viscoelastic and elastic ACOUSTIC */
surface_acoustic_PML
(
1
,
psp
);
}
}
/* stress exchange between PEs */
...
...
src/matcopy_acoustic.c
View file @
f85ec539
...
...
@@ -32,7 +32,7 @@ void matcopy_acoustic(float ** rho, float ** pi){
extern
int
MYID
,
NX
,
NY
,
INDEX
[
5
];
extern
const
int
TAG1
,
TAG2
,
TAG5
,
TAG6
;
extern
FILE
*
FP
;
extern
int
VERBOSE
;
MPI_Status
status
;
double
time1
,
time2
;
...
...
@@ -46,8 +46,8 @@ void matcopy_acoustic(float ** rho, float ** pi){
bufferbot_to_top_1
=
matrix
(
0
,
NX
+
1
,
1
,
2
);
fprintf
(
FP
,
"
\n\n
**Message from matcopy (written by PE %d):"
,
MYID
);
fprintf
(
FP
,
"
\n
Copy material properties at inner boundaries ...
\n
"
);
if
(
VERBOSE
)
fprintf
(
FP
,
"
\n\n
**Message from matcopy (written by PE %d):"
,
MYID
);
if
(
VERBOSE
)
fprintf
(
FP
,
"
\n
Copy material properties at inner boundaries ...
\n
"
);
time1
=
MPI_Wtime
();
...
...
@@ -131,7 +131,7 @@ void matcopy_acoustic(float ** rho, float ** pi){
}
if
(
MYID
==
0
){
if
(
MYID
==
0
&&
VERBOSE
){
time2
=
MPI_Wtime
();
fprintf
(
FP
,
" finished (real time: %4.2f s).
\n
"
,
time2
-
time1
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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