Skip to content

Call gmap_sym only once in EPW.

Jae-Mo Lihm requested to merge jmlihm/q-e_private:epw_gmap_sym into develop

subroutine gmap_sym computes gmapsym (the G vector map S(G) -> G) and eigv (e^(iGv)). Previously, gmapsym was re-computed for each irreducible q point because the function copy_sym reshuffles the s matrix for each iq_irr. This PR removes this redundancy by moving the gmap_sym call outside the iq_irr loop.

To deal with the reshuffling, I copy the s matrix and the ft matrix before the iq_irr loop to s_save and ft_save. Later in the iq_irr loop, I find the index of s_save and ft_save that corresponds to the isym index of the reshuffled s matrix and hence find the required gmapsym and eigv.

Also, the dimensions of gmapsym and eigv arguments of elphel2_shuffle and elphon_shuffle are changed from (ngm, 48) to (ngm), as only the (:,isym) part were used inside those subroutines.

I have checked that the EPW tests pass.

Edited by Jae-Mo Lihm

Merge request reports