feat: Add function to count ID 2 in qs2 file
This commit is contained in:
parent
492f8277ab
commit
e473ddf870
@ -189,6 +189,18 @@ bar(df_timings[!, :Type],
|
|||||||
ylimits=(0, 60000))
|
ylimits=(0, 60000))
|
||||||
savefig("$output_dir/timings_barite.pdf")
|
savefig("$output_dir/timings_barite.pdf")
|
||||||
|
|
||||||
|
function get_count_of_id2(initqsfile)
|
||||||
|
res = nothing
|
||||||
|
|
||||||
|
@rput initqsfile
|
||||||
|
R"res <- qs2::qs_read(initqsfile)"
|
||||||
|
@rget res
|
||||||
|
|
||||||
|
id = res[!, :ID]
|
||||||
|
|
||||||
|
return count(x -> x == 2.0, id)
|
||||||
|
end
|
||||||
|
|
||||||
bar(df_timings[!, :Type], df_timings[!, :Energy],
|
bar(df_timings[!, :Type], df_timings[!, :Energy],
|
||||||
color=df_timings[!, :Colors],
|
color=df_timings[!, :Colors],
|
||||||
xguidefontsize=8,
|
xguidefontsize=8,
|
||||||
@ -204,6 +216,32 @@ bar(df_timings[!, :Type], df_timings[!, :Energy],
|
|||||||
ylabel="Energy [Wh]", xlabel="Simulation Type")
|
ylabel="Energy [Wh]", xlabel="Simulation Type")
|
||||||
savefig("$output_dir/energy_barite.pdf")
|
savefig("$output_dir/energy_barite.pdf")
|
||||||
|
|
||||||
|
|
||||||
|
max_count = get_count_of_id2("barite/barite_fgcs_ref_128_3/iter_0000.qs2")
|
||||||
|
|
||||||
|
interp_3_1 = df_interp[(3, 1)]
|
||||||
|
|
||||||
|
plot(interp_3_1[!, :Calls],
|
||||||
|
color=:black,
|
||||||
|
xguidefontsize=8,
|
||||||
|
yguidefontsize=8,
|
||||||
|
xtickfontsize=6,
|
||||||
|
ytickfontsize=6,
|
||||||
|
legend=false,
|
||||||
|
ylimits=(68000, 82000),
|
||||||
|
yminorgrid=true,
|
||||||
|
yminorticks=4,
|
||||||
|
formatter=:plain,
|
||||||
|
ylabel="Interpolation Calls",
|
||||||
|
xlabel="Iteration")
|
||||||
|
|
||||||
|
hline!([max_count],
|
||||||
|
color=:red,
|
||||||
|
linestyle=:dash,
|
||||||
|
label="Mean")
|
||||||
|
|
||||||
|
savefig("$output_dir/interp_calls_3_1_clipped.pdf")
|
||||||
|
|
||||||
prefix = "dolo_inter"
|
prefix = "dolo_inter"
|
||||||
input_dir = "dolomite/"
|
input_dir = "dolomite/"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user