Finish up A1

This commit is contained in:
Isaac Shoebottom 2025-02-03 20:14:32 -04:00
parent 72f9bd2c43
commit a0f031f727

View File

@ -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)