-
Notifications
You must be signed in to change notification settings - Fork 3
/
data.f90
103 lines (79 loc) · 3.62 KB
/
data.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
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
101
102
103
!Crown Copyright 2014 AWE.
!
! This file is part of TeaLeaf.
!
! TeaLeaf is free software: you can redistribute it and/or modify it under
! the terms of the GNU General Public License as published by the
! Free Software Foundation, either version 3 of the License, or (at your option)
! any later version.
!
! TeaLeaf is distributed in the hope that it will be useful, but
! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
! FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
! details.
!
! You should have received a copy of the GNU General Public License along with
! TeaLeaf. If not, see http://www.gnu.org/licenses/.
!> @brief Holds parameters definitions
!> @author David Beckingsale, Wayne Gaudin
!> @details Parameters used in the TeaLeaf are defined here.
MODULE data_module
IMPLICIT NONE
REAL(KIND=8), PARAMETER :: g_version=1.4
INTEGER, PARAMETER :: g_ibig=640000
REAL(KIND=8), PARAMETER :: g_small=1.0e-16 &
,g_big =1.0e+21
INTEGER, PARAMETER :: g_name_len_max=255 &
,g_xdir=1 &
,g_ydir=2
! These two need to be kept consistent with update_halo
INTEGER, PARAMETER :: CHUNK_LEFT =1 &
,CHUNK_RIGHT =2 &
,CHUNK_BOTTOM =3 &
,CHUNK_TOP =4 &
,EXTERNAL_FACE=-1
INTEGER, PARAMETER :: FIELD_DENSITY = 1 &
,FIELD_ENERGY0 = 2 &
,FIELD_ENERGY1 = 3 &
,FIELD_U = 4 &
,FIELD_P = 5 &
,FIELD_SD = 6 &
,FIELD_R = 7 &
,NUM_FIELDS = 7
INTEGER, PARAMETER :: CELL_DATA = 1, &
VERTEX_DATA = 2, &
X_FACE_DATA = 3, &
y_FACE_DATA = 4
! Time step control constants
INTEGER, PARAMETER :: FIXED = 1
INTEGER, PARAMETER :: g_rect=1 &
,g_circ=2 &
,g_point=3
INTEGER :: g_in & ! File for input data.
,g_out
INTEGER :: CONDUCTIVITY = 1 &
,RECIP_CONDUCTIVITY = 2
! 3 different options for preconditioners
INTEGER,PARAMETER:: TL_PREC_NONE = 1 &
,TL_PREC_JAC_DIAG = 2 &
,TL_PREC_JAC_BLOCK = 3
TYPE parallel_type
LOGICAL :: boss
INTEGER :: max_task &
,boss_task &
,task
END TYPE parallel_type
TYPE(parallel_type) :: parallel
INTEGER, PARAMETER ::g_len_max=500
! Hardcoded in OpenCL (and CUDA) version
INTEGER, PARAMETER ::tiles_per_task=1
! cartesian communicator
INTEGER ::mpi_cart_comm
! dimensions of mpi grid
INTEGER, dimension(2) ::mpi_dims
! this rank's coordinates
INTEGER, dimension(2) ::mpi_coords
! depth of halo for matrix powers
INTEGER :: halo_exchange_depth
INTEGER ::lr_pack_buffer_size,bt_pack_buffer_size
END MODULE data_module