-
Notifications
You must be signed in to change notification settings - Fork 0
/
type_definitions.f08
105 lines (93 loc) · 3.69 KB
/
type_definitions.f08
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
104
105
!*---------------------------------------------------------------------------*!
! |
! | SWMM Engine: Storm Water Management Model
! | Website: https://ehsanmadadi.com
! | Copyright (C) 2018-2020 Ehsan Madadi-Kandjani
!-------------------------------------------------------------------------------
!License
! This file is part of SWMM Engine.
! SWMM Engine 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.
! SWMM Engine 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 SWMM Engine. If not, see <http://www.gnu.org/licenses/>.
!*---------------------------------------------------------------------------*!
!
! module type defintions
!
! These are derived type definitions that are used in globals, setting, and
! elsewhere.
!
! Note that each of these is intended to be dependent only on derived
! types within this module.
!
! Types that are defined outside of here or setting_definition should
! be confined to the module in which they are defined.
!
!==========================================================================
module type_definitions
implicit none
public
type string
character(len=:), allocatable :: str
end type string
!% diagnostic%Volume
type diagnosticVolumeType
integer :: Step
real :: Time
real :: Volume
real :: VolumeChange
real :: NetInflowVolume
real :: InflowRate
real :: OutflowRate
real :: ConservationThisStep ! + is artificial source, - is sink
real :: ConservationTotal
end type diagnosticVolumeType
type diagnosticType
type(diagnosticVolumeType) :: Volume
end type diagnosticType
!% boundary condition data
type bcType
integer :: Idx
integer :: NodeID
integer :: FaceID
integer :: ElemGhostID
integer :: ElemInsideID
integer :: Updn ! bc_updn_... (0 = upstream, 1 = downstream)
integer :: Category ! bc_category_... (0 = elevation, 1 = inflowrate)
real, dimension(:), allocatable :: TimeArray
real, dimension(:), allocatable :: ValueArray
real :: ThisValue
real :: ThisTime
real :: ThisFlowrate
end type bcType
!% output file location
type outputfileType
integer :: UnitNumber = 0
character(256) :: FileName = 'dummy.txt'
character(256) :: FolderName = 'dummyFolder'
character(256) :: FolderPath = './'
character(32) :: FileStatus = 'new'
character(512) :: WriteName = ''
logical :: IsOpen = .false.
end type outputfileType
!% specific information for a debug file
type debugfileType
type (outputfileType) :: FileInfo
character(32) :: ArrayName
integer :: ColumnIndex
end type debugfileType
!% specific information for a threaded output file
type threadedfileType
type (outputfileType) :: FileInfo
character(32) :: DataName
end type threadedfileType
!==========================================================================
! END OF MODULE type_definitions
!==========================================================================
end module type_definitions