-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal_data_module.f95
102 lines (85 loc) · 2.54 KB
/
global_data_module.f95
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
module global_data
integer, parameter :: MAX_NEIGHBORS = 10
integer, parameter :: MAX_DOMAIN_NEIGHBORS = 10
integer, parameter :: MAX_BOUNDARY_SIZE = 20
type global_type
integer :: id
integer :: NE, NP
real(8), allocatable, dimension(:) :: X
real(8), allocatable, dimension(:) :: Y
real(8), allocatable, dimension(:) :: DP
integer, allocatable, dimension(:) :: NNEIGH
integer, allocatable, dimension(:,:) :: NEIGH
INTEGER, allocatable, dimension(:,:) :: NM
integer, allocatable, dimension(:) :: ALIVE
integer, allocatable, dimension(:) :: NEW_ALIVE
! IO stuff
CHARACTER*6 :: DIRNAME
INTEGER :: unit18
INTEGER :: unit14
! message passing stuff
INTEGER :: NEIGHPROC
logical, allocatable :: resnode(:)
INTEGER, ALLOCATABLE :: NNODRECV(:),IRECVLOC(:,:)
INTEGER, ALLOCATABLE :: IPROC(:), NNODELOC(:)
INTEGER, ALLOCATABLE :: NNODSEND(:), IBELONGTO(:),ISENDLOC(:,:)
INTEGER, ALLOCATABLE :: ISENDBUF(:,:), IRECVBUF(:,:)
INTEGER, ALLOCATABLE :: INDX(:)
end type global_type
end module global_data
module global
use global_data
interface
subroutine init(id, g)
use global_data
integer :: id
type(global_type), pointer :: g
end subroutine
end interface
interface
subroutine print(g, timestep)
use global_data
type(global_type), pointer :: g
integer :: timestep
end subroutine
end interface
interface
subroutine update(timestep, g)
use global_data
type(global_type), pointer :: g
integer :: timestep
end subroutine
end interface
interface
subroutine term(g)
use global_data
type(global_type), pointer :: g
end subroutine
end interface
interface
subroutine get_neighbors(numneighbors,neighbors,g)
use global_data
type(global_type), pointer :: g
integer :: numneighbors
integer :: neighbors(MAX_DOMAIN_NEIGHBORS)
end subroutine
end interface
interface
subroutine get_outgoing_nodes(g,neighbor,num_nodes,alives)
use global_data
type(global_type), pointer :: g
integer :: neighbor
integer, intent(out) :: num_nodes
integer :: alives(MAX_BOUNDARY_SIZE)
end subroutine
end interface
interface
subroutine put_incoming_nodes(g,neighbor,num_nodes,alives)
use global_data
type(global_type), pointer :: g
integer :: neighbor
integer :: num_nodes
integer :: alives(MAX_BOUNDARY_SIZE)
end subroutine
end interface
end module global