ponweist / Wannier90-PRACE

Optimizations for Wannier90 (fork repository - see http://wannier.org for the official version).
GNU General Public License v2.0
1 stars 0 forks source link

Remove superfluous calls to get_imfgh_k_list #11

Closed ponweist closed 9 years ago

ponweist commented 10 years ago

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.

ponweist commented 10 years ago

Note that the previous change 9d7dfb7809ff61f41fb108e461b56699ad62b03e is worthless since setting both plot_morb and plot_curv is programmatically prohibited. See also #12.