TABLE OF CONTENTS
ABINIT/plint [ Functions ]
NAME
plint
FUNCTION
This simple routine gives the profile of the density integrated in xy plane belong the z-axes (it works only for orthogonal coordinates at present - it is better to use cut3d) integration in plane - with equilateral triangles (not really finished and not tested!)
COPYRIGHT
Copyright (C) 2002-2017 ABINIT group (PCasek,FF,XG) This file is distributed under the terms of the GNU General Public License, see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt . For the initials of contributors, see ~abinit/doc/developers/contributors.txt .
INPUTS
(this routine works on the data in the aimprom module)
OUTPUT
(this routine works on the data in the aimprom module) WARNING This file does not follow the ABINIT coding rules (yet)
PARENTS
drvaim
CHILDREN
vgh_rho
SOURCE
37 #if defined HAVE_CONFIG_H 38 #include "config.h" 39 #endif 40 41 #include "abi_common.h" 42 43 subroutine plint() 44 45 use m_profiling_abi 46 47 use defs_basis 48 use defs_aimprom 49 50 !This section has been created automatically by the script Abilint (TD). 51 !Do not modify the following lines by hand. 52 #undef ABI_FUNC 53 #define ABI_FUNC 'plint' 54 use interfaces_63_bader, except_this_one => plint 55 !End of the abilint section 56 57 implicit none 58 59 !Arguments ------------------------------------ 60 61 !Local variables ------------------------------ 62 !scalars 63 integer,parameter :: nd=150,ng=300 64 integer :: cod,iat,ii,ipos,jj,kk,nn 65 real(dp) :: dd,ee,ff,gg,hh,igr,rho,ss 66 logical :: prep 67 !arrays 68 real(dp) :: grho(3),hrho(3,3),vv(3),xl(nd+1),xs(nd) 69 real(dp),allocatable :: uu(:) 70 71 ! ********************************************************************* 72 73 ff=rprimd(1,1)/nd 74 ss=2._dp/sqrt(3._dp)*rprimd(2,2)/rprimd(1,1)*nd 75 nn=int(ss) 76 gg=sqrt(3._dp)/2.*ff 77 hh=rprimd(2,2)-nn/nd*sqrt(3._dp)/2.*rprimd(1,1) 78 ee=hh/sqrt(3._dp) 79 hh=hh/2. 80 ss=sqrt(3._dp)*ff*ff/4. 81 dd=ee*ff/2. 82 83 do ii=1,nd 84 xl(ii)=ii*ff 85 xs(ii)=ff/2.+ii*ff 86 end do 87 xl(nd+1)=rprimd(1,1) 88 89 ABI_ALLOCATE(uu,(nn+3)) 90 91 uu(1)=0._dp 92 uu(nn+3)=rprimd(2,2) 93 do ii=2,nn+2 94 uu(ii)=hh+(ii-1)*gg 95 end do 96 igr=0._dp 97 prep=.true. 98 do kk=1,ng 99 igr=0._dp 100 vv(3)=(kk-1)*rprimd(3,3)/ng 101 do ii=1,nn+3 102 vv(2)=uu(ii) 103 do jj=1,nd 104 if (prep) then 105 vv(1)=xl(jj) 106 prep=.false. 107 else 108 vv(1)=xs(jj) 109 prep=.true. 110 end if 111 call vgh_rho(vv,rho,grho,hrho,dd,iat,ipos,cod) 112 if ((ii==1).or.(ii==nn+3)) then 113 igr=igr+dd*rho 114 elseif ((ii==2).or.(ii==nn+2)) then 115 igr=igr+(dd+ss)*rho 116 else 117 igr=igr+ss*2*rho 118 end if 119 end do 120 end do 121 write(untp,'(2E16.8)') vv(3), igr 122 end do 123 ABI_DEALLOCATE(uu) 124 end subroutine plint