A similar optimization as in ec112cd222355825cbfd57036c60a72990cd2d17 can be done for kslice and berry - the code fragments
if(plot_curv) then
call get_imfgh_k_list(kpt,imf_k_list)
...
end if
if(plot_morb) then
call get_imfgh_k_list(kpt,imf_k_list,img_k_list,imh_k_list)
...
end if
can be rewritten to
if(plot_morb) then
call get_imfgh_k_list(kpt,imf_k_list,img_k_list,imh_k_list)
...
end if
if(plot_curv) then
if(.not. plot_curv) then
call get_imfgh_k_list(kpt,imf_k_list)
end if
...
end if
avoiding redundant calculation of imf_k_list in the case plot_morb and plot_curv are both set.
Note that the previous change 9d7dfb7809ff61f41fb108e461b56699ad62b03e is worthless since setting both plot_morb and plot_curv is programmatically prohibited. See also #12.
A similar optimization as in ec112cd222355825cbfd57036c60a72990cd2d17 can be done for kslice and berry - the code fragments
can be rewritten to
avoiding redundant calculation of
imf_k_list
in the caseplot_morb
andplot_curv
are both set.