Line data Source code
1 : !--------------------------------------------------------------------------------
2 : ! Copyright (c) 2017 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_make_sphhar
8 : CONTAINS
9 160 : SUBROUTINE make_sphhar(l_write,atoms,sphhar,sym,cell )
10 : USE m_types_setup
11 : USE m_localsym
12 :
13 : LOGICAL,INTENT(IN) :: l_write
14 : TYPE(t_atoms),INTENT(inout)::atoms
15 : TYPE(t_sphhar),INTENT(inout)::sphhar
16 : TYPE(t_cell),INTENT(in)::cell
17 : TYPE(t_sym),INTENT(inout)::sym
18 :
19 :
20 :
21 :
22 : INTEGER :: ii,i,j
23 : INTEGER, ALLOCATABLE :: lmx1(:), nq1(:), nlhtp1(:)
24 :
25 : ! Dimensioning of lattice harmonics
26 :
27 160 : ALLOCATE(sphhar%clnu(1,1,1),sphhar%nlh(1),sphhar%llh(1,1),sphhar%nmem(1,1),sphhar%mlh(1,1,1))
28 160 : sphhar%ntypsd = 0
29 : CALL local_sym(l_write,atoms%lmaxd,atoms%lmax,sym%nop,sym%mrot,sym%tau,&
30 : atoms%nat,atoms%ntype,atoms%neq,cell%amat,cell%bmat,&
31 : atoms%taual,sphhar%nlhd,sphhar%memd,sphhar%ntypsd,.TRUE.,&
32 : atoms%nlhtyp,sphhar%nlh,sphhar%llh,&
33 160 : sphhar%nmem,sphhar%mlh,sphhar%clnu)
34 :
35 160 : DEALLOCATE(sphhar%clnu,sphhar%nlh,sphhar%llh,sphhar%nmem,sphhar%mlh)
36 :
37 800 : ALLOCATE(sphhar%clnu(sphhar%memd,0:sphhar%nlhd,sphhar%ntypsd))
38 640 : ALLOCATE(sphhar%llh(0:sphhar%nlhd,sphhar%ntypsd))
39 800 : ALLOCATE(sphhar%mlh(sphhar%memd,0:sphhar%nlhd,sphhar%ntypsd))
40 800 : ALLOCATE(sphhar%nlh(sphhar%ntypsd),sphhar%nmem(0:sphhar%nlhd,sphhar%ntypsd))
41 :
42 24438 : sphhar%clnu = CMPLX(0.0,0.0)
43 7846 : sphhar%llh = 0
44 24438 : sphhar%mlh = 0
45 346 : sphhar%nlh = 0
46 7846 : sphhar%nmem = 0
47 :
48 : ! Generate lattice harmonics
49 :
50 : CALL local_sym(l_write,atoms%lmaxd,atoms%lmax,sym%nop,sym%mrot,sym%tau,&
51 : atoms%nat,atoms%ntype,atoms%neq,cell%amat,cell%bmat,atoms%taual,&
52 : sphhar%nlhd,sphhar%memd,sphhar%ntypsd,.FALSE.,&
53 160 : atoms%nlhtyp,sphhar%nlh,sphhar%llh,sphhar%nmem,sphhar%mlh,sphhar%clnu)
54 160 : sym%nsymt = sphhar%ntypsd
55 : ! oneD%mrot1(:,:,:) = sym%mrot(:,:,:)
56 : ! oneD%tau1(:,:) = sym%tau(:,:)
57 160 : END SUBROUTINE make_sphhar
58 : END MODULE m_make_sphhar
|