-
Notifications
You must be signed in to change notification settings - Fork 0
/
adding_abs_val.f90
68 lines (61 loc) · 2.12 KB
/
adding_abs_val.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
subroutine adding_abs_val(vp_f0,dens,tau11_eps,tau_sigma,&
nx,nz,nrel,npoints_pml)
implicit none
integer::nx,nz,nrel,npoints_pml
integer::i,j,l
real,dimension(1:nx,1:nz)::vp_f0,dens
real,dimension(1:nrel,1:nx,1:nz)::tau11_eps,tau_sigma
do i=npoints_pml+1,nx-npoints_pml
do j=1,npoints_pml
!! top
vp_f0(i,j)=vp_f0(i,npoints_pml+1)
dens(i,j)=dens(i,npoints_pml+1)
enddo
do j=nz-npoints_pml+1,nz
!! bottom
vp_f0(i,j)=vp_f0(i,nz-npoints_pml)
dens(i,j)=dens(i,nz-npoints_pml)
enddo
enddo
do j=1,nz
do i=1,npoints_pml
!! left
vp_f0(i,j)=vp_f0(npoints_pml+1,j)
dens(i,j)=dens(npoints_pml+1,j)
enddo
do i=nx-npoints_pml+1,nx
!! right
vp_f0(i,j)=vp_f0(nx-npoints_pml,j)
dens(i,j)=dens(nx-npoints_pml,j)
enddo
enddo
!! for tau11_eps,tau_sigma
do l=1,nrel
do i=npoints_pml+1,nx-npoints_pml
do j=1,npoints_pml
!! top
tau11_eps(l,i,j)=tau11_eps(l,i,npoints_pml+1)
tau_sigma(l,i,j)=tau_sigma(l,i,npoints_pml+1)
enddo
do j=nz-npoints_pml+1,nz
!! bottom
tau11_eps(l,i,j)=tau11_eps(l,i,nz-npoints_pml)
tau_sigma(l,i,j)=tau_sigma(l,i,nz-npoints_pml)
enddo
enddo
enddo
do l=1,nrel
do j=1,nz
do i=1,npoints_pml
!! left
tau11_eps(l,i,j)=tau11_eps(l,npoints_pml+1,j)
tau_sigma(l,i,j)=tau_sigma(l,npoints_pml+1,j)
enddo
do i=nx-npoints_pml+1,nx
!! right
tau11_eps(l,i,j)=tau11_eps(l,nx-npoints_pml,j)
tau_sigma(l,i,j)=tau_sigma(l,nx-npoints_pml,j)
enddo
enddo
enddo
end subroutine adding_abs_val