22 use,
intrinsic :: iso_fortran_env, only: real64
46 integer :: n_simplices
48 integer,
allocatable :: simplices(:,:)
76 real(real64),
intent(inout) :: values(2)
77 integer,
intent(inout) :: idx(2)
91 real(real64),
intent(inout) :: values(3)
92 integer,
intent(inout) :: idx(3)
108 real(real64),
intent(inout) :: values(4)
109 integer,
intent(inout) :: idx(4)
125 real(real64),
intent(inout) :: a, b
126 integer,
intent(inout) :: ia, ib
128 real(real64) :: tmp_a
157 function simplex_init(dim, naxis, nshifts, shift, kpoints, equiv, opt)
result(this)
158 integer,
intent(in) :: dim
159 integer,
intent(in) :: naxis(1:dim)
160 integer,
intent(in) :: nshifts
161 real(real64),
intent(in) :: shift(:,:)
162 real(real64),
intent(in) :: kpoints(:,:)
163 integer,
intent(in),
optional :: equiv(:)
164 logical,
intent(in) :: opt
167 real(real64) :: kmin(dim)
168 integer :: ik, npoints
171 integer,
allocatable :: kl123(:,:,:)
173 integer :: rdim, raxis(3)
177 if (nshifts /= 1)
then
178 message(1) =
"The linear tetrahedron method only works for automatic k-point grids with a single shift"
183 safe_allocate_source(kl123(1:naxis(1), 1:naxis(2), 1:naxis(3)), -1)
185 npoints = product(naxis)
186 kmin = minval(kpoints, 2)
189 ix(:) = nint((kpoints(:,ik) - kmin) * naxis + 1)
190 assert(kl123(ix(1), ix(2), ix(3)) == -1)
191 if (
present(equiv))
then
192 kl123(ix(1), ix(2), ix(3)) = equiv(ik)
194 kl123(ix(1), ix(2), ix(3)) = ik
198 rdim = sum(merge(1, 0, naxis > 1))
199 raxis(1:rdim) = pack(naxis, naxis > 1)
201 if (any(raxis(1:rdim) /= naxis(1:rdim)))
then
202 message(1) =
"The periodic dimensions must be consecutive"
211 integer,
parameter :: submesh_segments(1,2) = reshape([ &
212 1, 2 ], shape(submesh_segments), order=[2, 1])
214 integer,
parameter :: b(4,2) = reshape([ &
219 ], shape(b), order=[2, 1])
221 integer :: i, ip1, it, n
222 integer :: corners(2,1), v(2,1), c(1)
223 integer :: this_segment(2), this_corner
225 this%n_points = npoints
226 this%n_simplices = npoints
228 this%sdim = merge(4, 2, opt)
229 safe_allocate(this%simplices(this%n_simplices, this%sdim))
232 ip1 = modulo(i, raxis(1)) + 1
233 corners(:,:) = reshape([ i , ip1 ], shape(corners), order=[2, 1])
235 do it = 1,
size(submesh_segments, 1)
236 n = (it - 1) + 1 * (i - 1) + 1
237 this_segment(:) = submesh_segments(it, :)
238 v(1,:) = corners(this_segment(1), :)
239 v(2,:) = corners(this_segment(2), :)
241 c(:) = b(ik,1) * v(1,:) + b(ik,2) * v(2,:)
242 c(:) = modulo(c(:) - 1, raxis(1:rdim)) + 1
243 this_corner = kl123(c(1), 1, 1)
244 this%simplices(n,ik) = this_corner
251 integer,
parameter :: submesh_triangles(2,3) = reshape([ &
253 1, 4, 3], shape(submesh_triangles), order=[2, 1])
255 integer,
parameter :: b(10,3) = reshape([ &
266 ], shape(b), order=[2, 1])
268 integer :: i, j, ip1, jp1, it, n
269 integer :: corners(4,2), v(3,2), c(2)
270 integer :: this_triangle(3), this_corner
272 this%n_points = npoints
273 this%n_simplices = 2 * npoints
275 this%sdim = merge(10, 3, opt)
276 safe_allocate(this%simplices(this%n_simplices, this%sdim))
280 ip1 = modulo(i, raxis(1)) + 1
281 jp1 = modulo(j, raxis(2)) + 1
282 corners(:,:) = reshape([ &
286 i , jp1 ], shape(corners), order=[2, 1])
288 do it = 1,
size(submesh_triangles, 1)
289 n = (it - 1) + 2 * ((j - 1) + raxis(2) * (i - 1)) + 1
290 this_triangle(:) = submesh_triangles(it, :)
291 v(1,:) = corners(this_triangle(1), :)
292 v(2,:) = corners(this_triangle(2), :)
293 v(3,:) = corners(this_triangle(3), :)
295 c(:) = b(ik,1) * v(1,:) + b(ik,2) * v(2,:) + b(ik,3) * v(3,:)
296 c(:) = modulo(c(:) - 1, raxis(1:rdim)) + 1
297 this_corner = kl123(c(1), c(2), 1)
298 this%simplices(n,ik) = this_corner
306 integer,
parameter :: submesh_tetras(6,4) = reshape([ &
312 2, 3, 4, 6], shape(submesh_tetras), order=[2, 1])
314 integer,
parameter :: b(20,4) = reshape([ &
335 ], shape(b), order=[2, 1])
337 integer :: i, j, k, ip1, jp1, kp1, it, n
338 integer :: corners(8,3), v(4,3), c(3)
339 integer :: this_tetra(4), this_corner
341 this%n_points = npoints
342 this%n_simplices = 6 * npoints
344 this%sdim = merge(20, 4, opt)
345 safe_allocate(this%simplices(this%n_simplices, this%sdim))
350 ip1 = modulo(i, raxis(1)) + 1
351 jp1 = modulo(j, raxis(2)) + 1
352 kp1 = modulo(k, raxis(3)) + 1
353 corners(:,:) = reshape([ &
361 ip1 , jp1 , kp1 ], shape(corners), order=[2, 1])
363 do it = 1,
size(submesh_tetras, 1)
364 n = (it - 1) + 6 * ((k - 1) + raxis(3) * ((j - 1) + raxis(2) * (i - 1))) + 1
365 this_tetra(:) = submesh_tetras(it, :)
366 v(1,:) = corners(this_tetra(1), :)
367 v(2,:) = corners(this_tetra(2), :)
368 v(3,:) = corners(this_tetra(3), :)
369 v(4,:) = corners(this_tetra(4), :)
371 c(:) = b(ik,1) * v(1,:) + b(ik,2) * v(2,:) + b(ik,3) * v(3,:) + b(ik,4) * v(4,:)
372 c(:) = modulo(c(:) - 1, raxis(1:rdim)) + 1
373 this_corner = kl123(c(1), c(2), c(3))
374 this%simplices(n,ik) = this_corner
383 safe_deallocate_a(kl123)
394 safe_deallocate_a(this%simplices)
406 integer,
intent(in) :: rdim
407 real(real64),
intent(in) :: esimplex(:)
408 real(real64),
intent(in) :: ef
409 real(real64),
intent(out) :: weights(:)
410 real(real64),
intent(out) :: dos(:)
412 real(real64) :: weights_array(size(weights), 1), dos_array(size(dos), 1)
417 weights(:) = weights_array(:, 1)
418 dos(:) = dos_array(:, 1)
429 integer,
intent(in) :: rdim
430 real(real64),
intent(in) :: esimplex(:)
431 real(real64),
intent(in) :: efs(:)
432 real(real64),
intent(out) :: weights(:,:)
433 real(real64),
intent(out) :: dos(:,:)
437 assert(
size(weights, 1) == rdim + 1)
438 assert(
size(dos, 1) == rdim + 1)
439 assert(
size(weights, 2) ==
size(efs))
440 assert(
size(dos, 2) ==
size(efs))
461 integer,
intent(in) :: rdim
462 real(real64),
intent(in) :: esimplex(:)
463 real(real64),
intent(in) :: ef
464 real(real64),
intent(out) :: dos(:)
466 real(real64) :: dos_array(size(dos), 1)
471 dos(:) = dos_array(:, 1)
481 integer,
intent(in) :: rdim
482 real(real64),
intent(in) :: esimplex(:)
483 real(real64),
intent(in) :: efs(:)
484 real(real64),
intent(out) :: dos(:,:)
488 assert(
size(dos, 1) == rdim + 1)
489 assert(
size(dos, 2) ==
size(efs))
510 real(real64),
intent(in) :: esegment(:)
511 real(real64),
intent(in) :: eFs(:)
512 real(real64),
intent(out) :: weights(:,:)
513 real(real64),
intent(out) :: dos(:,:)
515 real(real64) :: E(2), E1, E2, eF
516 real(real64) :: w(2), d(2), sumE, bloechl_corr(2)
517 integer :: idx(2), ie, ne
518 logical :: apply_bloechl
520 real(real64),
parameter :: vT_vG = 1.0_real64
521 real(real64),
parameter :: vT_2vG = vt_vg / 2.0_real64
523 real(real64),
parameter :: P(2,4) = 1.0_real64 / 60.0_real64 * reshape([ &
525 1 , 64 , -2 , -3 ], shape(p), order=[2, 1])
529 select case (
size(esegment))
536 do i = 1,
size(esegment)
537 e(:) = e(:) + p(:,i) * esegment(i)
549 apply_bloechl = (
size(esegment) == 2)
550 if (apply_bloechl)
then
552 bloechl_corr(:) = (sume - 2.0_real64 * e) / 12.0_real64
561 elseif (e2 < ef)
then
564 elseif (e1 < ef .and. ef <= e2)
then
566 real(real64) :: E21, C
568 c = vt_2vg * (ef - e1) / e21
571 2.0_real64 - (ef - e1) / e21, &
574 d(:) = vt_vg / e21 * [ &
575 m_one - (ef - e1) / e21, &
584 if (apply_bloechl) weights(idx, ie) = weights(idx, ie) + sum(d) * bloechl_corr
594 real(real64),
intent(in) :: esegment(:)
595 real(real64),
intent(in) :: eFs(:)
596 real(real64),
intent(out) :: dos(:,:)
598 real(real64) :: E(2), E1, E2, eF
600 integer :: idx(2), ie, ne
602 real(real64),
parameter :: vT_vG = 1.0_real64
604 real(real64),
parameter :: P(2,4) = 1.0_real64 / 60.0_real64 * reshape([ &
606 1 , 64 , -2 , -3 ], shape(p), order=[2, 1])
610 select case (
size(esegment))
617 do i = 1,
size(esegment)
618 e(:) = e(:) + p(:,i) * esegment(i)
634 if (ef <= e1 .or. e2 < ef)
then
636 elseif (e1 < ef .and. ef <= e2)
then
641 d(:) = vt_vg / e21 * [ &
642 m_one - (ef - e1) / e21, &
666 real(real64),
intent(in) :: etriangle(:)
667 real(real64),
intent(in) :: eFs(:)
668 real(real64),
intent(out) :: weights(:,:)
669 real(real64),
intent(out) :: dos(:,:)
671 real(real64) :: E(3), E1, E2, E3, eF
672 real(real64) :: w(3), d(3), sumE, bloechl_corr(3)
673 integer :: idx(3), ie, ne
674 logical :: apply_bloechl
676 real(real64),
parameter :: vT_vG = 1.0_real64 / 2.0_real64
677 real(real64),
parameter :: vT_3vG = vt_vg / 3.0_real64
679 real(real64),
parameter :: P(3,10) = 1.0_real64 / 360.0_real64 * reshape([ &
680 402 , 0 , 6 , -13 , 5 , -17 , -13 , -11 , 7 , -6 , &
681 6 , 396 , 6 , -9 , -15 , 3 , 3 , -15 , -9 , -6 , &
682 6 , 0 , 402 , 7 , -11 , -13 , -17 , 5 , -13 , -6 &
683 ], shape(p), order=[2, 1])
687 select case (
size(etriangle))
694 do i = 1,
size(etriangle)
695 e(:) = e(:) + p(:,i) * etriangle(i)
708 apply_bloechl = (
size(etriangle) == 3)
709 if (apply_bloechl)
then
711 bloechl_corr(:) = (sume - 3.0_real64 * e) / 24.0_real64
720 elseif (e3 < ef)
then
723 elseif (e1 < ef .and. ef <= e2)
then
725 real(real64) :: E21, E31, C
728 c = vt_3vg * (ef - e1) ** 2 / (e21 * e31)
731 3.0_real64 - (ef - e1) * (m_one / e21 + m_one / e31), &
735 d(:) = vt_vg * (ef - e1) / (e21 * e31) * [&
736 2.0_real64 - (ef - e1) * (m_one / e31 + m_one / e21), &
740 elseif (e2 < ef .and. ef <= e3)
then
742 real(real64) :: E23, E31, C1, C2
746 c2 = vt_3vg * (ef - e3) ** 2 / (e23 * e31)
749 c1 - c2 * (ef - e3) / e31, &
750 c1 + c2 * (ef - e3) / e23, &
751 c1 + c2 * (3.0_real64 - (ef - e3) * (m_one / e23 - m_one / e31))]
753 d(:) = vt_vg * (ef - e3) / (e23 * e31) * [ &
756 2.0_real64 - (ef - e3) * (m_one / e23 - m_one / e31)]
764 if (apply_bloechl) weights(idx, ie) = weights(idx, ie) + sum(d) * bloechl_corr
777 real(real64),
intent(in) :: etriangle(:)
778 real(real64),
intent(in) :: eFs(:)
779 real(real64),
intent(out) :: dos(:,:)
781 real(real64) :: E(3), E1, E2, E3, eF
783 integer :: idx(3), ie, ne
785 real(real64),
parameter :: vT_vG = 1.0_real64 / 2.0_real64
787 real(real64),
parameter :: P(3,10) = 1.0_real64 / 360.0_real64 * reshape([ &
788 402 , 0 , 6 , -13 , 5 , -17 , -13 , -11 , 7 , -6 , &
789 6 , 396 , 6 , -9 , -15 , 3 , 3 , -15 , -9 , -6 , &
790 6 , 0 , 402 , 7 , -11 , -13 , -17 , 5 , -13 , -6 &
791 ], shape(p), order=[2, 1])
795 select case (
size(etriangle))
802 do i = 1,
size(etriangle)
803 e(:) = e(:) + p(:,i) * etriangle(i)
820 if (ef <= e1 .or. e3 < ef)
then
822 elseif (e1 < ef .and. ef <= e2)
then
824 real(real64) :: E21, E31
828 d(:) = vt_vg * (ef - e1) / (e21 * e31) * [&
829 (2.0_real64 - (ef - e1) * (m_one / e31 + m_one / e21)), &
833 elseif (e2 < ef .and. ef <= e3)
then
835 real(real64) :: E23, E31
839 d(:) = vt_vg * (ef - e3) / (e23 * e31) * [ &
842 2.0_real64 - (ef - e3) * (m_one / e23 - m_one / e31)]
868 real(real64),
intent(in) :: etetra(:)
869 real(real64),
intent(in) :: eFs(:)
870 real(real64),
intent(out) :: weights(:,:)
871 real(real64),
intent(out) :: dos(:,:)
873 real(real64) :: E(4), E1, E2, E3, E4, eF
874 real(real64) :: w(4), d(4), sumE, bloechl_corr(4)
875 integer :: idx(4), ie, ne
876 logical :: apply_bloechl
878 real(real64),
parameter :: vT_vG = 1.0_real64 / 6.0_real64
879 real(real64),
parameter :: vT_4vG = vt_vg / 4.0_real64
881 real(real64),
parameter :: P(4,20) = 1.0_real64 / 1260.0_real64 * reshape([ &
882 1440, 0 , 30 , 0 , -38 , 7 , 17 , -28 , -56 , 9 , -46 , 9 , -38 , -28 , 17 , 7 , -18 , -18 , 12 , -18 , &
883 0 , 1440, 0 , 30 , -28 , -38 , 7 , 17 , 9 , -56 , 9 , -46 , 7 , -38 , -28 , 17 , -18 , -18 , -18 , 12 , &
884 30 , 0 , 1440, 0 , 17 , -28 , -38 , 7 , -46 , 9 , -56 , 9 , 17 , 7 , -38 , -28 , 12 , -18 , -18 , -18 , &
885 0 , 30 , 0 , 1440, 7 , 17 , -28 , -38 , 9 , -46 , 9 , -56 , -28 , 17 , 7 , -38 , -18 , 12 , -18 , -18 &
886 ], shape(p), order=[2, 1])
890 select case (
size(etetra))
897 do i = 1,
size(etetra)
898 e(:) = e(:) + p(:,i) * etetra(i)
912 apply_bloechl = (
size(etetra) == 4)
913 if (apply_bloechl)
then
915 bloechl_corr(:) = (sume - 4.0_real64 * e) / 40.0_real64
924 elseif (e4 < ef)
then
927 elseif (e1 < ef .and. ef <= e2)
then
929 real(real64) :: E21, E31, E41, C
933 c = vt_4vg * (ef - e1) ** 3 / (e21 * e31 * e41)
936 4.0_real64 - (ef - e1) * (m_one / e21 + m_one / e31 + m_one / e41), &
942 real(real64) :: f12, f13, f14, f21, f31, f41, g
943 f21 = (ef - e1) / (e2 - e1)
944 f31 = (ef - e1) / (e3 - e1)
945 f41 = (ef - e1) / (e4 - e1)
949 g = f31 * f41 / (e2 - e1)
950 d(:) = vt_vg * g * [&
956 elseif (e2 < ef .and. ef <= e3)
then
958 real(real64) :: E21, E31, E32, E41, E42, C1, C2, C3
964 c1 = vt_4vg * (ef - e1) ** 2 / (e41 * e31)
965 c2 = vt_4vg * (ef - e1) * (ef - e2) * (e3 - ef) / (e41 * e32 * e31)
966 c3 = vt_4vg * (ef - e2) ** 2 * (e4 - ef) / (e42 * e32 * e41)
969 c1 + (c1 + c2) * (e3 - ef) / e31 + (c1 + c2 + c3) * (e4 - ef) / e41, &
970 c1 + c2 + c3 + (c2 + c3) * (e3 - ef) / e32 + c3 * (e4 - ef) / e42, &
971 (c1 + c2) * (ef - e1) / e31 + (c2 + c3) * (ef - e2) / e32, &
972 (c1 + c2 + c3) * (ef - e1) / e41 + c3 * (ef - e2) / e42]
975 real(real64) :: f13, f14, f23, f24, f31, f32, f41, f42, g, delta
977 f31 = (ef - e1) / (e3 - e1)
978 f41 = (ef - e1) / (e4 - e1)
979 f32 = (ef - e2) / (e3 - e2)
980 f42 = (ef - e2) / (e4 - e2)
985 g = 3.0_real64 / delta * (f23 * f31 + f32 * f24)
987 g * f14 / 3.0_real64 + f13 * f31 * f23 / delta, &
988 g * f23 / 3.0_real64 + f24 * f24 * f32 / delta, &
989 g * f32 / 3.0_real64 + f31 * f31 * f23 / delta, &
990 g * f41 / 3.0_real64 + f42 * f24 * f32 / delta]
992 elseif (e3 < ef .and. ef <= e4)
then
994 real(real64) :: E41, E42, E43, C
998 c = vt_4vg * (e4 - ef) ** 3 / (e41 * e42 * e43)
1000 w(:) = vt_4vg - c * [ &
1004 4.0_real64 - (e4 - ef) * (m_one / e41 + m_one / e42 + m_one / e43)]
1007 real(real64) :: f14, f24, f34, f41, f42, f43, g
1008 f14 = (ef - e4) / (e1 - e4)
1009 f24 = (ef - e4) / (e2 - e4)
1010 f34 = (ef - e4) / (e3 - e4)
1014 g = f14 * f24 / (e4 - e3)
1015 d(:) = vt_vg * g *[ &
1026 weights(idx, ie) = w
1027 if (apply_bloechl) weights(idx, ie) = weights(idx, ie) + sum(d) * bloechl_corr
1043 real(real64),
intent(in) :: etetra(:)
1044 real(real64),
intent(in) :: eFs(:)
1045 real(real64),
intent(out) :: dos(:,:)
1047 real(real64) :: E(4), E1, E2, E3, E4, eF
1048 real(real64) :: d(4)
1049 integer :: idx(4), ie, ne
1051 real(real64),
parameter :: vT_vG = 1.0_real64 / 6.0_real64
1053 real(real64),
parameter :: P(4,20) = 1.0_real64 / 1260.0_real64 * reshape([ &
1054 1440, 0 , 30 , 0 , -38 , 7 , 17 , -28 , -56 , 9 , -46 , 9 , -38 , -28 , 17 , 7 , -18 , -18 , 12 , -18 , &
1055 0 , 1440, 0 , 30 , -28 , -38 , 7 , 17 , 9 , -56 , 9 , -46 , 7 , -38 , -28 , 17 , -18 , -18 , -18 , 12 , &
1056 30 , 0 , 1440, 0 , 17 , -28 , -38 , 7 , -46 , 9 , -56 , 9 , 17 , 7 , -38 , -28 , 12 , -18 , -18 , -18 , &
1057 0 , 30 , 0 , 1440, 7 , 17 , -28 , -38 , 9 , -46 , 9 , -56 , -28 , 17 , 7 , -38 , -18 , 12 , -18 , -18 &
1058 ], shape(p), order=[2, 1])
1062 select case (
size(etetra))
1069 do i = 1,
size(etetra)
1070 e(:) = e(:) + p(:,i) * etetra(i)
1088 if (e1 >= ef .or. e4 < ef)
then
1090 elseif (e1 < ef .and. ef <= e2)
then
1092 real(real64) :: f12, f13, f14, f21, f31, f41, g
1093 f21 = (ef - e1) / (e2 - e1)
1094 f31 = (ef - e1) / (e3 - e1)
1095 f41 = (ef - e1) / (e4 - e1)
1099 g = f31 * f41 / (e2 - e1)
1100 d(:) = vt_vg * g * [&
1106 elseif (e2 < ef .and. ef <= e3)
then
1108 real(real64) :: f13, f14, f23, f24, f31, f32, f41, f42, g, delta
1110 f31 = (ef - e1) / (e3 - e1)
1111 f41 = (ef - e1) / (e4 - e1)
1112 f32 = (ef - e2) / (e3 - e2)
1113 f42 = (ef - e2) / (e4 - e2)
1118 g = 3.0_real64 / delta * (f23 * f31 + f32 * f24)
1120 g * f14 / 3.0_real64 + f13 * f31 * f23 / delta, &
1121 g * f23 / 3.0_real64 + f24 * f24 * f32 / delta, &
1122 g * f32 / 3.0_real64 + f31 * f31 * f23 / delta, &
1123 g * f41 / 3.0_real64 + f42 * f24 * f32 / delta]
1125 elseif (e3 < ef .and. ef <= e4)
then
1127 real(real64) :: f14, f24, f34, f41, f42, f43, g
1128 f14 = (ef - e4) / (e1 - e4)
1129 f24 = (ef - e4) / (e2 - e4)
1130 f34 = (ef - e4) / (e3 - e4)
1134 g = f14 * f24 / (e4 - e3)
1135 d(:) = vt_vg * g *[ &
type(debug_t), save, public debug
subroutine, public debug_pop_sub(sub_name)
Pop a routine from the debug trace.
subroutine, public debug_push_sub(sub_name)
Push a routine to the debug trace.
real(real64), parameter, public m_zero
integer(int64), public global_sizeof
logical pure function, public not_in_openmp()
character(len=100), public global_alloc_errmsg
integer, public global_alloc_err
real(real64), parameter, public m_one
subroutine, public alloc_error(size, file, line)
subroutine, public dealloc_error(size, file, line)
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
subroutine, public messages_fatal(no_lines, only_root_writes, namespace)
type(profile_vars_t), target, save, public prof_vars
integer, parameter, public profiling_memory
subroutine, public profiling_out(label)
Increment out counter and sum up difference between entry and exit time.
subroutine, public profiling_in(label, exclude)
Increment in counter and save entry time.
subroutine, public profiling_memory_deallocate(var, file, line, size)
subroutine, public profiling_memory_allocate(var, file, line, size_)
subroutine simplex_dos_2d(etriangle, eFs, dos)
Get only the DOS contribution of a single triangle.
pure subroutine simplex_compare_swap(a, b, ia, ib)
Swap two value-index pairs if they are out of ascending order.
subroutine simplex_weights_3d(etetra, eFs, weights, dos)
Get the weights and DOS contribution of a single tetrahedron.
pure subroutine simplex_sort_3(values, idx)
Sort three real values in ascending order while permuting indices.
subroutine simplex_dos_single(rdim, esimplex, eF, dos)
Get only the DOS contribution of a single simplex.
subroutine simplex_weights_1d(esegment, eFs, weights, dos)
Get the weights and DOS contribution of a single segment.
subroutine simplex_weights_2d(etriangle, eFs, weights, dos)
Get the weights and DOS contribution of a single tetrahedron.
type(simplex_t) function, pointer, public simplex_init(dim, naxis, nshifts, shift, kpoints, equiv, opt)
Constructor for linear simplex methods.
subroutine, public simplex_end(this)
Destructor for linear simplex methods.
subroutine simplex_weights_array(rdim, esimplex, eFs, weights, dos)
Get the weights and DOS contribution of a single simplex for multiple reference energies.
subroutine simplex_dos_3d(etetra, eFs, dos)
Get only the DOS contribution of a single tetrahedron.
pure subroutine simplex_sort_4(values, idx)
Sort four real values in ascending order while permuting indices.
pure subroutine simplex_sort_2(values, idx)
Sort two real values in ascending order while permuting indices.
subroutine simplex_dos_array(rdim, esimplex, eFs, dos)
Get only the DOS contribution of a single simplex for multiple reference energies.
subroutine simplex_dos_1d(esegment, eFs, dos)
Get only the DOS contribution of a single segment.
subroutine simplex_weights_single(rdim, esimplex, eF, weights, dos)
Get the weights and DOS contribution of a single simplex.