Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 329419 | Differences between
and this patch

Collapse All | Expand All

(-)bigdft-1.2.0.old/src/PSolver/xcenergy.f90 (-14 / +17 lines)
Lines 96-111 Link Here
96
  real(dp) :: elocal,vlocal,rho,pot,potion,facpotion,sfactor
96
  real(dp) :: elocal,vlocal,rho,pot,potion,facpotion,sfactor
97
  integer :: npts,i_all,order,offset,i_stat,ispden
97
  integer :: npts,i_all,order,offset,i_stat,ispden
98
  integer :: i1,i2,i3,j1,j2,j3,jp2,jpp2,jppp2
98
  integer :: i1,i2,i3,j1,j2,j3,jp2,jpp2,jppp2
99
  integer :: ndvxc,nvxcdgr,ngr2
99
  integer :: ndvxc,nvxcdgr,ngr2,nd2vxc
100
100
101
  !interface with drivexc
101
  !interface with drivexc
102
  interface
102
  interface
103
     subroutine drivexc(exc,ixc,npts,nspden,order,rho_updn,vxc,ndvxc,ngr2,nvxcdgr,&
103
     subroutine drivexc(exc,ixc,npts,nspden,order,rho_updn,vxc,ndvxc,ngr2,nd2vxc,nvxcdgr,&
104
          dvxc,d2vxc,grho2_updn,vxcgr,exexch)    !Optional arguments 
104
          dvxc,d2vxc,grho2_updn,vxcgr,exexch,lrho_updn,vxclrho,tau_updn,vxctau)!Optional arguments
105
       implicit none
105
       implicit none
106
       !Arguments ------------------------------------
106
       !Arguments ------------------------------------
107
       !scalars
107
       !scalars
108
       integer,intent(in) :: ixc,ndvxc,ngr2,npts,nspden,nvxcdgr,order
108
       integer,intent(in) :: ixc,ndvxc,ngr2,nd2vxc,npts,nspden,nvxcdgr,order
109
       integer,intent(in),optional :: exexch
109
       integer,intent(in),optional :: exexch
110
       !arrays
110
       !arrays
111
       real(kind=8),intent(in) :: rho_updn(npts,nspden)
111
       real(kind=8),intent(in) :: rho_updn(npts,nspden)
Lines 113-118 Link Here
113
       real(kind=8),intent(out) :: exc(npts),vxc(npts,nspden)
113
       real(kind=8),intent(out) :: exc(npts),vxc(npts,nspden)
114
       real(kind=8),intent(out),optional :: d2vxc(npts),dvxc(npts,ndvxc)
114
       real(kind=8),intent(out),optional :: d2vxc(npts),dvxc(npts,ndvxc)
115
       real(kind=8),intent(out),optional :: vxcgr(npts,nvxcdgr)
115
       real(kind=8),intent(out),optional :: vxcgr(npts,nvxcdgr)
116
       real(kind=8),intent(in),optional :: lrho_updn(npts,nspden), tau_updn(npts,nspden)
117
       real(kind=8),intent(out),optional :: vxclrho(npts,nspden),vxctau(npts,nspden)
116
     end subroutine drivexc
118
     end subroutine drivexc
117
  end interface
119
  end interface
118
120
Lines 153-159 Link Here
153
!     end do
155
!     end do
154
156
155
     !Allocations of the exchange-correlation terms, depending on the ixc value
157
     !Allocations of the exchange-correlation terms, depending on the ixc value
156
     call size_dvxc(ixc,ndvxc,ngr2,nspden,nvxcdgr,order)
158
     nd2vxc=1
159
     call size_dvxc(ixc,ndvxc,ngr2,nd2vxc,nspden,nvxcdgr,order)
157
160
158
     if (ixc >= 11 .and. ixc <= 16) then
161
     if (ixc >= 11 .and. ixc <= 16) then
159
        !computation of the gradient
162
        !computation of the gradient
Lines 204-229 Link Here
204
     if (ixc >= 11 .and. ixc <= 16) then
207
     if (ixc >= 11 .and. ixc <= 16) then
205
      if (order**2 <= 1 .or. ixc == 16) then
208
      if (order**2 <= 1 .or. ixc == 16) then
206
         if (ixc /= 13) then             
209
         if (ixc /= 13) then             
207
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nvxcdgr,&
210
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nd2vxc,nvxcdgr,&
208
                 &grho2_updn=gradient,vxcgr=dvxcdgr) 
211
                 &grho2_updn=gradient,vxcgr=dvxcdgr) 
209
         else
212
         else
210
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nvxcdgr,&
213
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nd2vxc,nvxcdgr,&
211
                 &grho2_updn=gradient) 
214
                 &grho2_updn=gradient) 
212
         end if
215
         end if
213
      else if (order /= 3) then
216
      else if (order /= 3) then
214
         if (ixc /= 13) then             
217
         if (ixc /= 13) then             
215
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nvxcdgr,&
218
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nd2vxc,nvxcdgr,&
216
                 &dvxc=dvxci,grho2_updn=gradient,vxcgr=dvxcdgr) 
219
                 &dvxc=dvxci,grho2_updn=gradient,vxcgr=dvxcdgr) 
217
         else
220
         else
218
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nvxcdgr,&
221
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nd2vxc,nvxcdgr,&
219
                 &dvxc=dvxci,grho2_updn=gradient) 
222
                 &dvxc=dvxci,grho2_updn=gradient) 
220
         end if
223
         end if
221
      else if (order == 3) then
224
      else if (order == 3) then
222
         if (ixc /= 13) then             
225
         if (ixc /= 13) then             
223
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nvxcdgr,&
226
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nd2vxc,nvxcdgr,&
224
                 &dvxc=dvxci,d2vxc=d2vxci,grho2_updn=gradient,vxcgr=dvxcdgr) 
227
                 &dvxc=dvxci,d2vxc=d2vxci,grho2_updn=gradient,vxcgr=dvxcdgr) 
225
         else
228
         else
226
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nvxcdgr,&
229
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nd2vxc,nvxcdgr,&
227
                 &dvxc=dvxci,d2vxc=d2vxci,grho2_updn=gradient) 
230
                 &dvxc=dvxci,d2vxc=d2vxci,grho2_updn=gradient) 
228
         end if
231
         end if
229
      end if
232
      end if
Lines 259-270 Link Here
259
        !cases without gradient
262
        !cases without gradient
260
     else
263
     else
261
        if (order**2 <=1 .or. ixc >= 31 .and. ixc<=34) then
264
        if (order**2 <=1 .or. ixc >= 31 .and. ixc<=34) then
262
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nvxcdgr)
265
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nd2vxc,nvxcdgr)
263
        else if (order==3 .and. (ixc==3 .or. ixc>=7 .and. ixc<=10)) then
266
        else if (order==3 .and. (ixc==3 .or. ixc>=7 .and. ixc<=10)) then
264
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nvxcdgr,&
267
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nd2vxc,nvxcdgr,&
265
                &dvxc=dvxci,d2vxc=d2vxci)
268
                &dvxc=dvxci,d2vxc=d2vxci)
266
        else
269
        else
267
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nvxcdgr,&
270
           call drivexc(exci,ixc,npts,nspden,order,rhopot(1,1,offset,1),vxci,ndvxc,ngr2,nd2vxc,nvxcdgr,&
268
                &dvxc=dvxci)
271
                &dvxc=dvxci)
269
        end if
272
        end if
270
     end if
273
     end if

Return to bug 329419