-
Notifications
You must be signed in to change notification settings - Fork 1
/
uncomms.f90
58 lines (57 loc) · 2.2 KB
/
uncomms.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
module comms
use params
implicit none
contains
!***********************************************************************
! Update boundary terms
!***********************************************************************
pure subroutine update_halo_4(size4, Array)
!
integer, intent(in) :: size4
complex(dp), intent(inout) :: Array(0:ksizex_l + 1, 0:ksizey_l + 1, 0:ksizet_l + 1, size4)
!
Array(0, :, :, :) = Array(ksizex_l, :, :, :)
Array(ksizex_l + 1, :, :, :) = Array(1, :, :, :)
Array(:, 0, :, :) = Array(:, ksizey_l, :, :)
Array(:, ksizey_l + 1, :, :) = Array(:, 1, :, :)
Array(:, :, 0, :) = Array(:, :, ksizet_l, :)
Array(:, :, ksizet_l + 1, :) = Array(:, :, 1, :)
!
return
!
end subroutine update_halo_4
!***********************************************************************
pure subroutine update_halo_4_real(size4, Array)
!
integer, intent(in) :: size4
real, intent(inout) :: Array(0:ksizex_l + 1, 0:ksizey_l + 1, 0:ksizet_l + 1, size4)
!
Array(0, :, :, :) = Array(ksizex_l, :, :, :)
Array(ksizex_l + 1, :, :, :) = Array(1, :, :, :)
Array(:, 0, :, :) = Array(:, ksizey_l, :, :)
Array(:, ksizey_l + 1, :, :) = Array(:, 1, :, :)
Array(:, :, 0, :) = Array(:, :, ksizet_l, :)
Array(:, :, ksizet_l + 1, :) = Array(:, :, 1, :)
!
return
!
end subroutine update_halo_4_real
!***********************************************************************
!***********************************************************************
pure subroutine update_halo_6(size5, size6, Array)
!
integer, intent(in) :: size5, size6
complex(dp), intent(inout) :: Array(kthird, 0:ksizex_l + 1, 0:ksizey_l + 1, &
& 0:ksizet_l + 1, size5, size6)
!
Array(:, 0, :, :, :, :) = Array(:, ksizex_l, :, :, :, :)
Array(:, ksizex_l + 1, :, :, :, :) = Array(:, 1, :, :, :, :)
Array(:, :, 0, :, :, :) = Array(:, :, ksizey_l, :, :, :)
Array(:, :, ksizey_l + 1, :, :, :) = Array(:, :, 1, :, :, :)
Array(:, :, :, 0, :, :) = Array(:, :, :, ksizet_l, :, :)
Array(:, :, :, ksizet_l + 1, :, :) = Array(:, :, :, 1, :, :)
!
return
!
end subroutine update_halo_6
end module comms