nakib / elphbolt

A solver for the coupled and decoupled electron and phonon Boltzmann transport equations.
GNU General Public License v3.0
39 stars 26 forks source link

Reduce state mutation related to ph-iso #130

Open nakib opened 8 months ago

nakib commented 8 months ago

The phonon object should not be mutated outside the initialization step. Somehow the following:

!!Initialize the matrix elements storage
    if (phiso .and. .not. phiso_Tmat) then 
      call ph%xiso%allocate_xmassvar(ph, usetetra, phiso_Tmat)
    end if 
    if (phsubs) then
      call ph%xsubs%allocate_xmassvar(ph, usetetra, phiso_Tmat)
    end if

has crept into the module bz_sums. This will have to be removed from here since bz_sums should ideally not mutate random particle states.

Related issue: I am not a fan of data types containing data types. So this will have to be reworked.