This repository has been archived by the owner on Jul 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcommon_types.f90
98 lines (85 loc) · 2.73 KB
/
common_types.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
module common_types
implicit none
type :: kxkyz_layout_type
sequence
integer :: iproc
integer :: nzgrid, nzed, ntubes, naky, nakx, nvgrid, nvpa, nmu, nspec
integer :: llim_world, ulim_world, llim_proc, ulim_proc, ulim_alloc, blocksize
end type kxkyz_layout_type
type :: kxyz_layout_type
sequence
integer :: iproc
integer :: nzgrid, nzed, ntubes, ny, naky, nakx, nvgrid, nvpa, nmu, nspec
integer :: llim_world, ulim_world, llim_proc, ulim_proc, ulim_alloc, blocksize
end type kxyz_layout_type
type :: xyz_layout_type
sequence
integer :: iproc
integer :: nzgrid, nzed, ntubes, ny, naky, nx, nakx, nvgrid, nvpa, nmu, nspec
integer :: llim_world, ulim_world, llim_proc, ulim_proc, ulim_alloc, blocksize
end type xyz_layout_type
type :: vmu_layout_type
sequence
logical :: xyz
integer :: iproc
integer :: nzgrid, nzed, ntubes, nalpha, ny, naky, nx, nakx, nvgrid, nvpa, nmu, nspec
integer :: llim_world, ulim_world, llim_proc, ulim_proc, ulim_alloc, blocksize
end type vmu_layout_type
type :: flux_surface_type
real :: rmaj
real :: rgeo
real :: kappa
real :: kapprim
real :: tri
real :: triprim
real :: rhoc
real :: dr
real :: shift
real :: qinp
real :: shat
real :: betaprim
real :: betadbprim
real :: d2qdr2
real :: d2psidr2
real :: dpsitordrho
real :: d2psitordrho2
real :: rhotor
real :: drhotordrho
real :: psitor_lcfs
real :: zed0_fac
real :: rhoc_psi0
real :: qinp_psi0
real :: shat_psi0
end type flux_surface_type
type spec_type
integer :: nspec
real :: z
real :: mass
real :: dens, temp
real :: tprim, fprim
real :: vnew_ref
real :: stm, zstm, tz, smz, zt
real :: d2ndr2, d2Tdr2
real :: bess_fac ! 0 for argument of Bessel Functions equal to 0
! pre-2003 Fortran does not support
! allocatable arrays within derived types
! so set size large enough that it should be a problem
! should be nspec large
real, dimension (10) :: vnew
integer :: type
!the next few variables are for multibox simulations
real :: dens_psi0, temp_psi0
real :: stm_psi0, zstm_psi0, tz_psi0, smz_psi0, zt_psi0
end type spec_type
type :: eigen_type
complex, dimension (:,:), pointer :: zloc => null()
integer, dimension (:), pointer :: idx => null()
end type eigen_type
type :: response_matrix_type
type (eigen_type), dimension (:), pointer :: eigen => null()
end type response_matrix_type
type coupled_alpha_type
integer :: max_idx
complex, dimension (:), pointer :: fourier => null()
end type coupled_alpha_type
end module common_types