@@ -35,92 +35,84 @@ function bc1(meqn::Int, mbc::Int, mx::Int, xlower::Float64, dx::Float64,
35
35
# -------------------------------------------------------
36
36
# # left boundary:
37
37
# -------------------------------------------------------
38
- # go to (100,110,120,130) mthbc(1)+1
39
38
#
40
39
if mthbc[1 ] == 0
41
- # 100 continue
42
40
43
41
# user-specified boundary conditions go here in place of error output
44
42
println (" *** ERROR *** mthbc(1)=0 and no BCs specified in bc1" )
43
+ exit (- 1 )
45
44
46
45
elseif mthbc[1 ] == 1
47
46
48
- # 110 continue
49
47
# zero-order extrapolation:
50
48
for ibc= 1 : mbc
51
49
for m= 1 : meqn
52
50
q[m,1 - ibc] = q[m,1 ]
53
51
end
54
52
end
55
- # go to 199
53
+ @goto l199
56
54
57
55
elseif mthbc[1 ] == 2
58
- # 120 continue
59
56
# periodic:
60
57
for ibc= 1 : mbc
61
58
for m= 1 : meqn
62
59
q[m,1 - ibc] = q[m,mx+ 1 - ibc]
63
60
end
64
61
end
65
- # go to 199
62
+ @goto l199
66
63
67
64
elseif mthbc[1 ] == 3
68
- # 130 continue
69
- # # solid wall (assumes 2'nd component is velocity or momentum in x):
70
- for ibc= 1 : mbc
71
- for m= 1 : meqn
72
- q[m,1 - ibc] = q[m,ibc]
73
- end
74
- q[2 ,1 - ibc] = - q[2 ,ibc]
75
- end
76
- # # negate the normal velocity:
77
- # go to 199
78
-
79
- # 199 continue
65
+ # solid wall (assumes 2'nd component is velocity or momentum in x):
66
+ for ibc= 1 : mbc
67
+ for m= 1 : meqn
68
+ q[m,1 - ibc] = q[m,ibc]
69
+ end
70
+ q[2 ,1 - ibc] = - q[2 ,ibc]
71
+ end
72
+ # negate the normal velocity:
73
+ @goto l199
74
+
80
75
end # if mthbc[1] == ...
81
76
77
+ @label l199
78
+
82
79
#
83
80
# -------------------------------------------------------
84
81
# # right boundary:
85
82
# -------------------------------------------------------
86
- # go to (200,210,220,230) mthbc(2)+1
87
- #
83
+
88
84
if mthbc[2 ] == 0
89
- # 200 continue
90
85
# user-specified boundary conditions go here in place of error output
91
86
println (" *** ERROR *** mthbc(2)=0 and no BCs specified in bc2" )
92
- # go to 299
87
+ exit ( - 1 )
93
88
94
89
elseif mthbc[2 ] == 1
95
- # 210 continue
96
90
# zero-order extrapolation:
97
91
for ibc= 1 : mbc
98
92
for m= 1 : meqn
99
93
q[m,mx+ ibc] = q[m,mx]
100
94
end
101
95
end
102
- # go to 299
96
+ return
103
97
104
98
elseif mthbc[2 ] == 2
105
- # 220 continue
106
- # # periodic:
99
+ # periodic:
107
100
for ibc= 1 : mbc
108
101
for m= 1 : meqn
109
102
q[m,mx+ ibc] = q[m,ibc]
110
103
end
111
104
end
112
- # go to 299
105
+ return
113
106
114
107
elseif mthbc[2 ] == 3
115
- # 230 continue
116
- # # solid wall (assumes 2'nd component is velocity or momentum in x):
117
- for ibc= 1 : mbc
118
- for m= 1 : meqn
119
- q[m,mx+ ibc] = q[m,mx+ 1 - ibc]
120
- end
121
- q[2 ,mx+ ibc] = - q[2 ,mx+ 1 - ibc]
122
- end
123
- # go to 299
108
+ # solid wall (assumes 2'nd component is velocity or momentum in x):
109
+ for ibc= 1 : mbc
110
+ for m= 1 : meqn
111
+ q[m,mx+ ibc] = q[m,mx+ 1 - ibc]
112
+ end
113
+ q[2 ,mx+ ibc] = - q[2 ,mx+ 1 - ibc]
114
+ end
115
+ return
124
116
125
117
end # if mthbc[2] == ...
126
118
# 299 continue
0 commit comments