forked from bright1998/CIP_GPS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.f
90 lines (70 loc) · 1.87 KB
/
main.f
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
c --------------
program main
c --------------
use common
implicit double precision(a-h,o-z)
write(6,*)'*****************************
&***************************************'
write(6,*)'*** Start Calculation by GPS
&(Graphically Performable Simulator) ***'
write(6,*)'*** Solving by
&CIP-MOCCT Scheme ***'
write(6,*)'*****************************
&***************************************'
write(6,*)' '
call prms
call grid
tm = 0.d0
ns = 0
nf = 0
nbcast = 0
etm = 0.d0
pi = 4.d0*DATAN(1.d0)
pi4 = 4.d0*pi
pi4i = 1.d0/pi4
call init
C Source Term
call source
call pgwrite
call write
if(nrestart .eq. 1) then
call read
endif
write(6,*)' '
write(6,*)'Maximum step number'
write(6,*)'nsmax= ',nsmax
write(6,*)' '
write(6,*)'============ Start Calculation ============'
C Main Loop
50 continue
call cflc
write(6,*)'ns= ',ns,' tm= ',tm,' dt= ',dt
ns = ns + 1
tm = tm + dt
if((ncflconst .eq. 0) .and. (dt .le. dtlim)) goto 500
C Solver Subroutine
c if((nroe .eq. 1) .and. (ncip .eq. 0)) then
c call roe
c elseif((ncip .eq. 1) .and. (nroe .eq. 0)) then
call cip
c else
c write(6,*)'Solver Selection Error'
c write(6,*)'Stop'
c stop
c endif
if(tm .gt. (ftm*dfloat(nf))) then
call pgwrite
call write
endif
if(ns .ge. nsmax) goto 100
if(tm .ge. tmmax) goto 600
goto 50
100 write(6,*)'$$ stopped due to come to maximum step number',nsmax
goto 600
500 write(6,*)' '
write(6,*)'!! abnormal stopped due to small dt, less than ',dtlim
goto 200
600 call restart
200 continue
stop
end program