The Elk Code
symmat.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2013 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
5 
6 subroutine symmat(al)
7 use modmain
8 implicit none
9 ! arguments
10 real(8), intent(inout) :: al(3,3)
11 ! local variables
12 integer isym,lspl
13 real(8) as(3,3),s(3,3)
14 real(8) b(3,3),c(3,3),t1
15 ! make symmetric average
16 as(1:3,1:3)=0.d0
17 do isym=1,nsymcrys
18  lspl=lsplsymc(isym)
19  s(1:3,1:3)=dble(symlat(1:3,1:3,lspl))
20  call r3mtm(s,al,b)
21  call r3mm(b,s,c)
22  as(1:3,1:3)=as(1:3,1:3)+c(1:3,1:3)
23 end do
24 ! normalise
25 t1=1.d0/dble(nsymcrys)
26 al(1:3,1:3)=t1*as(1:3,1:3)
27 end subroutine
28 
subroutine symmat(al)
Definition: symmat.f90:7
integer nsymcrys
Definition: modmain.f90:358
integer, dimension(3, 3, 48) symlat
Definition: modmain.f90:344
pure subroutine r3mtm(a, b, c)
Definition: r3mtm.f90:10
integer, dimension(maxsymcrys) lsplsymc
Definition: modmain.f90:364
pure subroutine r3mm(a, b, c)
Definition: r3mm.f90:10