Finish up A1
This commit is contained in:
parent
72f9bd2c43
commit
a0f031f727
@ -20,7 +20,7 @@ function solveEikonal(ni, nj, h, source, tol = 1E-6)
|
||||
maxerr = sweep!(U, 2, ni+1, 2, nj+1, F, h, maxerr) # South-East
|
||||
iters += 1
|
||||
end
|
||||
# U[2:ni+1, 2:nj+1]
|
||||
println("$iters iterations, maxerr = $(Float64(maxerr))")
|
||||
U
|
||||
end
|
||||
|
||||
@ -97,7 +97,7 @@ function initialize!(F, U, ni, nj, source)
|
||||
end
|
||||
|
||||
# Call on file "ex1.txt" with the following format:
|
||||
display(solveEikonal(7, 7, 1, "ex1.txt"))
|
||||
display(view(solveEikonal(7, 7, 1, "ex1.txt"), 2:8, 2:8))
|
||||
|
||||
# Call on file "test100.txt" with the following format:
|
||||
heatmap(1:100, 1:100, solveEikonal(100, 100, 1, "test100.txt"), color=:gist_yarg)
|
||||
heatmap(solveEikonal(100, 100, 1, "test100.txt"), color=:gist_yarg)
|
Loading…
x
Reference in New Issue
Block a user