Skip to content

Commit 291c0fb

Browse files
committed
simplifies the defaults uin, vin functions in Problem()
1 parent ad10be0 commit 291c0fb

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/physics/traceradvdiff.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,15 @@ function ConstDiffProblem(;
3131
steadyflow = false
3232
)
3333

34+
zerofunction(args...) = 0.0
35+
3436
# Defaults
3537
if u != nothing; uin = u
36-
else
37-
usteady(x, y), uvarying(x, y, t) = 0.0, 0.0
38-
if steadyflow; uin = usteady; else; uin = uvarying; end
38+
else; uin = zerofunction
3939
end
4040

4141
if v != nothing; vin = v
42-
else
43-
vsteady(x, y), vvarying(x, y, t) = 0.0, 0.0
44-
if steadyflow; vin = vsteady; else; vin = vvarying; end
42+
else; vin = zerofunction
4543
end
4644

4745
if grid == nothing; g = TwoDGrid(nx, Lx, ny, Ly)

0 commit comments

Comments
 (0)