Skip to content
Snippets Groups Projects
Verified Commit d368abc9 authored by Florian Atteneder's avatar Florian Atteneder
Browse files

advection_sine: also group cvgseries results by basis

parent 8a47d407
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,6 @@ if do_plot
axislegend(ax)
name = joinpath(@__DIR__, "cvgseries_basis_$(basis).png")
@show name
save(name, fig)
end
......@@ -93,6 +92,7 @@ if do_cvg_analysis
end
# combine cvg results wrt polynomial order
for (i,n) in enumerate(ns)
filename = joinpath(@__DIR__,"cvgseries_n_$(n).tex")
......@@ -113,4 +113,29 @@ if do_cvg_analysis
end
end
nidxs = [ findfirst(==(ni), ns) for ni in 3:2:9 ]
# combine cvg results wrt basis
for (b,basis) in enumerate(bases)
filename = joinpath(@__DIR__,"cvgseries_$(basis).tex")
open(filename, "w") do io
for j in 1:length(ks)
print(io, ks[j], " ")
for (i,n) in enumerate(ns[nidxs])
d, cvg = data[b][j,nidxs[i]], cvgrate[b][j,nidxs[i]]
p = Int64(floor(log10(d)))
v = @sprintf "%.2f" d*10.0^(-p)
c = isnan(cvg) ? "-" : @sprintf "%.2f" cvg
print(io, "& & \$$v \\times 10^{$p}\$ & $c ")
end
if j < length(ks)
print(io, "\\\\")
print(io, "\n")
end
end
# print(io, " \\hline\n")
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment