Octopus
simplex_oct_m Module Reference

Data Types

interface  simplex_dos
 
interface  simplex_t
 
interface  simplex_weights
 

Functions/Subroutines

pure subroutine simplex_sort_2 (values, idx)
 Sort two real values in ascending order while permuting indices. More...
 
pure subroutine simplex_sort_3 (values, idx)
 Sort three real values in ascending order while permuting indices. More...
 
pure subroutine simplex_sort_4 (values, idx)
 Sort four real values in ascending order while permuting indices. More...
 
pure subroutine simplex_compare_swap (a, b, ia, ib)
 Swap two value-index pairs if they are out of ascending order. More...
 
type(simplex_t) function, pointer, public simplex_init (dim, naxis, nshifts, shift, kpoints, equiv, opt)
 Constructor for linear simplex methods. More...
 
subroutine, public simplex_end (this)
 Destructor for linear simplex methods. More...
 
subroutine simplex_weights_single (rdim, esimplex, eF, weights, dos)
 Get the weights and DOS contribution of a single simplex. More...
 
subroutine simplex_weights_array (rdim, esimplex, eFs, weights, dos)
 Get the weights and DOS contribution of a single simplex for multiple reference energies. More...
 
subroutine simplex_dos_single (rdim, esimplex, eF, dos)
 Get only the DOS contribution of a single simplex. More...
 
subroutine simplex_dos_array (rdim, esimplex, eFs, dos)
 Get only the DOS contribution of a single simplex for multiple reference energies. More...
 
subroutine simplex_weights_1d (esegment, eFs, weights, dos)
 Get the weights and DOS contribution of a single segment. More...
 
subroutine simplex_dos_1d (esegment, eFs, dos)
 Get only the DOS contribution of a single segment. More...
 
subroutine simplex_weights_2d (etriangle, eFs, weights, dos)
 Get the weights and DOS contribution of a single tetrahedron. More...
 
subroutine simplex_dos_2d (etriangle, eFs, dos)
 Get only the DOS contribution of a single triangle. More...
 
subroutine simplex_weights_3d (etetra, eFs, weights, dos)
 Get the weights and DOS contribution of a single tetrahedron. More...
 
subroutine simplex_dos_3d (etetra, eFs, dos)
 Get only the DOS contribution of a single tetrahedron. More...
 

Function/Subroutine Documentation

◆ simplex_sort_2()

pure subroutine simplex_oct_m::simplex_sort_2 ( real(real64), dimension(2), intent(inout)  values,
integer, dimension(2), intent(inout)  idx 
)
private

Sort two real values in ascending order while permuting indices.

Uses an optimal sorting network in number of comparisons to avoid the overhead of calling a foreign sorting routine for very small arrays. The sorting is unstable.

Parameters
[in,out]valuesValues to sort in place
[in,out]idxIndices permuted together with values

Definition at line 170 of file simplex.F90.

◆ simplex_sort_3()

pure subroutine simplex_oct_m::simplex_sort_3 ( real(real64), dimension(3), intent(inout)  values,
integer, dimension(3), intent(inout)  idx 
)
private

Sort three real values in ascending order while permuting indices.

Uses an optimal sorting network in number of comparisons to avoid the overhead of calling a foreign sorting routine for very small arrays. The sorting is unstable.

Parameters
[in,out]valuesValues to sort in place
[in,out]idxIndices permuted together with values

Definition at line 185 of file simplex.F90.

◆ simplex_sort_4()

pure subroutine simplex_oct_m::simplex_sort_4 ( real(real64), dimension(4), intent(inout)  values,
integer, dimension(4), intent(inout)  idx 
)
private

Sort four real values in ascending order while permuting indices.

Uses an optimal sorting network in number of comparisons to avoid the overhead of calling a foreign sorting routine for very small arrays. The sorting is unstable.

Parameters
[in,out]valuesValues to sort in place
[in,out]idxIndices permuted together with values

Definition at line 202 of file simplex.F90.

◆ simplex_compare_swap()

pure subroutine simplex_oct_m::simplex_compare_swap ( real(real64), intent(inout)  a,
real(real64), intent(inout)  b,
integer, intent(inout)  ia,
integer, intent(inout)  ib 
)
private

Swap two value-index pairs if they are out of ascending order.

Parameters
[in,out]aFirst value
[in,out]bSecond value
[in,out]iaIndex associated with a
[in,out]ibIndex associated with b

Definition at line 219 of file simplex.F90.

◆ simplex_init()

type(simplex_t) function, pointer, public simplex_oct_m::simplex_init ( integer, intent(in)  dim,
integer, dimension(1:dim), intent(in)  naxis,
integer, intent(in)  nshifts,
real(real64), dimension(:,:), intent(in)  shift,
real(real64), dimension(:,:), intent(in)  kpoints,
integer, dimension(:), intent(in), optional  equiv,
logical, intent(in)  opt 
)

Constructor for linear simplex methods.

At the moment this performs a dumb tetrahedrization of the BZ by converting the coordinates of k-points back into integer triples. This only works for a two- and three-dimensional BZ and if there is only a single shift. Both of these conditions are ASSERTed.

Parameters
[in]dimDimension of the system
[in]naxisNumber of k-points along each dimension
[in]nshiftNumber of shifts
[in]shiftShifts along each dimension
[in]kpointsGrid of k-points in the unreduced BZ
[in]equivMapping of k-point indices in the full BZ to the reduced BZ
[in]optWhether to use the improved tetrahedron method
Returns
New linear simplex method instance

Definition at line 252 of file simplex.F90.

◆ simplex_end()

subroutine, public simplex_oct_m::simplex_end ( type(simplex_t), intent(inout)  this)

Destructor for linear simplex methods.

Parameters
[in,out]thisLinear simplex method instance

Definition at line 486 of file simplex.F90.

◆ simplex_weights_single()

subroutine simplex_oct_m::simplex_weights_single ( integer, intent(in)  rdim,
real(real64), dimension(:), intent(in)  esimplex,
real(real64), intent(in)  eF,
real(real64), dimension(:), intent(out)  weights,
real(real64), dimension(:), intent(out)  dos 
)
private

Get the weights and DOS contribution of a single simplex.

Parameters
[in]rdimReduced dimension of the problem (non-zero dimensions in k-space)
[in]esimplexEigenenergies on the corner points of a simplex
[in]eFsReference energies
[out]weightsIntegration weights for each corner of the segment, indexed as (vertex, energy)
[out]dosContribution to the DOS by the segment, indexed as (vertex, energy)

Definition at line 500 of file simplex.F90.

◆ simplex_weights_array()

subroutine simplex_oct_m::simplex_weights_array ( integer, intent(in)  rdim,
real(real64), dimension(:), intent(in)  esimplex,
real(real64), dimension(:), intent(in)  eFs,
real(real64), dimension(:,:), intent(out)  weights,
real(real64), dimension(:,:), intent(out)  dos 
)
private

Get the weights and DOS contribution of a single simplex for multiple reference energies.

Parameters
[in]rdimReduced dimension of the problem (non-zero dimensions in k-space)
[in]esimplexEigenenergies on the corner points of a simplex
[in]eFsReference energies
[out]weightsIntegration weights for each corner of the simplex, indexed as (vertex, energy)
[out]dosContribution to the DOS by the simplex, indexed as (vertex, energy)

Definition at line 523 of file simplex.F90.

◆ simplex_dos_single()

subroutine simplex_oct_m::simplex_dos_single ( integer, intent(in)  rdim,
real(real64), dimension(:), intent(in)  esimplex,
real(real64), intent(in)  eF,
real(real64), dimension(:), intent(out)  dos 
)
private

Get only the DOS contribution of a single simplex.

Parameters
[in]rdimReduced dimension of the problem (non-zero dimensions in k-space)
[in]esimplexEigenenergies on the corner points of a simplex
[in]eFReference energy
[out]dosContribution to the DOS by the simplex

Definition at line 555 of file simplex.F90.

◆ simplex_dos_array()

subroutine simplex_oct_m::simplex_dos_array ( integer, intent(in)  rdim,
real(real64), dimension(:), intent(in)  esimplex,
real(real64), dimension(:), intent(in)  eFs,
real(real64), dimension(:,:), intent(out)  dos 
)
private

Get only the DOS contribution of a single simplex for multiple reference energies.

Parameters
[in]rdimReduced dimension of the problem (non-zero dimensions in k-space)
[in]esimplexEigenenergies on the corner points of a simplex
[in]eFsReference energies
[out]dosContribution to the DOS by the simplex, indexed as (vertex, energy)

Definition at line 575 of file simplex.F90.

◆ simplex_weights_1d()

subroutine simplex_oct_m::simplex_weights_1d ( real(real64), dimension(:), intent(in)  esegment,
real(real64), dimension(:), intent(in)  eFs,
real(real64), dimension(:,:), intent(out)  weights,
real(real64), dimension(:,:), intent(out)  dos 
)
private

Get the weights and DOS contribution of a single segment.

Parameters
[in]esegmentEigenenergies on the corner points of a segment
[in]eFReference energy
[out]weightsIntegration weights for each corner of the tetrahedron (including Bloechl correction)
[out]dosContribution to the DOS by the tetrahedron

Definition at line 604 of file simplex.F90.

◆ simplex_dos_1d()

subroutine simplex_oct_m::simplex_dos_1d ( real(real64), dimension(:), intent(in)  esegment,
real(real64), dimension(:), intent(in)  eFs,
real(real64), dimension(:,:), intent(out)  dos 
)
private

Get only the DOS contribution of a single segment.

Parameters
[in]esegmentEigenenergies on the corner points of a segment
[in]eFsReference energies
[out]dosContribution to the DOS by the segment, indexed as (vertex, energy)

Definition at line 688 of file simplex.F90.

◆ simplex_weights_2d()

subroutine simplex_oct_m::simplex_weights_2d ( real(real64), dimension(:), intent(in)  etriangle,
real(real64), dimension(:), intent(in)  eFs,
real(real64), dimension(:,:), intent(out)  weights,
real(real64), dimension(:,:), intent(out)  dos 
)
private

Get the weights and DOS contribution of a single tetrahedron.

The expressions for the weights and the DOS are given in S. I. Kurganseii, et al., phys. stat. sol. (b) 129, 293 (1985).

The expression for the Bloechl-type correction is given in Eq. 4 of J.-H. Lee, et al., Phys. Rev. B 66, 233102 (2002).

Parameters
[in]etriangleEigenenergies on the corner points of a triangle
[in]eFsReference energies
[out]weightsIntegration weights for each corner of the triangle, indexed as (vertex, energy)
[out]dosContribution to the DOS by the triangle, indexed as (vertex, energy)

Definition at line 760 of file simplex.F90.

◆ simplex_dos_2d()

subroutine simplex_oct_m::simplex_dos_2d ( real(real64), dimension(:), intent(in)  etriangle,
real(real64), dimension(:), intent(in)  eFs,
real(real64), dimension(:,:), intent(out)  dos 
)
private

Get only the DOS contribution of a single triangle.

The expressions for the DOS are given in S. I. Kurganseii, et al., phys. stat. sol. (b) 129, 293 (1985).

Parameters
[in]etriangleEigenenergies on the corner points of a triangle
[in]eFsReference energies
[out]dosContribution to the DOS by the triangle, indexed as (vertex, energy)

Definition at line 871 of file simplex.F90.

◆ simplex_weights_3d()

subroutine simplex_oct_m::simplex_weights_3d ( real(real64), dimension(:), intent(in)  etetra,
real(real64), dimension(:), intent(in)  eFs,
real(real64), dimension(:,:), intent(out)  weights,
real(real64), dimension(:,:), intent(out)  dos 
)
private

Get the weights and DOS contribution of a single tetrahedron.

The expressions for the weights are given in Appendix C of P. E. Bloechl, et al., Phys. Rev. B 49, 16223 (1994).

The expressions for the DOS are given in A. H. MacDonald, et al., J. Phys. C: Solid State Phys. 12, 2991 (1979).

The expressions for the weights of the improved tetrahedron method are given in Eq. (18)-(21) of M. Kawamura, et al., Phys. Rev. B 89, 094515 (2014).

Parameters
[in]etetraEigenenergies on the corner points of a tetrahedron
[in]eFsReference energies
[out]weightsIntegration weights for each corner of the tetrahedron, indexed as (vertex, energy)
[out]dosContribution to the DOS by the tetrahedron, indexed as (vertex, energy)

Definition at line 962 of file simplex.F90.

◆ simplex_dos_3d()

subroutine simplex_oct_m::simplex_dos_3d ( real(real64), dimension(:), intent(in)  etetra,
real(real64), dimension(:), intent(in)  eFs,
real(real64), dimension(:,:), intent(out)  dos 
)
private

Get only the DOS contribution of a single tetrahedron.

The expressions for the DOS are given in A. H. MacDonald, et al., J. Phys. C: Solid State Phys. 12, 2991 (1979).

The expressions for the weights of the improved tetrahedron method are given in Eq. (18)-(21) of M. Kawamura, et al., Phys. Rev. B 89, 094515 (2014).

Parameters
[in]etetraEigenenergies on the corner points of a tetrahedron
[in]eFsReference energies
[out]dosContribution to the DOS by the tetrahedron, indexed as (vertex, energy)

Definition at line 1137 of file simplex.F90.