Commit f533b052 authored by giannozz's avatar giannozz

dbl => DP (defined as previously dbl was)

syntax for declarations: real(DP), without "kind="


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2135 c92efa57-630b-4861-b058-cf58834340f0
parent 6987a4c6
......@@ -19,7 +19,7 @@
! ----------------------------------------------
! routines in this file:
! SUBROUTINE adjef(nk,e,wk,wke,fke,ef,qtot,ne,temp,sume,nspin)
! REAL(dbl) FUNCTION stepf(x)
! REAL(DP) FUNCTION stepf(x)
! ----------------------------------------------
! BEGIN manual
......@@ -42,17 +42,17 @@
! ... declare subroutine arguments
INTEGER ne,nk,nspin
REAL(dbl) ef,qtot,temp,sume
REAL(dbl) e(ne,nk,nspin),wke(ne,nk,nspin)
REAL(dbl) wk(nk),fke(ne,nk,nspin)
REAL(dbl), PARAMETER :: tol = 1.d-10
REAL(DP) ef,qtot,temp,sume
REAL(DP) e(ne,nk,nspin),wke(ne,nk,nspin)
REAL(DP) wk(nk),fke(ne,nk,nspin)
REAL(DP), PARAMETER :: tol = 1.d-10
INTEGER, PARAMETER :: nitmax = 100
! ... declare functions
REAL(dbl) stepf
REAL(DP) stepf
! ... declare other variables
REAL(dbl) sumq,emin,emax,fac,t,drange
REAL(DP) sumq,emin,emax,fac,t,drange
INTEGER ik,ispin,ie,iter
! end of declarations
......@@ -125,10 +125,10 @@
! FUNCTION stepf(x)
! USE kinds
! IMPLICIT NONE
! REAL(dbl) stepf
! REAL(dbl) x
! REAL(dbl), PARAMETER :: c = 0.5641895835d0
! REAL(dbl) derfc
! REAL(DP) stepf
! REAL(DP) x
! REAL(DP), PARAMETER :: c = 0.5641895835d0
! REAL(DP) derfc
! stepf=derfc(x)
!! stepf=derfc(x)-c*x*dexp(-x*x)
! RETURN
......@@ -137,7 +137,7 @@
DOUBLE PRECISION FUNCTION stepf(x)
USE kinds
IMPLICIT NONE
REAL(dbl) c,x,erfc
REAL(DP) c,x,erfc
PARAMETER (c=0.5641895835D0)
! stepf=erfc(x)
stepf=1.d0/(exp(min(x,100.d0))+1.d0)
......@@ -168,12 +168,12 @@
IMPLICIT NONE
integer nx,nel
real(dbl) E(nx),FKE(nx),temp,sume,ef,tol
real(DP) E(nx),FKE(nx),temp,sume,ef,tol
integer nitmax
PARAMETER (TOL=1.D-10,NITMAX=100)
integer iter,ie
real(dbl) t,emin,emax,stepf
real(dbl) sumq,fac,qtot,drange
real(DP) t,emin,emax,stepf
real(DP) sumq,fac,qtot,drange
QTOT=DBLE(NEL)
SUMQ=0.D0
SUME=0.D0
......
......@@ -42,22 +42,22 @@
CHARACTER(LEN=3) :: label(nsx) ! atomic labels
INTEGER :: na(nsx) ! number of atoms per specie
INTEGER :: isa(nsx) ! index of the first atom (in the whole list) of a given specie
REAL(dbl) :: m(nsx) ! atomic masses
REAL(dbl) :: taur(3,natx)
REAL(dbl) :: taus(3,natx)
REAL(DP) :: m(nsx) ! atomic masses
REAL(DP) :: taur(3,natx)
REAL(DP) :: taus(3,natx)
! ... tau: atomic positions, sorted by specie. Atomic positions of specie "is" are
! stored in array elements whose index are "isa(is) ... isa(is)+na(is)-1"
REAL(dbl) :: vels(3,natx) ! scaled velocities, same layout of "tau"
REAL(dbl) :: for(3,natx) ! total force acting on the atom
REAL(DP) :: vels(3,natx) ! scaled velocities, same layout of "tau"
REAL(DP) :: for(3,natx) ! total force acting on the atom
INTEGER :: mobile(3,natx) ! atomic freedom, same layout of "tau" ( 1 atom can move )
INTEGER :: ityp(natx) ! index of the specie to which the atom belong
LOGICAL :: tscfor ! indicate if the force are scaled or real
REAL(dbl) :: ekin(nsx) ! kinetic energy per specie
REAL(dbl) :: ekint ! total kinetic energy
REAL(DP) :: ekin(nsx) ! kinetic energy per specie
REAL(DP) :: ekint ! total kinetic energy
END TYPE atoms_type
! .. 4 int + nsx int + 4 char + 2 ( nsx int ) + nsx dbl + 3 ( 3 dbl natx ) + 3 lg natx +
! .. natx int + 3 lg + nsx dbl + dbl
! .. 4 int + nsx int + 4 char + 2 ( nsx int ) + nsx DP + 3 ( 3 DP natx ) + 3 lg natx +
! .. natx int + 3 lg + nsx DP + DP
! ----------------------------------------------
! END manual
......@@ -98,9 +98,9 @@
SUBROUTINE atoms_type_init(atoms, staur, ismbl, label, pma, na, nsp, h)
USE cell_base, ONLY: s_to_r
TYPE (atoms_type) :: atoms
REAL(dbl), INTENT(IN) :: staur(:,:)
REAL(DP), INTENT(IN) :: staur(:,:)
LOGICAL, INTENT(IN) :: ismbl(:,:)
REAL(dbl), INTENT(IN) :: pma(:), h(3,3)
REAL(DP), INTENT(IN) :: pma(:), h(3,3)
INTEGER, INTENT(IN) :: na(:), nsp
CHARACTER(LEN=3), INTENT(IN) :: label(:)
INTEGER :: nax, nat
......
......@@ -38,7 +38,7 @@
INTEGER nel ! number of electrons per unit cell
INTEGER nb_l ! local number of bands
INTEGER nb_g ! global number of bands
REAL(dbl), POINTER :: s(:) ! occupation numbers
REAL(DP), POINTER :: s(:) ! occupation numbers
END TYPE band
! END manual
......
......@@ -27,17 +27,17 @@ subroutine berryion( tau0,fion, tfor,ipol,evalue,enbi)
implicit none
real(kind=8) tau0(3,*)
real(kind=8) fion(3,*)
real(kind=8) enbi, evalue
real(8) tau0(3,*)
real(8) fion(3,*)
real(8) enbi, evalue
integer ipol, isa
logical tfor
!local variables
real(kind=8) gmes
real(kind=8) pola
real(8) gmes
real(8) pola
integer is, ia
complex(kind=8) temp, ci
complex(8) temp, ci
temp = (0.,0.)
ci = (0.,1.)
......@@ -85,9 +85,9 @@ end subroutine berryion
use ions_base, only: na, nsp, zv
!
implicit none
real(kind=8) tau(3,*), cdz(3)
real(8) tau(3,*), cdz(3)
! local variables
real(kind=8) zmas
real(8) zmas
integer is,i,ia,isa
!
zmas=0.0
......@@ -126,13 +126,13 @@ end subroutine berryion
implicit none
real(kind=8) fion(3,*)
real(8) fion(3,*)
integer ipol!el. field polarization
integer i,ia,is,isa
real(kind=8) fcm!force appplied on center of mass
real(kind=8) tch!total charge
real(8) fcm!force appplied on center of mass
real(8) tch!total charge
fcm=0.d0
tch=0.d0
......
......@@ -17,7 +17,7 @@
PRIVATE
REAL(dbl) :: small = 1.0d-14
REAL(DP) :: small = 1.0d-14
PUBLIC :: bessel1, bessel2, bessel3
......@@ -42,16 +42,16 @@
! ... Argument Variables
REAL(dbl), INTENT(IN) :: XG
REAL(dbl), INTENT(IN) :: RW(:)
REAL(dbl), INTENT(OUT) :: JL(:)
REAL(dbl), INTENT(OUT) :: DJL(:)
REAL(DP), INTENT(IN) :: XG
REAL(DP), INTENT(IN) :: RW(:)
REAL(DP), INTENT(OUT) :: JL(:)
REAL(DP), INTENT(OUT) :: DJL(:)
INTEGER, INTENT(IN) :: MMAX
! ... Local Variables
REAL(dbl) :: ARG_S(MMAX)
REAL(dbl) :: XRGM1(MMAX)
REAL(DP) :: ARG_S(MMAX)
REAL(DP) :: XRGM1(MMAX)
INTEGER :: IR
! ... Subroutine Body
......@@ -92,19 +92,19 @@
! ... Argument Variables
REAL(dbl), INTENT(IN) :: XG
REAL(dbl), INTENT(IN) :: RW(:)
REAL(dbl), INTENT(OUT) :: FINT(:,:)
REAL(DP), INTENT(IN) :: XG
REAL(DP), INTENT(IN) :: RW(:)
REAL(DP), INTENT(OUT) :: FINT(:,:)
INTEGER, INTENT(IN) :: INDL(:), LNL, MMAX
! ... Local Variables
REAL(dbl) :: ARG_S(MMAX)
REAL(dbl) :: XRGM1(MMAX)
REAL(dbl) :: J0(MMAX)
REAL(dbl) :: J1(MMAX)
REAL(dbl) :: J2(MMAX)
REAL(dbl) :: J3(MMAX)
REAL(DP) :: ARG_S(MMAX)
REAL(DP) :: XRGM1(MMAX)
REAL(DP) :: J0(MMAX)
REAL(DP) :: J1(MMAX)
REAL(DP) :: J2(MMAX)
REAL(DP) :: J3(MMAX)
INTEGER :: IR, L, LL, LMAX
! ... Subroutine Body
......@@ -178,19 +178,19 @@
! ... Argument Variables
REAL(dbl), INTENT(IN) :: XG
REAL(dbl), INTENT(IN) :: RW(:)
REAL(dbl), INTENT(OUT) :: FINT(:,:)
REAL(DP), INTENT(IN) :: XG
REAL(DP), INTENT(IN) :: RW(:)
REAL(DP), INTENT(OUT) :: FINT(:,:)
INTEGER, INTENT(IN) :: INDL(:), LNL, MMAX
! ... Local Variables
REAL(dbl) :: XRG(MMAX)
REAL(dbl) :: XRGM1(MMAX)
REAL(dbl) :: F0(MMAX)
REAL(dbl) :: F1(MMAX)
REAL(dbl) :: F2(MMAX)
REAL(dbl) :: F3(MMAX)
REAL(DP) :: XRG(MMAX)
REAL(DP) :: XRGM1(MMAX)
REAL(DP) :: F0(MMAX)
REAL(DP) :: F1(MMAX)
REAL(DP) :: F2(MMAX)
REAL(DP) :: F3(MMAX)
INTEGER :: IR, L, LL, LMAX
! ... Subroutine Body
......
......@@ -34,17 +34,17 @@ subroutine bforceion(fion,tfor,ipol,qmatinv,bec0,becdr,gqq,evalue)
implicit none
real(kind=8) evalue
complex(kind=8) qmatinv(nx,nx),gqq(nhm,nhm,nas,nsp)
real(kind=8) bec0(nhsa,n),becdr(nhsa,n,3)
real(kind=8) fion(3,*)
real(8) evalue
complex(8) qmatinv(nx,nx),gqq(nhm,nhm,nas,nsp)
real(8) bec0(nhsa,n),becdr(nhsa,n,3)
real(8) fion(3,*)
integer ipol
logical tfor
!local variables
complex(kind=8) ci, temp, temp1,temp2,temp3
real(kind=8) gmes
complex(8) ci, temp, temp1,temp2,temp3
real(8) gmes
integer iv,jv,ia,is,k,i,j,isa,ilm,jlm,inl,jnl,ism
if(.not. tfor) return
......
......@@ -11,7 +11,7 @@
MODULE brillouin
!
!------------------------------------------------------------------------------!
USE kinds, ONLY : dbl
USE kinds, ONLY : DP
USE mp, ONLY : mp_bcast
! ...
!
......@@ -26,18 +26,18 @@
LOGICAL :: gamma_only
INTEGER :: nk1, nk2, nk3
INTEGER :: k1, k2, k3
REAL (dbl) :: shift(3)
REAL (DP) :: shift(3)
LOGICAL :: symmetry
INTEGER :: wfn_type
INTEGER :: nkpt
REAL (dbl), DIMENSION (:), POINTER :: weight
REAL (dbl), DIMENSION (:,:), POINTER :: xk
REAL (DP), DIMENSION (:), POINTER :: weight
REAL (DP), DIMENSION (:,:), POINTER :: xk
END TYPE kpoints
!------------------------------------------------------------------------------!
TYPE (kpoints) :: kp
REAL (dbl), ALLOCATABLE , TARGET :: weight(:)
REAL (dbl), ALLOCATABLE , TARGET :: xk(:,:)
REAL (DP), ALLOCATABLE , TARGET :: weight(:)
REAL (DP), ALLOCATABLE , TARGET :: xk(:,:)
PUBLIC :: kpoints, kpoint_info, kpoint_setup, kp
......@@ -65,9 +65,9 @@
INTEGER :: nk1, nk2, nk3
INTEGER :: k1, k2, k3
INTEGER :: nkpt_in
REAL (dbl) :: weight_in(:)
REAL (dbl) :: xk_in(:,:)
REAL (dbl) :: weight_sum
REAL (DP) :: weight_in(:)
REAL (DP) :: xk_in(:,:)
REAL (DP) :: weight_sum
kp%scheme = 'gamma'
kp%symmetry = .FALSE.
......@@ -112,8 +112,8 @@
ALLOCATE( xk(3,1), weight(1) )
kp%xk => xk
kp%weight => weight
kp%xk = 0.0_dbl
kp%weight = 1.0_dbl
kp%xk = 0.0_DP
kp%weight = 1.0_DP
kp%gamma_only = .TRUE.
CASE ('monkhorst-pack')
kp%nk1 = nk1
......
......@@ -13,31 +13,31 @@ MODULE cg_module
logical :: tcg = .false. ! se vero fa gradiente coniugato
integer :: maxiter = 20 !numero massimo interazioni c.g.
real(kind=8) :: etresh = 1.d-5 !soglia convergenza c.g.
real(kind=8) :: passop =0.3d0 !passetto per gradiente coniugato
real(8) :: etresh = 1.d-5 !soglia convergenza c.g.
real(8) :: passop =0.3d0 !passetto per gradiente coniugato
!***
!*** Conjugate Gradient
!***
real(kind=8) esse,essenew !fattori cg
COMPLEX(kind=8), ALLOCATABLE :: gi(:,:)!coniugati
COMPLEX(kind=8), ALLOCATABLE :: hi(:,:)!gradienti di ricerca
COMPLEX(kind=8), ALLOCATABLE :: c0old(:,:)!vecchie funzioni d'onda, per estrapolazione
COMPLEX(kind=8), ALLOCATABLE :: hpsi(:,:) !termini H|Psi_i>
real(kind=8) ene0,ene1,dene0,enever,enesti !energie per minimizazzione lineare lungo hi
real(kind=8) passof,passov !passo effettivo stimato durante minimizzazione
real(8) esse,essenew !fattori cg
COMPLEX(8), ALLOCATABLE :: gi(:,:)!coniugati