pwdft  0.1
PW-DFT code for education
libtetrabz_common Module Reference

Functions/Subroutines

subroutine, public libtetrabz_initialize (ltetra, nge, ngw, bvec, linterpol, wlsm, nk_local, nt_local, nkBZ, ik_global, ik_local, kvec, comm)
 
subroutine, public libtetrabz_sort (n, key, indx)
 
subroutine, public libtetrabz_interpol_indx (ng, kvec, kintp, wintp)
 
subroutine, public libtetrabz_tsmall_a1 (e, V, tsmall)
 
subroutine, public libtetrabz_tsmall_b1 (e, V, tsmall)
 
subroutine, public libtetrabz_tsmall_b2 (e, V, tsmall)
 
subroutine, public libtetrabz_tsmall_b3 (e, V, tsmall)
 
subroutine, public libtetrabz_tsmall_c1 (e, V, tsmall)
 
subroutine, public libtetrabz_tsmall_c2 (e, V, tsmall)
 
subroutine, public libtetrabz_tsmall_c3 (e, V, tsmall)
 
subroutine, public libtetrabz_triangle_a1 (e, V, tsmall)
 
subroutine, public libtetrabz_triangle_b1 (e, V, tsmall)
 
subroutine, public libtetrabz_triangle_b2 (e, V, tsmall)
 
subroutine, public libtetrabz_triangle_c1 (e, V, tsmall)
 
subroutine, public libtetrabz_mpisum_d (comm, scaler)
 
subroutine, public libtetrabz_mpisum_dv (comm, ndim, vector)
 
subroutine, public libtetrabz_mpisum_zv (comm, ndim, vector)
 

Function/Subroutine Documentation

◆ libtetrabz_initialize()

subroutine, public libtetrabz_common::libtetrabz_initialize ( integer, intent(in)  ltetra,
integer, dimension(3), intent(in)  nge,
integer, dimension(3), intent(in)  ngw,
real(8), dimension(3,3), intent(in)  bvec,
logical, intent(out)  linterpol,
real(8), dimension(4,20), intent(out)  wlsm,
integer, intent(out)  nk_local,
integer, intent(out)  nt_local,
integer, intent(out)  nkBZ,
integer, dimension(:,:), intent(out), allocatable  ik_global,
integer, dimension(:,:), intent(out), allocatable  ik_local,
real(8), dimension(:,:), intent(out), allocatable  kvec,
integer, intent(in), optional  comm 
)

Definition at line 40 of file libtetrabz_common.F90.

40  !
41  IMPLICIT NONE
42  !
43  INTEGER,INTENT(IN) :: ltetra, nge(3), ngw(3)
44  REAL(8),INTENT(IN) :: bvec(3,3)
45  LOGICAL,INTENT(OUT) :: linterpol
46  REAL(8),INTENT(OUT) :: wlsm(4,20)
47  INTEGER,INTENT(OUT) :: nk_local, nt_local, nkBZ
48  INTEGER,INTENT(OUT),ALLOCATABLE :: ik_global(:,:), ik_local(:,:)
49  REAL(8),INTENT(OUT),ALLOCATABLE :: kvec(:,:)
50  INTEGER,INTENT(IN),OPTIONAL :: comm
51  !
52  INTEGER :: itype, i1, i2, i3, it, divvec(4,4), ivvec0(4), ivvec(3,20,6)
53  REAL(8) :: l(4), bvec2(3,3), bvec3(3,4)
54  !
55  nkbz = product(nge(1:3))
56  linterpol = .NOT. all(nge(1:3) == ngw(1:3))
57  !
58  DO i1 = 1, 3
59  bvec2(1:3,i1) = bvec(1:3,i1) / dble(nge(i1))
60  END DO
61  !
62  bvec3(1:3,1) = -bvec2(1:3,1) + bvec2(1:3,2) + bvec2(1:3,3)
63  bvec3(1:3,2) = bvec2(1:3,1) - bvec2(1:3,2) + bvec2(1:3,3)
64  bvec3(1:3,3) = bvec2(1:3,1) + bvec2(1:3,2) - bvec2(1:3,3)
65  bvec3(1:3,4) = bvec2(1:3,1) + bvec2(1:3,2) + bvec2(1:3,3)
66  !
67  ! length of delta bvec
68  !
69  DO i1 = 1, 4
70  l(i1) = dot_product(bvec3(1:3,i1),bvec3(1:3,i1))
71  END DO
72  !
73  itype = minloc(l(1:4),1)
74  !
75  ! start & last
76  !
77  ivvec0(1:4) = (/ 0, 0, 0, 0 /)
78  !
79  divvec(1:4,1) = (/ 1, 0, 0, 0 /)
80  divvec(1:4,2) = (/ 0, 1, 0, 0 /)
81  divvec(1:4,3) = (/ 0, 0, 1, 0 /)
82  divvec(1:4,4) = (/ 0, 0, 0, 1 /)
83  !
84  ivvec0(itype) = 1
85  divvec(itype, itype) = - 1
86  !
87  ! Corners of tetrahedra
88  !
89  it = 0
90  DO i1 = 1, 3
91  DO i2 = 1, 3
92  IF(i2 == i1) cycle
93  DO i3 = 1, 3
94  IF(i3 == i1 .OR. i3 == i2) cycle
95  !
96  it = it + 1
97  !
98  ivvec(1:3,1,it) = ivvec0(1:3)
99  ivvec(1:3,2,it) = ivvec(1:3,1,it) + divvec(1:3,i1)
100  ivvec(1:3,3,it) = ivvec(1:3,2,it) + divvec(1:3,i2)
101  ivvec(1:3,4,it) = ivvec(1:3,3,it) + divvec(1:3,i3)
102  !
103  END DO
104  END DO
105  END DO
106  !
107  ! Additional points
108  !
109  ivvec(1:3, 5,1:6) = 2 * ivvec(1:3,1,1:6) - ivvec(1:3,2,1:6)
110  ivvec(1:3, 6,1:6) = 2 * ivvec(1:3,2,1:6) - ivvec(1:3,3,1:6)
111  ivvec(1:3, 7,1:6) = 2 * ivvec(1:3,3,1:6) - ivvec(1:3,4,1:6)
112  ivvec(1:3, 8,1:6) = 2 * ivvec(1:3,4,1:6) - ivvec(1:3,1,1:6)
113  !
114  ivvec(1:3, 9,1:6) = 2 * ivvec(1:3,1,1:6) - ivvec(1:3,3,1:6)
115  ivvec(1:3,10,1:6) = 2 * ivvec(1:3,2,1:6) - ivvec(1:3,4,1:6)
116  ivvec(1:3,11,1:6) = 2 * ivvec(1:3,3,1:6) - ivvec(1:3,1,1:6)
117  ivvec(1:3,12,1:6) = 2 * ivvec(1:3,4,1:6) - ivvec(1:3,2,1:6)
118  !
119  ivvec(1:3,13,1:6) = 2 * ivvec(1:3,1,1:6) - ivvec(1:3,4,1:6)
120  ivvec(1:3,14,1:6) = 2 * ivvec(1:3,2,1:6) - ivvec(1:3,1,1:6)
121  ivvec(1:3,15,1:6) = 2 * ivvec(1:3,3,1:6) - ivvec(1:3,2,1:6)
122  ivvec(1:3,16,1:6) = 2 * ivvec(1:3,4,1:6) - ivvec(1:3,3,1:6)
123  !
124  ivvec(1:3,17,1:6) = ivvec(1:3,4,1:6) - ivvec(1:3,1,1:6) + ivvec(1:3,2,1:6)
125  ivvec(1:3,18,1:6) = ivvec(1:3,1,1:6) - ivvec(1:3,2,1:6) + ivvec(1:3,3,1:6)
126  ivvec(1:3,19,1:6) = ivvec(1:3,2,1:6) - ivvec(1:3,3,1:6) + ivvec(1:3,4,1:6)
127  ivvec(1:3,20,1:6) = ivvec(1:3,3,1:6) - ivvec(1:3,4,1:6) + ivvec(1:3,1,1:6)
128  !
129  IF(ltetra == 1) THEN
130  !
131  !WRITE(*,*) "[libtetrabz] Linear tetrahedron method is used."
132  !
133  wlsm(1:4,1:20) = 0.0d0
134  wlsm(1,1) = 1.0d0
135  wlsm(2,2) = 1.0d0
136  wlsm(3,3) = 1.0d0
137  wlsm(4,4) = 1.0d0
138  !
139  ELSE IF(ltetra == 2) THEN
140  !
141  !WRITE(*,*) "[libtetrabz] Improved tetrahedron method is used."
142  !
143  wlsm(1, 1: 4) = dble((/1440, 0, 30, 0/))
144  wlsm(2, 1: 4) = dble((/ 0, 1440, 0, 30/))
145  wlsm(3, 1: 4) = dble((/ 30, 0, 1440, 0/))
146  wlsm(4, 1: 4) = dble((/ 0, 30, 0, 1440/))
147  !
148  wlsm(1, 5: 8) = dble((/ -38, 7, 17, -28/))
149  wlsm(2, 5: 8) = dble((/ -28, -38, 7, 17/))
150  wlsm(3, 5: 8) = dble((/ 17, -28, -38, 7/))
151  wlsm(4, 5: 8) = dble((/ 7, 17, -28, -38/))
152  !
153  wlsm(1, 9:12) = dble((/ -56, 9, -46, 9/))
154  wlsm(2, 9:12) = dble((/ 9, -56, 9, -46/))
155  wlsm(3, 9:12) = dble((/ -46, 9, -56, 9/))
156  wlsm(4, 9:12) = dble((/ 9, -46, 9, -56/))
157  !
158  wlsm(1,13:16) = dble((/ -38, -28, 17, 7/))
159  wlsm(2,13:16) = dble((/ 7, -38, -28, 17/))
160  wlsm(3,13:16) = dble((/ 17, 7, -38, -28/))
161  wlsm(4,13:16) = dble((/ -28, 17, 7, -38/))
162  !
163  wlsm(1,17:20) = dble((/ -18, -18, 12, -18/))
164  wlsm(2,17:20) = dble((/ -18, -18, -18, 12/))
165  wlsm(3,17:20) = dble((/ 12, -18, -18, -18/))
166  wlsm(4,17:20) = dble((/ -18, 12, -18, -18/))
167  !
168  wlsm(1:4,1:20) = wlsm(1:4,1:20) / 1260d0
169  !
170  ELSE
171  !
172  WRITE(*,*) "[libtetrabz] STOP! ltetrta is invalid."
173  stop
174  !
175  END IF
176  !
177  IF (PRESENT(comm)) THEN
178  CALL libtetrabz_kgrid(linterpol,ivvec,nge,nkbz,nk_local,nt_local,ik_global,ik_local,kvec,comm)
179  ELSE
180  CALL libtetrabz_kgrid(linterpol,ivvec,nge,nkbz,nk_local,nt_local,ik_global,ik_local,kvec)
181  END IF
182  !

Referenced by libtetrabz_dbldelta_mod::libtetrabz_dbldelta(), libtetrabz_dblstep_mod::libtetrabz_dblstep(), libtetrabz_dos_mod::libtetrabz_dos(), libtetrabz_occ_mod::libtetrabz_fermieng(), libtetrabz_fermigr_mod::libtetrabz_fermigr(), libtetrabz_dos_mod::libtetrabz_intdos(), libtetrabz_occ_mod::libtetrabz_occ(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx(), and libtetrabz_polstat_mod::libtetrabz_polstat().

Here is the caller graph for this function:

◆ libtetrabz_sort()

subroutine, public libtetrabz_common::libtetrabz_sort ( integer, intent(in)  n,
real(8), dimension(n), intent(inout)  key,
integer, dimension(n), intent(out)  indx 
)

Definition at line 308 of file libtetrabz_common.F90.

308  !
309  IMPLICIT NONE
310  !
311  integer,INTENT(IN) :: n
312  REAL(8),INTENT(inout) :: key(n)
313  INTEGER,INTENT(OUT) :: indx(n)
314  !
315  INTEGER :: i, i0, indx0
316  REAL(8) :: key0
317  !
318  DO i = 1, n
319  indx(i) = i
320  END DO
321  !
322  DO i = 1, n - 1
323  key0 = minval(key(i+1:n))
324  i0 = minloc(key(i+1:n),1) + i
325  IF(key(i) > key0) THEN
326  key(i0) = key(i)
327  key(i) = key0
328  !
329  indx0 = indx(i0)
330  indx(i0) = indx(i)
331  indx(i) = indx0
332  END IF
333  END DO
334  !

Referenced by libtetrabz_dbldelta_mod::libtetrabz_dbldelta2(), libtetrabz_dbldelta_mod::libtetrabz_dbldelta_main(), libtetrabz_dblstep_mod::libtetrabz_dblstep2(), libtetrabz_dblstep_mod::libtetrabz_dblstep_main(), libtetrabz_dos_mod::libtetrabz_dos_main(), libtetrabz_fermigr_mod::libtetrabz_fermigr2(), libtetrabz_fermigr_mod::libtetrabz_fermigr3(), libtetrabz_fermigr_mod::libtetrabz_fermigr_main(), libtetrabz_dos_mod::libtetrabz_intdos_main(), libtetrabz_occ_mod::libtetrabz_occ_main(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx2(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx3(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx_main(), libtetrabz_polstat_mod::libtetrabz_polstat2(), libtetrabz_polstat_mod::libtetrabz_polstat3(), and libtetrabz_polstat_mod::libtetrabz_polstat_main().

Here is the caller graph for this function:

◆ libtetrabz_interpol_indx()

subroutine, public libtetrabz_common::libtetrabz_interpol_indx ( integer, dimension(3), intent(in)  ng,
real(8), dimension(3), intent(in)  kvec,
integer, dimension(8), intent(out)  kintp,
real(8), dimension(8), intent(out)  wintp 
)

Definition at line 340 of file libtetrabz_common.F90.

340  !
341  IMPLICIT NONE
342  !
343  INTEGER,INTENT(in) :: ng(3)
344  REAL(8),INTENT(in) :: kvec(3)
345  INTEGER,INTENT(out) :: kintp(8)
346  REAL(8),INTENT(out) :: wintp(8)
347  !
348  INTEGER :: ii
349  REAL(8) :: xv(3)
350  integer :: ikv0(3), ikv1(3), i1, i2, i3
351  !
352  xv(1:3) = kvec(1:3) * dble(ng(1:3))
353  ikv0(1:3) = floor(xv(1:3))
354  xv(1:3) = xv(1:3) - dble(ikv0(1:3))
355  !
356  ii = 0
357  DO i1 = 0, 1
358  DO i2 = 0, 1
359  DO i3 = 0, 1
360  !
361  ii = ii + 1
362  !
363  ikv1(1:3) = ikv0(1:3) + (/i1, i2, i3/)
364  ikv1(1:3) = modulo(ikv1(1:3), ng(1:3))
365  kintp(ii) = 1 + ikv1(1) + ng(1) * ikv1(2) + ng(1) * ng(2) * ikv1(3)
366  !
367  wintp(ii) = xv(1)**i1 * (1.0d0 - xv(1))**(1 - i1) &
368  & * xv(2)**i2 * (1.0d0 - xv(2))**(1 - i2) &
369  & * xv(3)**i3 * (1.0d0 - xv(3))**(1 - i3)
370  !
371  END DO
372  END DO
373  END DO
374  !

Referenced by libtetrabz_dbldelta_mod::libtetrabz_dbldelta(), libtetrabz_dblstep_mod::libtetrabz_dblstep(), libtetrabz_dos_mod::libtetrabz_dos(), libtetrabz_occ_mod::libtetrabz_fermieng(), libtetrabz_fermigr_mod::libtetrabz_fermigr(), libtetrabz_dos_mod::libtetrabz_intdos(), libtetrabz_occ_mod::libtetrabz_occ(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx(), and libtetrabz_polstat_mod::libtetrabz_polstat().

Here is the caller graph for this function:

◆ libtetrabz_tsmall_a1()

subroutine, public libtetrabz_common::libtetrabz_tsmall_a1 ( real(8), dimension(4), intent(in)  e,
real(8), intent(out)  V,
real(8), dimension(4,4), intent(out)  tsmall 
)

Definition at line 380 of file libtetrabz_common.F90.

380  !
381  IMPLICIT NONE
382  !
383  REAL(8),INTENT(IN) :: e(4)
384  REAL(8),INTENT(OUT) :: V
385  REAL(8),INTENT(OUT) :: tsmall(4,4)
386  !
387  INTEGER :: ii
388  REAL(8) :: a(4,4)
389  !
390  DO ii = 1, 4
391  a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii))
392  END DO
393  !
394  v = a(2,1) * a(3,1) * a(4,1)
395  !
396  tsmall(1, 1:4) = (/ 1d0, 0d0, 0d0, 0d0/)
397  tsmall(2, 1:4) = (/a(1,2), a(2,1), 0d0, 0d0/)
398  tsmall(3, 1:4) = (/a(1,3), 0d0, a(3,1), 0d0/)
399  tsmall(4, 1:4) = (/a(1,4), 0d0, 0d0, a(4,1)/)
400  !

Referenced by libtetrabz_dblstep_mod::libtetrabz_dblstep2(), libtetrabz_dblstep_mod::libtetrabz_dblstep_main(), libtetrabz_fermigr_mod::libtetrabz_fermigr2(), libtetrabz_fermigr_mod::libtetrabz_fermigr_main(), libtetrabz_dos_mod::libtetrabz_intdos_main(), libtetrabz_occ_mod::libtetrabz_occ_main(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx2(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx_main(), libtetrabz_polstat_mod::libtetrabz_polstat2(), and libtetrabz_polstat_mod::libtetrabz_polstat_main().

Here is the caller graph for this function:

◆ libtetrabz_tsmall_b1()

subroutine, public libtetrabz_common::libtetrabz_tsmall_b1 ( real(8), dimension(4), intent(in)  e,
real(8), intent(out)  V,
real(8), dimension(4,4), intent(out)  tsmall 
)

Definition at line 406 of file libtetrabz_common.F90.

406  !
407  IMPLICIT NONE
408  !
409  REAL(8),INTENT(IN) :: e(4)
410  REAL(8),INTENT(OUT) :: V
411  REAL(8),INTENT(OUT) :: tsmall(4,4)
412  !
413  INTEGER :: ii
414  REAL(8) :: a(4,4)
415  !
416  DO ii = 1, 4
417  a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii))
418  END DO
419  !
420  v = a(3,1) * a(4,1) * a(2,4)
421  !
422  tsmall(1, 1:4) = (/ 1d0, 0d0, 0d0, 0d0/)
423  tsmall(2, 1:4) = (/a(1,3), 0d0, a(3,1), 0d0/)
424  tsmall(3, 1:4) = (/a(1,4), 0d0, 0d0, a(4,1)/)
425  tsmall(4, 1:4) = (/ 0d0, a(2,4), 0d0, a(4,2)/)
426  !

Referenced by libtetrabz_dblstep_mod::libtetrabz_dblstep2(), libtetrabz_dblstep_mod::libtetrabz_dblstep_main(), libtetrabz_fermigr_mod::libtetrabz_fermigr2(), libtetrabz_fermigr_mod::libtetrabz_fermigr_main(), libtetrabz_dos_mod::libtetrabz_intdos_main(), libtetrabz_occ_mod::libtetrabz_occ_main(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx2(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx_main(), libtetrabz_polstat_mod::libtetrabz_polstat2(), and libtetrabz_polstat_mod::libtetrabz_polstat_main().

Here is the caller graph for this function:

◆ libtetrabz_tsmall_b2()

subroutine, public libtetrabz_common::libtetrabz_tsmall_b2 ( real(8), dimension(4), intent(in)  e,
real(8), intent(out)  V,
real(8), dimension(4,4), intent(out)  tsmall 
)

Definition at line 432 of file libtetrabz_common.F90.

432  !
433  IMPLICIT NONE
434  !
435  REAL(8),INTENT(IN) :: e(4)
436  REAL(8),INTENT(OUT) :: V
437  REAL(8),INTENT(OUT) :: tsmall(4,4)
438  !
439  INTEGER :: ii
440  REAL(8) :: a(4,4)
441  !
442  DO ii = 1, 4
443  a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii))
444  END DO
445  !
446  v = a(3,2) * a(4,2)
447  !
448  tsmall(1, 1:4) = (/1d0, 0d0, 0d0, 0d0/)
449  tsmall(2, 1:4) = (/0d0, 1d0, 0d0, 0d0/)
450  tsmall(3, 1:4) = (/0d0, a(2,3), a(3,2), 0d0/)
451  tsmall(4, 1:4) = (/0d0, a(2,4), 0d0, a(4,2)/)
452  !

Referenced by libtetrabz_dblstep_mod::libtetrabz_dblstep2(), libtetrabz_dblstep_mod::libtetrabz_dblstep_main(), libtetrabz_fermigr_mod::libtetrabz_fermigr2(), libtetrabz_fermigr_mod::libtetrabz_fermigr_main(), libtetrabz_dos_mod::libtetrabz_intdos_main(), libtetrabz_occ_mod::libtetrabz_occ_main(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx2(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx_main(), libtetrabz_polstat_mod::libtetrabz_polstat2(), and libtetrabz_polstat_mod::libtetrabz_polstat_main().

Here is the caller graph for this function:

◆ libtetrabz_tsmall_b3()

subroutine, public libtetrabz_common::libtetrabz_tsmall_b3 ( real(8), dimension(4), intent(in)  e,
real(8), intent(out)  V,
real(8), dimension(4,4), intent(out)  tsmall 
)

Definition at line 458 of file libtetrabz_common.F90.

458  !
459  IMPLICIT NONE
460  !
461  REAL(8),INTENT(IN) :: e(4)
462  REAL(8),INTENT(OUT) :: V
463  REAL(8),INTENT(OUT) :: tsmall(4,4)
464  !
465  INTEGER :: ii
466  REAL(8) :: a(4,4)
467  !
468  DO ii = 1, 4
469  a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii))
470  END DO
471  !
472  v = a(2,3) * a(3,1) * a(4,2)
473  !
474  tsmall(1, 1:4) = (/ 1d0, 0d0, 0d0, 0d0/)
475  tsmall(2, 1:4) = (/a(1,3), 0d0, a(3,1), 0d0/)
476  tsmall(3, 1:4) = (/ 0d0, a(2,3), a(3,2), 0d0/)
477  tsmall(4, 1:4) = (/ 0d0, a(2,4), 0d0, a(4,2)/)
478  !

Referenced by libtetrabz_dblstep_mod::libtetrabz_dblstep2(), libtetrabz_dblstep_mod::libtetrabz_dblstep_main(), libtetrabz_fermigr_mod::libtetrabz_fermigr2(), libtetrabz_fermigr_mod::libtetrabz_fermigr_main(), libtetrabz_dos_mod::libtetrabz_intdos_main(), libtetrabz_occ_mod::libtetrabz_occ_main(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx2(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx_main(), libtetrabz_polstat_mod::libtetrabz_polstat2(), and libtetrabz_polstat_mod::libtetrabz_polstat_main().

Here is the caller graph for this function:

◆ libtetrabz_tsmall_c1()

subroutine, public libtetrabz_common::libtetrabz_tsmall_c1 ( real(8), dimension(4), intent(in)  e,
real(8), intent(out)  V,
real(8), dimension(4,4), intent(out)  tsmall 
)

Definition at line 484 of file libtetrabz_common.F90.

484  !
485  IMPLICIT NONE
486  !
487  REAL(8),INTENT(IN) :: e(4)
488  REAL(8),INTENT(OUT) :: V
489  REAL(8),INTENT(OUT) :: tsmall(4,4)
490  !
491  INTEGER :: ii
492  REAL(8) :: a(4,4)
493  !
494  DO ii = 1, 4
495  a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii))
496  END DO
497  !
498  v = a(4,3)
499  !
500  tsmall(1, 1:4) = (/1d0, 0d0, 0d0, 0d0/)
501  tsmall(2, 1:4) = (/0d0, 1d0, 0d0, 0d0/)
502  tsmall(3, 1:4) = (/0d0, 0d0, 1d0, 0d0/)
503  tsmall(4, 1:4) = (/0d0, 0d0, a(3,4), a(4,3)/)
504  !

Referenced by libtetrabz_dblstep_mod::libtetrabz_dblstep2(), libtetrabz_dblstep_mod::libtetrabz_dblstep_main(), libtetrabz_fermigr_mod::libtetrabz_fermigr2(), libtetrabz_fermigr_mod::libtetrabz_fermigr_main(), libtetrabz_dos_mod::libtetrabz_intdos_main(), libtetrabz_occ_mod::libtetrabz_occ_main(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx2(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx_main(), libtetrabz_polstat_mod::libtetrabz_polstat2(), and libtetrabz_polstat_mod::libtetrabz_polstat_main().

Here is the caller graph for this function:

◆ libtetrabz_tsmall_c2()

subroutine, public libtetrabz_common::libtetrabz_tsmall_c2 ( real(8), dimension(4), intent(in)  e,
real(8), intent(out)  V,
real(8), dimension(4,4), intent(out)  tsmall 
)

Definition at line 510 of file libtetrabz_common.F90.

510  !
511  IMPLICIT NONE
512  !
513  REAL(8),INTENT(IN) :: e(4)
514  REAL(8),INTENT(OUT) :: V
515  REAL(8),INTENT(OUT) :: tsmall(4,4)
516  !
517  INTEGER :: ii
518  REAL(8) :: a(4,4)
519  !
520  DO ii = 1, 4
521  a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii))
522  END DO
523  !
524  v = a(3,4) * a(4,2)
525  !
526  tsmall(1, 1:4) = (/1d0, 0d0, 0d0, 0d0/)
527  tsmall(2, 1:4) = (/0d0, 1d0, 0d0, 0d0/)
528  tsmall(3, 1:4) = (/0d0, a(2,4), 0d0, a(4,2)/)
529  tsmall(4, 1:4) = (/0d0, 0d0, a(3,4), a(4,3)/)
530  !

Referenced by libtetrabz_dblstep_mod::libtetrabz_dblstep2(), libtetrabz_dblstep_mod::libtetrabz_dblstep_main(), libtetrabz_fermigr_mod::libtetrabz_fermigr2(), libtetrabz_fermigr_mod::libtetrabz_fermigr_main(), libtetrabz_dos_mod::libtetrabz_intdos_main(), libtetrabz_occ_mod::libtetrabz_occ_main(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx2(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx_main(), libtetrabz_polstat_mod::libtetrabz_polstat2(), and libtetrabz_polstat_mod::libtetrabz_polstat_main().

Here is the caller graph for this function:

◆ libtetrabz_tsmall_c3()

subroutine, public libtetrabz_common::libtetrabz_tsmall_c3 ( real(8), dimension(4), intent(in)  e,
real(8), intent(out)  V,
real(8), dimension(4,4), intent(out)  tsmall 
)

Definition at line 536 of file libtetrabz_common.F90.

536  !
537  IMPLICIT NONE
538  !
539  REAL(8),INTENT(IN) :: e(4)
540  REAL(8),INTENT(OUT) :: V
541  REAL(8),INTENT(OUT) :: tsmall(4,4)
542  !
543  INTEGER :: ii
544  REAL(8) :: a(4,4)
545  !
546  DO ii = 1, 4
547  a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii))
548  END DO
549  !
550  v = a(3,4) * a(2,4) * a(4,1)
551  !
552  tsmall(1, 1:4) = (/ 1d0, 0d0, 0d0, 0d0/)
553  tsmall(2, 1:4) = (/a(1,4), 0d0, 0d0, a(4,1)/)
554  tsmall(3, 1:4) = (/ 0d0, a(2,4), 0d0, a(4,2)/)
555  tsmall(4, 1:4) = (/ 0d0, 0d0, a(3,4), a(4,3)/)
556  !

Referenced by libtetrabz_dblstep_mod::libtetrabz_dblstep2(), libtetrabz_dblstep_mod::libtetrabz_dblstep_main(), libtetrabz_fermigr_mod::libtetrabz_fermigr2(), libtetrabz_fermigr_mod::libtetrabz_fermigr_main(), libtetrabz_dos_mod::libtetrabz_intdos_main(), libtetrabz_occ_mod::libtetrabz_occ_main(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx2(), libtetrabz_polcmplx_mod::libtetrabz_polcmplx_main(), libtetrabz_polstat_mod::libtetrabz_polstat2(), and libtetrabz_polstat_mod::libtetrabz_polstat_main().

Here is the caller graph for this function:

◆ libtetrabz_triangle_a1()

subroutine, public libtetrabz_common::libtetrabz_triangle_a1 ( real(8), dimension(4), intent(in)  e,
real(8), intent(out)  V,
real(8), dimension(3,4), intent(out)  tsmall 
)

Definition at line 562 of file libtetrabz_common.F90.

562  !
563  IMPLICIT NONE
564  !
565  REAL(8),INTENT(IN) :: e(4)
566  REAL(8),INTENT(OUT) :: V
567  REAL(8),INTENT(OUT) :: tsmall(3,4)
568  !
569  INTEGER :: ii
570  REAL(8) :: a(4,4)
571  !
572  DO ii = 1, 4
573  a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii))
574  END DO
575  !
576  !V = 3d0 * a(2,1) * a(3,1) * a(4,1) / (0d0 - e(1))
577  v = 3d0 * a(2,1) * a(3,1) / (e(4) - e(1))
578  !
579  tsmall(1,1:4) = (/a(1,2), a(2,1), 0d0, 0d0/)
580  tsmall(2,1:4) = (/a(1,3), 0d0, a(3,1), 0d0/)
581  tsmall(3,1:4) = (/a(1,4), 0d0, 0d0, a(4,1)/)
582  !

Referenced by libtetrabz_dbldelta_mod::libtetrabz_dbldelta_main(), libtetrabz_dos_mod::libtetrabz_dos_main(), and libtetrabz_fermigr_mod::libtetrabz_fermigr3().

Here is the caller graph for this function:

◆ libtetrabz_triangle_b1()

subroutine, public libtetrabz_common::libtetrabz_triangle_b1 ( real(8), dimension(4), intent(in)  e,
real(8), intent(out)  V,
real(8), dimension(3,4), intent(out)  tsmall 
)

Definition at line 588 of file libtetrabz_common.F90.

588  !
589  IMPLICIT NONE
590  !
591  REAL(8),INTENT(IN) :: e(4)
592  REAL(8),INTENT(OUT) :: V
593  REAL(8),INTENT(OUT) :: tsmall(3,4)
594  !
595  INTEGER :: ii
596  REAL(8) :: a(4,4)
597  !
598  DO ii = 1, 4
599  a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii))
600  END DO
601  !
602  !V = 3d0 * a(3,1) * a(4,1) * a(2,4) / (0d0 - e(1))
603  v = 3d0 * a(4,1) * a(2,4) / (e(3) - e(1))
604  !
605  tsmall(1,1:4) = (/a(1,3), 0d0, a(3,1), 0d0/)
606  tsmall(2,1:4) = (/a(1,4), 0d0, 0d0, a(4,1)/)
607  tsmall(3,1:4) = (/ 0d0, a(2,4), 0d0, a(4,2)/)
608  !

Referenced by libtetrabz_dbldelta_mod::libtetrabz_dbldelta_main(), libtetrabz_dos_mod::libtetrabz_dos_main(), and libtetrabz_fermigr_mod::libtetrabz_fermigr3().

Here is the caller graph for this function:

◆ libtetrabz_triangle_b2()

subroutine, public libtetrabz_common::libtetrabz_triangle_b2 ( real(8), dimension(4), intent(in)  e,
real(8), intent(out)  V,
real(8), dimension(3,4), intent(out)  tsmall 
)

Definition at line 614 of file libtetrabz_common.F90.

614  !
615  IMPLICIT NONE
616  !
617  REAL(8),INTENT(IN) :: e(4)
618  REAL(8),INTENT(OUT) :: V
619  REAL(8),INTENT(OUT) :: tsmall(3,4)
620  !
621  INTEGER :: ii
622  REAL(8) :: a(4,4)
623  !
624  DO ii = 1, 4
625  a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii))
626  END DO
627  !
628  !V = 3d0 * a(2,3) * a(3,1) * a(4,2) / (0d0 - e(1))
629  v = 3d0 * a(2,3) * a(4,2) / (e(3) - e(1))
630  !
631  tsmall(1,1:4) = (/a(1,3), 0d0, a(3,1), 0d0/)
632  tsmall(2,1:4) = (/ 0d0, a(2,3), a(3,2), 0d0/)
633  tsmall(3,1:4) = (/ 0d0, a(2,4), 0d0, a(4,2)/)
634  !

Referenced by libtetrabz_dbldelta_mod::libtetrabz_dbldelta_main(), libtetrabz_dos_mod::libtetrabz_dos_main(), and libtetrabz_fermigr_mod::libtetrabz_fermigr3().

Here is the caller graph for this function:

◆ libtetrabz_triangle_c1()

subroutine, public libtetrabz_common::libtetrabz_triangle_c1 ( real(8), dimension(4), intent(in)  e,
real(8), intent(out)  V,
real(8), dimension(3,4), intent(out)  tsmall 
)

Definition at line 640 of file libtetrabz_common.F90.

640  !
641  IMPLICIT NONE
642  !
643  REAL(8),INTENT(IN) :: e(4)
644  REAL(8),INTENT(OUT) :: V
645  REAL(8),INTENT(OUT) :: tsmall(3,4)
646  !
647  INTEGER :: ii
648  REAL(8) :: a(4,4)
649  !
650  DO ii = 1, 4
651  a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii))
652  END DO
653  !
654  !V = 3d0 * a(1,4) * a(2,4) * a(3,4) / (e(4) - 0d0)
655  v = 3d0 * a(1,4) * a(2,4) / (e(4) - e(3))
656  !
657  tsmall(1,1:4) = (/a(1,4), 0d0, 0d0, a(4,1)/)
658  tsmall(2,1:4) = (/ 0d0, a(2,4), 0d0, a(4,2)/)
659  tsmall(3,1:4) = (/ 0d0, 0d0, a(3,4), a(4,3)/)
660  !

Referenced by libtetrabz_dbldelta_mod::libtetrabz_dbldelta_main(), libtetrabz_dos_mod::libtetrabz_dos_main(), and libtetrabz_fermigr_mod::libtetrabz_fermigr3().

Here is the caller graph for this function:

◆ libtetrabz_mpisum_d()

subroutine, public libtetrabz_common::libtetrabz_mpisum_d ( integer  comm,
real(8)  scaler 
)

Definition at line 666 of file libtetrabz_common.F90.

666  !
667 #if defined(__MPI)
668  USE mpi, ONLY : mpi_double_precision, mpi_in_place, mpi_sum
669 #endif
670  IMPLICIT NONE
671  !
672  INTEGER :: comm
673  REAL(8) :: scaler
674  !
675 #if defined(__MPI)
676  INTEGER :: ierr
677  !
678  CALL mpi_allreduce(mpi_in_place, scaler, 1, &
679  & mpi_double_precision, mpi_sum, comm, ierr)
680 #endif
681  !

Referenced by libtetrabz_occ_mod::libtetrabz_fermieng().

Here is the caller graph for this function:

◆ libtetrabz_mpisum_dv()

subroutine, public libtetrabz_common::libtetrabz_mpisum_dv ( integer  comm,
integer  ndim,
real(8), dimension(ndim)  vector 
)

Definition at line 687 of file libtetrabz_common.F90.

687  !
688 #if defined(__MPI)
689  USE mpi, ONLY : mpi_double_precision, mpi_in_place, mpi_sum
690 #endif
691  IMPLICIT NONE
692  !
693  INTEGER :: comm, ndim
694  REAL(8) :: vector(ndim)
695  !
696 #if defined(__MPI)
697  INTEGER :: ierr
698  !
699  CALL mpi_allreduce(mpi_in_place, vector, ndim, &
700  & mpi_double_precision, mpi_sum, comm, ierr)
701 #endif
702  !

Referenced by libtetrabz_dbldelta_mod::libtetrabz_dbldelta(), libtetrabz_dblstep_mod::libtetrabz_dblstep(), libtetrabz_dos_mod::libtetrabz_dos(), libtetrabz_occ_mod::libtetrabz_fermieng(), libtetrabz_fermigr_mod::libtetrabz_fermigr(), libtetrabz_dos_mod::libtetrabz_intdos(), libtetrabz_occ_mod::libtetrabz_occ(), and libtetrabz_polstat_mod::libtetrabz_polstat().

Here is the caller graph for this function:

◆ libtetrabz_mpisum_zv()

subroutine, public libtetrabz_common::libtetrabz_mpisum_zv ( integer  comm,
integer  ndim,
complex(8), dimension(ndim)  vector 
)

Definition at line 708 of file libtetrabz_common.F90.

708  !
709 #if defined(__MPI)
710  USE mpi, ONLY : mpi_double_complex, mpi_in_place, mpi_sum
711 #endif
712  IMPLICIT NONE
713  !
714  INTEGER :: comm, ndim
715  COMPLEX(8) :: vector(ndim)
716  !
717 #if defined(__MPI)
718  INTEGER :: ierr
719  !
720  CALL mpi_allreduce(mpi_in_place, vector, ndim, &
721  & mpi_double_complex, mpi_sum, comm, ierr)
722 #endif
723  !

Referenced by libtetrabz_polcmplx_mod::libtetrabz_polcmplx().

Here is the caller graph for this function: