Commit Graph

16 Commits

Author SHA1 Message Date
giannozz 305e02a222 The current index of k-point, used in exact-exchange and electric-field
calculations, is saved in variable current_k


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2310 c92efa57-630b-4861-b058-cf58834340f0
2005-10-20 07:34:39 +00:00
giannozz f533b052d5 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
2005-08-28 14:09:42 +00:00
giannozz bf4bfe222f General cleanup of intrinsic functions:
conversion to real    => DBLE
(including real part of a complex number)
conversion to complex => CMPLX
complex conjugate     => CONJG
imaginary part        => AIMAG

All functions are uppercase.
CMPLX is preprocessed by f_defs.h and performs an explicit cast:
#define CMPLX(a,b)  cmplx(a,b,kind=DP)
This implies that 1) f_defs.h must be included whenever a CMPLX is present,
2) CMPLX should stay in a single line, 3) DP must be defined.

All occurrences of real, float, dreal, dfloat, dconjg, dimag, dcmplx
removed - please do not reintroduce any of them.
Tested only with ifc7 and g95 - beware unintended side effects

Maybe not the best solution (explicit casts everywhere would be better)
but it can be easily changed with a script if the need arises.
The following code might be used to test for possible trouble:

program test_intrinsic

  implicit none
  integer, parameter :: dp = selected_real_kind(14,200)
  real (kind=dp) :: a = 0.123456789012345_dp
  real (kind=dp) :: b = 0.987654321098765_dp
  complex (kind=dp) :: c = ( 0.123456789012345_dp, 0.987654321098765_dp)

  print *, '      A = ', a
  print *, ' DBLE(A)= ', DBLE(a)
  print *, '      C = ', c
  print *, 'CONJG(C)= ', CONJG(c)
  print *, 'DBLE(c),AIMAG(C)  = ', DBLE(c), AIMAG(c)
  print *, 'CMPLX(A,B,kind=dp)= ', CMPLX( a, b, kind=dp)

end program test_intrinsic

Note that CMPLX and REAL without a cast yield single precision numbers on
ifc7 and g95 !!!


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2133 c92efa57-630b-4861-b058-cf58834340f0
2005-08-26 17:44:42 +00:00
umari c8ea6e46dc Added electric field (berry phase style)
support in pw.

in call ro routines ccgdiagg cegterg cinitcgg
added ik (integer) k-point considerd

h_epsi_her calculates V_el|Psi>
c_phase_field.f90 calculates berry phase
during a scf calculation

P.U.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2098 c92efa57-630b-4861-b058-cf58834340f0
2005-08-16 12:04:34 +00:00
sbraccia 32bf2cd00f Fixed a bug in the initialization of cg diagonalization for the noncollinear case.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1915 c92efa57-630b-4861-b058-cf58834340f0
2005-05-25 15:09:40 +00:00
sbraccia f4ba4568d1 BLAS level 1 replaced by BLAS level 2.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1809 c92efa57-630b-4861-b058-cf58834340f0
2005-04-15 16:19:44 +00:00
sbraccia ddb2067a1e Conjugate-gradient: added a routine for gamma-only calculations. collinear and noncollinear routines unified.
Davidson: minor improvements of the davidson algorithm. collinear and noncollinear routines unified.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1769 c92efa57-630b-4861-b058-cf58834340f0
2005-03-30 14:37:55 +00:00
sbraccia 0caeadbd7b Machine-dependent definitions are now contained in two different files (both in /include):
1) f_defs.h  for definitions to be included in FORTRAN files ONLY
   2) c_defs.h  for definitions to be included in C       files ONLY

C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1012 c92efa57-630b-4861-b058-cf58834340f0
2004-06-25 17:25:37 +00:00
giannozz 0b1a5c9fd8 Extensive module cleanup: DP moved from wrong place (parameters) to the
correct place (kinds); module "varie" replaced by "control_flags" (not
yet in pwcom, though) - many many files changed.
64-bit cpus (Opteron, maybe Itanium) should now work if __LINUX64 is defined


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@513 c92efa57-630b-4861-b058-cf58834340f0
2004-01-23 15:08:03 +00:00
giannozz 8e51ff7379 In cinitcgg, the array e must be dimensioned e(nbnd), not e(nstart)
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@235 c92efa57-630b-4861-b058-cf58834340f0
2003-06-13 07:19:54 +00:00
cavazzon 7ab84cd1a0 bug fix, or most likely compiler bug workaround,
for IBM xlf 8.1.0.3


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@234 c92efa57-630b-4861-b058-cf58834340f0
2003-06-12 21:32:44 +00:00
giannozz c511ef1c70 CP: some cleanup for occupancy and empty state calculation
PW:  some cleanup in c_bands, timing, documentation
     removed obsolete "scf in/out correction"


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@214 c92efa57-630b-4861-b058-cf58834340f0
2003-05-19 17:46:44 +00:00
giannozz b25079f896 evc is dimensioned (npwx, nbnd) - various routines changed
(extensive changes to wfcinit, rotate_wfc, ccginitg).
Residual wrong dimension et(nbndx,nkstot) removed.
Common efield_0 in PW renamed extfield to avoid name
clash with common efield in PH (PGI compiler)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@148 c92efa57-630b-4861-b058-cf58834340f0
2003-04-08 07:13:30 +00:00
giannozz 9e3a2de758 Support for lahey compiler added: "error" renamed to "errore", "rnd" to "rndx"
bug in io_base fixed
PARA => __PARA
cinterpolate moved into interpolate


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@86 c92efa57-630b-4861-b058-cf58834340f0
2003-02-21 14:57:00 +00:00
giannozz d852392cab module allocate, calls to mallocate, mfree removed
pointers replaced by allocatable whenever possible


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@56 c92efa57-630b-4861-b058-cf58834340f0
2003-02-07 16:04:36 +00:00
giannozz ac9f2144c0 O-sesame
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2 c92efa57-630b-4861-b058-cf58834340f0
2003-01-19 21:58:50 +00:00