Commit Graph

7 Commits

Author SHA1 Message Date
umari 3dfd7eb4cb variable entrospin is correctely assigned
However this does not affect previous results

P.U.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2891 c92efa57-630b-4861-b058-cf58834340f0
2006-03-08 16:50:57 +00:00
giannozz 1e5f5a5002 References updated, some cleanup of unused routines
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2463 c92efa57-630b-4861-b058-cf58834340f0
2005-11-11 16:11:22 +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
ballabio 348adb1cc1 end --> end function [Gerardo]
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1868 c92efa57-630b-4861-b058-cf58834340f0
2005-05-17 16:46:38 +00:00
sbraccia a00aac0e25 header containing the GPL license added where missing and made omogeneous.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1865 c92efa57-630b-4861-b058-cf58834340f0
2005-05-16 19:19:04 +00:00
ballabio 8604e671af end --> end subroutine [Gerardo]
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1858 c92efa57-630b-4861-b058-cf58834340f0
2005-05-12 13:23:41 +00:00
cavazzon 56322ee7d7 - added ensemble dft
- added ensemble dft / conjugate gradient / electric field
  from Paolo Umari / Marzari code
- NOT YET TESTED!!


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1524 c92efa57-630b-4861-b058-cf58834340f0
2004-12-21 15:48:19 +00:00