-
Notifications
You must be signed in to change notification settings - Fork 0
/
Util.f90
41 lines (25 loc) · 1008 Bytes
/
Util.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
! These are routines common to most potential main programs that use the modules within.
! Reads input, creates log file, then post-calculation deallocates all data and closes the log.
MODULE Util
CONTAINS
SUBROUTINE Startup(readCoords)
! #DES: Setup the calculation by creating a log file and reading the necessary input.
USE Log, ONLY : CreateLogFile
USE Input, ONLY : ReadInput
IMPLICIT NONE
LOGICAL, INTENT(IN) :: readCoords
CALL CreateLogFile()
CALL ReadInput(readCoords)
END SUBROUTINE StartUp
!*
SUBROUTINE CleanUp()
! #DES: Teardown the calculation by deallocating arrays and closing the log file.
USE Input, ONLY : DeallocateInputArrays
USE Data, ONLY : DeallocateDataArrays
USE Log, ONLY : EndLogFile
IMPLICIT NONE
CALL DeallocateInputArrays()
CALL DeallocateDataArrays()
CALL EndLogFile("Normal termination of Fepcat:")
ENDSUBROUTINE CleanUp
END MODULE Util