Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/interface/INIT.F
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ integer function INIT(en,q,k,X,Xw,Dip,instr,lnstr,CLOSE_Gs,FINALIZE)
call W_reset(Xw(2),damping=0.001_SP)
call W_reset(Xw(3))
call W_reset(Xw(4))
call W_reset(Xw(5))
call W_reset(Xw(5),type=5)
call X_reset(X(1),type=1)
call X_reset(X(2),type=2)
call X_reset(X(3),type=3)
Expand Down
3 changes: 3 additions & 0 deletions src/interface/INIT_load.F
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,9 @@ subroutine Xload(X,wv)
des(2) ='Frequency sampling in the complex plane ("1l" one line, "2l" two lines)'
des(3) ='Partition along the real axis ("ho" homogeneous, "lP" linear, "qP" quadratic, "cP" cubic)'
des(4) ='Energy range'
if (X%whoami==5) then
des(4) ='Energy range; if 0.0 | -1.0 | half the maximum e-h pair included in X is used'
endif
des(5) ='Imaginary range'
des(6) ='Damping range'
des(7) ='[o/o] Coarse grid controller'
Expand Down
14 changes: 13 additions & 1 deletion src/modules/mod_frequency.F
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,27 @@ subroutine W_duplicate(Wi,Wo)
Wo%grid_type=Wi%grid_type
end subroutine W_duplicate
!
subroutine W_reset(W,damping)
subroutine W_reset(W,damping,type)
type(w_samp)::W
real(SP), optional, intent(in) :: damping
integer, optional, intent(in) :: type
real :: local_damping
local_damping=0.1_SP
if(present(damping)) local_damping=damping
W%n_freqs=100
W%per_memstps=100._SP
W%er=(/0._SP,10._SP/)/HA2EV
!
if (present(type)) then
select case (type)
! For MPA set default EnRngeXm to 2 Ha
case(5)
W%er=(/0._SP,2._SP/)
case default
W%er=(/0._SP,10._SP/)/HA2EV
end select
endif
!
W%ir=(/1._SP,1._SP/)!/HA2EV
W%dr=(/local_damping,local_damping/)/HA2EV
W%damp_reference=0._SP
Expand Down
6 changes: 6 additions & 0 deletions src/pol_function/X_dielectric_matrix.F
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE,CHILD)
if (mod(Xw%n_freqs,2)>0) Xw%n_freqs=Xw%n_freqs+1
X%mpa_npoles = Xw%n_freqs/2
X_MEM_n_freqs =2*X%mpa_npoles
!
if (Xw%er(2)<=Xw%er(1)) then
Xw%er(1) = 0.0_SP
Xw%er(2) = ( maxval(Xen%E(X%ib(2),:,:)) - minval(Xen%E(X%ib(1),:,:)) ) / 2.0_SP
endif
!
X%ordering='t'
Xw%grid_type="mp"
if(Xw%dr(1)<epsilon(1._SP)) call error("Damping = 0.0 not compatible with MPA dielectric constant")
Expand Down