Line data Source code
1 : !--------------------------------------------------------------------------------
2 : ! Copyright (c) 2018 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
3 : ! This file is part of FLEUR and available as free software under the conditions
4 : ! of the MIT license as expressed in the LICENSE file in more detail.
5 : !--------------------------------------------------------------------------------
6 :
7 : MODULE m_checkdopall
8 :
9 : CONTAINS
10 :
11 12 : SUBROUTINE checkDOPAll(input,sphhar,stars,atoms,sym,vacuum ,&
12 : cell,potden,ispin,potdenIm)
13 :
14 : USE m_sphpts
15 : USE m_checkdop
16 : USE m_types
17 : USE m_cylpts
18 : USE m_points
19 : USE m_juDFT
20 :
21 : IMPLICIT NONE
22 :
23 : TYPE(t_input),INTENT(IN) :: input
24 :
25 : TYPE(t_sphhar),intent(in) :: sphhar
26 : TYPE(t_stars),INTENT(IN) :: stars
27 : TYPE(t_atoms),INTENT(IN) :: atoms
28 : TYPE(t_sym),INTENT(IN) :: sym
29 : TYPE(t_vacuum),INTENT(IN) :: vacuum
30 :
31 : TYPE(t_cell),INTENT(IN) :: cell
32 : TYPE(t_potden),INTENT(IN) :: potden
33 : TYPE(t_potden),INTENT(IN),OPTIONAL :: potdenIm
34 :
35 : INTEGER, INTENT(IN) :: ispin
36 :
37 : INTEGER :: npd, nat, n, ivac
38 : REAL :: signum
39 :
40 12 : REAL :: xp(3,(atoms%lmaxd+1+MOD(atoms%lmaxd+1,2))*(2*atoms%lmaxd+1))!(3,dimension%nspd)
41 :
42 12 : CALL timestart("checkDOPAll")
43 :
44 12 : IF ((input%film)) THEN
45 : !---> vacuum boundaries
46 0 : npd = MIN(SIZE(xp,2),25)
47 0 : CALL points(xp,npd)
48 0 : DO ivac = 1,vacuum%nvac
49 0 : signum = 3.0 - 2.0*ivac
50 0 : xp(3,:npd) = signum*cell%z1/cell%amat(3,3)
51 0 : IF (PRESENT(potdenIm)) THEN
52 : CALL checkdop(xp,npd,0,0,ivac,1,ispin,atoms,&
53 0 : sphhar,stars,sym,vacuum,cell ,potden,potdenIm)
54 : ELSE
55 : CALL checkdop(xp,npd,0,0,ivac,1,ispin,atoms,&
56 0 : sphhar,stars,sym,vacuum,cell ,potden)
57 : END IF
58 : END DO
59 : END IF
60 :
61 : !---> m.t. boundaries
62 36 : DO n = 1, atoms%ntype
63 24 : nat = atoms%firstAtom(n)
64 24 : CALL sphpts(xp,SIZE(xp,2),atoms%rmt(n),atoms%pos(1,nat))
65 36 : IF (PRESENT(potdenIm)) THEN
66 : CALL checkdop(xp,SIZE(xp,2),n,nat,0,-1,ispin,&
67 0 : atoms,sphhar,stars,sym,vacuum,cell ,potden,potdenIm)
68 : ELSE
69 : CALL checkdop(xp,SIZE(xp,2),n,nat,0,-1,ispin,&
70 24 : atoms,sphhar,stars,sym,vacuum,cell ,potden)
71 : END IF
72 : END DO
73 :
74 12 : CALL timestop("checkDOPAll")
75 :
76 12 : END SUBROUTINE checkDOPAll
77 :
78 : END MODULE m_checkdopall
|